curv icon indicating copy to clipboard operation
curv copied to clipboard

Support Secp256r1 curve (NIST P-256)

Open oleiba opened this issue 4 years ago • 4 comments

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

oleiba avatar Apr 27 '20 11:04 oleiba

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)

omershlo avatar May 01 '20 16:05 omershlo

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.

oleiba avatar May 01 '20 17:05 oleiba

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

omershlo avatar May 03 '20 10:05 omershlo

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.

str4d avatar May 03 '20 21:05 str4d