-
Notifications
You must be signed in to change notification settings - Fork 43
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
Update reference code and test vectors #196
Conversation
Should be up to date now with #199. I'm cross-checking the test vectors with the libsecp implementation. |
- use evenness as tiebreaker - using different tags for nonce- and challenge hashing - add pubkey to nonce function.
Test vectors pass in my (locally) updated libsecp schnorrsig branch. Pr is ready for review. |
FWIW the "int-wise" and "byte-wise" xor should be equivalent, so if they're both ints you can just do |
Sure, but seckey is a byte array, not an integer in the BIP, and we haven't defined an xor operation for either. You could write it as convert to int, xor, and convert back to bytes... but that would be very far removed from how things get implemented in non-prototyping code. |
Yeah, in any non-python enviroment you'll obviously do it by bytes. I was just confused a bit because of the wording "be the byte-wise xor", it made me think for a second that that's a distinct thing. |
ACK |
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.
ACK except nit
|
||
return (seckey, pubkey, msg, sig, "TRUE", None) | ||
# For historic reasons (pubkey tiebreaker was squareness and not evenness) |
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.
# For historic reasons (pubkey tiebreaker was squareness and not evenness) | |
# For historical reasons (pubkey tiebreaker was squareness and not evenness) |
@sipa Feel free to merge, I can fix the nit in my PR. |
Probably not final because we may want to make synthetic nonces the default (bitcoin#886) and change where to put the additional randomness (#195).