verklegarden / crysol

secp256k1 elliptic curve cryptography in pure Solidity for on- and offchain operations
Apache License 2.0
57 stars 3 forks source link

tests: add secp256k1 Point validity and de/encoding test vectors #32

Closed obatirou closed 1 month ago

obatirou commented 1 month ago

This PR is part of https://github.com/verklegarden/crysol/issues/23. It adds the tests vectors for point validity and de/encoding and allows to test:

The addition of those tests allowed to catch a bug: isOnCurve was missing a check on coordinate that needs to be inferior to P