ZenGo-X / curv

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

add p256 curve support #87

Closed ra-- closed 3 years ago

ra-- commented 3 years ago

lots of clone() had to be added to cryptographic_primites/* because SecretKey does not implement the Copy trait (because it zeroizes by default)

omershlo commented 3 years ago

@ra-- see comment above - if it works (I think it does) - you can remove significant amount of the clones

omershlo commented 3 years ago

question : if you use Scalar instead of SecretKey in: pub type SK = SecretKey; does it solves the clone issue ? (Scalar can be copied)

ra-- commented 3 years ago

question : if you use Scalar instead of SecretKey in: pub type SK = SecretKey; does it solves the clone issue ? (Scalar can be copied)

It does solve the clone issue. See https://github.com/ZenGo-X/curv/pull/87/commits/e910270f0facac3e6e23c793dd9038512d130822