Conversation
| [dependencies.ring] | ||
| git = "https://github.com/KZen-networks/ring.git" | ||
| branch = "feature/p256" | ||
| optional = true | ||
|
|
There was a problem hiding this comment.
You probably explained it to me before, but why can't we take Ring from crate.io ?
There was a problem hiding this comment.
Because I forked and modified it (in order to extend the API of the keypair which is needed for this PR).
If we'll merge it to master (see ZenGo-X/ring#1) then we can publish KZen's repo with another name. How does that sound?
There was a problem hiding this comment.
can you give me a sense of what API extension were needed?
There was a problem hiding this comment.
Point arithmetics, serialization etc. (see PR)
src/elliptic/curves/secp256_r1.rs
Outdated
| /// The size (in bytes) of a P-256 signature | ||
| pub const SIGNATURE_SIZE: usize = 64; |
There was a problem hiding this comment.
what is P-256 signature ?
where do we use this const ?
There was a problem hiding this comment.
You're right, we don't we use it.
I'll push a commit to delete it.
| BigInt::from(CURVE_ORDER.as_ref()) | ||
| } | ||
|
|
||
| fn add(&self, other: &Seed) -> Secp256r1Scalar { |
There was a problem hiding this comment.
Ring is not providing a way to do add/mul/sub/inv?
There was a problem hiding this comment.
Not for a field element.
I followed the same pattern as used in the Secp256k1 source, see https://github.com/KZen-networks/curv/blob/master/src/elliptic/curves/secp256_k1.rs#L160.
|
Hey @oleiba , Have you checked https://github.com/RustCrypto/elliptic-curves ? |
|
It looks like a very new library, first commit in Jan 2020, even after I started my work on this P256 integration. |
|
There is another issue there: RustCrypto/elliptic-curves#29 |
The traits in that library started off in the |
Note: ring's branch dependency can be changed to
masteronce ZenGo-X/ring#1 is merged.