ZenGo-X / curv

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

Deterministic / regression unit testing for elliptic curves #65

Open gbenattar opened 5 years ago

gbenattar commented 5 years ago

Motivation

Curv is used as a low level library for crypto-currency wallets impacting the following critical features: address creation / derivation, master-key generation, signature. A framework for unit testing a curve should be defined and used.

Proposal

As a starting point, my proposal is to start with secp256 and add basic unit testing which make sure of basic features. Test output against previously verified hardcoded set of values.

Silur commented 5 years ago

If there's any plan to implement other curves as well, then I'd go with the methodology seen at https://github.com/openssl/openssl/blob/master/test/ectest.c and don't make tests curve-specific.

omershlo commented 5 years ago

Can you elaborate more please on this methodology and when it should be applied ?