Code Monkey home page Code Monkey logo

crypto's Introduction

What?

secp256k1 added to Golang crypto/elliptic

This is copied from this PR: golang/go#26873

The parent issue was rejected and closed here with this comment: golang/go#26776 (comment)

I am saying the standard library should provide specialized implementations of an opinionated
small set of curves, not support for all possible curves. The latter belongs in a third-party
project (which can absolutely start from the stdlib code, as it's BSD licensed).

Why?

You can use a golang lib that wraps a bunch of C headers from who knows where, or you can use this.

All you need to trust is the PR above.

How do I verify this hasn't been changed from the PR?

cd ~
git clone [email protected]:eliwjones/crypto.git
git clone [email protected]:golang/go.git go_master
cp ~/go_master/src/crypto/elliptic/* ~/crypto/elliptic/.
cp -r ~/go_master/src/crypto/ecdsa/* ~/crypto/ecdsa/.
cd ~/crypto && git diff

Tests

git clone [email protected]:eliwjones/crypto.git
cd crypto
go test -v ./...
?   	github.com/eliwjones/crypto	[no test files]
=== RUN   TestKeyGeneration
--- PASS: TestKeyGeneration (0.02s)
=== RUN   TestSignAndVerify
--- PASS: TestSignAndVerify (0.09s)
=== RUN   TestNonceSafety
   .
   .
   .

Example

# To see a working example
go run main.go
signature: (0x77d18512ce3462002feeeb9d340f8f3f073bdecf1032f062867c3a0119dd5362, 0x91b6d18b61bfa3501434c7f7ea28554adefb32225d2b9c6fcf34f76d105621a3)
signature verified: true

crypto's People

Contributors

eliwjones avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.