Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Merged
merged 9 commits into from
Oct 15, 2024

Conversation

obatirou
Copy link
Contributor

This PR is part of #23.
It adds the tests vectors for point validity and de/encoding and allows to test:

  • mul
  • add
  • IsOnCurve
  • pointFromEncoded
  • pointFromCompressedEncoded

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

Copy link
Member

@pmerkleplant pmerkleplant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very clean work, thank you so much! And another bug fixed too 💯 🙏

test/onchain/secp256k1/Secp256k1Arithmetic.t.sol Outdated Show resolved Hide resolved
test/onchain/secp256k1/Secp256k1Arithmetic.t.sol Outdated Show resolved Hide resolved
foundry.toml Outdated Show resolved Hide resolved
@pmerkleplant pmerkleplant merged commit f7d6034 into verklegarden:main Oct 15, 2024
4 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants