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

Wrong documentation for secp256k1_ec_seckey_tweak_add #1322

Closed
MatthewLM opened this issue May 23, 2023 · 0 comments · Fixed by #1323
Closed

Wrong documentation for secp256k1_ec_seckey_tweak_add #1322

MatthewLM opened this issue May 23, 2023 · 0 comments · Fixed by #1323

Comments

@MatthewLM
Copy link

The documentation for secp256k1_ec_seckey_tweak_add states that If the tweak is invalid according to secp256k1_ec_seckey_verify, this function returns 0. However if tweak32 is zero, it will not produce an error unlike the tests in secp256k1_ec_seckey_verify so this is incorrect. It only produces an error on an overflow.

Either it should test for zero, or the documentation should be changed. A zero scalar results in the same private key. I'm not sure if allowing a zero scalar is sensible or not.

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 a pull request may close this issue.

1 participant