Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add failure case to secp256k1_generator_generate_interal #283

Conversation

roconnor-blockstream
Copy link
Contributor

The implementation of shallue_van_de_woestijne currently returns an off-curve point when given a value of t.

While this is cryptographically impossible to occur, none-the-less we should fail in this case rather than simply return a garbage value.

The implementation of shallue_van_de_woestijne currently returns an off-curve
point when given a value of t.

While this is cryptographically impossible to occur, none-the-less we should
fail in this case rather than simply return a garbage value.
@roconnor-blockstream
Copy link
Contributor Author

This fixes issue #279 using method (B) by having secp2561_generator_generate_internal return 0 in case one of the hashes results in the all 0 value (this is cryptographically impossible).

No however this "fix" still results in computations proceeding with off-curve points, which is somewhere between "strongly discouraged" and "a violation of the preconditions of the secp256k1 operations".

For an alternative solution see #284.

jonasnick

This comment was marked as outdated.

@jonasnick
Copy link
Contributor

Merged alternative fix #286.

@jonasnick jonasnick closed this Jan 25, 2024
@roconnor-blockstream roconnor-blockstream deleted the 2024-01-generator_generate branch January 25, 2024 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants