mratsim / constantine

Constantine: modular, high-performance, zero-dependency cryptography stack for verifiable computation, proof systems and blockchain protocols.
Other
408 stars 43 forks source link

Test generators should generate to a serialized format (JSON, ...) #52

Closed mratsim closed 3 years ago

mratsim commented 4 years ago

Currently the test vector generators at:

must be run manually and then be copy pasted in a test file:

which is very tedious and error prone already for Fp2.

And pairings occur in Fp12, and there are many curves with "interesting" specificities like BLS12-377 which doesn't use a complex extension for Fp2.

That said, testing 10 points on a curve gives high confidence that the elliptic curve implemented is correct as if 2 polynomials of degree 3 (the case of elliptic curve) have 3 points being the same, they are the same polynomials (not sure how that changes when the polynomials is in both x and y).

mratsim commented 3 years ago

Fixed in #101