curv icon indicating copy to clipboard operation
curv copied to clipboard

Deterministic / regression unit testing for elliptic curves

Open gbenattar opened this issue 4 years ago • 2 comments

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.

gbenattar avatar Sep 08 '19 06:09 gbenattar

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.

Silur avatar Sep 08 '19 14:09 Silur

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

omershlo avatar Sep 08 '19 14:09 omershlo