ZenGo-X / curv

Rust language general purpose elliptic curve cryptography.
MIT License
264 stars 111 forks source link

Support Secp256r1 curve (NIST P-256) #81

Open oleiba opened 4 years ago

oleiba commented 4 years ago

Note: ring's branch dependency can be changed to master once https://github.com/KZen-networks/ring/pull/1 is merged.

omershlo commented 4 years ago

Hey @oleiba ,

Have you checked https://github.com/RustCrypto/elliptic-curves ? There is an implementation there for P-256 that looks really good. (btw, it seems on first look that the above library has a similar concept to Curv library - maybe they were inspired by us. I would be happy to hear your take)

oleiba commented 4 years ago

It looks like a very new library, first commit in Jan 2020, even after I started my work on this P256 integration. This seems like a good proposal for moving forward and easier integration in the future with smoother APIs, i.e. for p256 v2. There's a good use of generics (type templates) for avoiding reuse of code and subtracting away the common and it's pure Rust. On the downside, ring is probably more battle-tested at this point (RustCrypto/elliptic-curves library do not use openssl or another highly used C lib). That being said, I don't think I will have the bandwidth to substitute ring with this library in the near future.

omershlo commented 4 years ago

There is another issue there: https://github.com/RustCrypto/elliptic-curves/issues/29

str4d commented 4 years ago

It looks like a very new library, first commit in Jan 2020

The traits in that library started off in the ecdsa crate back in October 2018. The elliptic-curves crate was extracted from ecdsa in December 2019, and moved into its own repository in January.