-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
bip-0374: fix challenge generation, use correct generator point #1734
Conversation
Both generating and verifying a proof allows for specifying a custom generator point G. But that custom generator point was not passed into the dleq_challenge function, resulting in the default (secp256k1) generator point to be used. This lead to the test vectors being incorrect.
cc @andrewtoth @RubenSomsen @theStack for feedback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK, at first glance the fix LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Might make sense to also remove the default value for G
in dleq_challenge
.
To avoid the mistake fixed in the previous commit, we remove the default value from the G parameter of dleq_challenge.
Makes sense. Added a commit to remove the default value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK e141b95
ACK |
There are a couple of unrelated other issues with this file, if it is intended to be run:
|
Post-merge ACK e141b95 Thanks for fixing! |
Both generating and verifying a proof allows for specifying a custom generator point G. But that custom generator point was not passed into the dleq_challenge function, resulting in the default (secp256k1) generator point to be used. This lead to the test vectors being incorrect.
Noticed this while re-implementing DLEQ proof generation and verification in Golang.