Skip to content

Accept seckey in the form of bytes and not int in the reference BIP-schnorr code...#80

Merged
sipa merged 1 commit intosipa:bip-schnorrfrom
jonasnick:bytes
Oct 7, 2019
Merged

Accept seckey in the form of bytes and not int in the reference BIP-schnorr code...#80
sipa merged 1 commit intosipa:bip-schnorrfrom
jonasnick:bytes

Conversation

@jonasnick
Copy link
Copy Markdown

…to match the spec.

Comment thread bip-schnorr/reference.py
def schnorr_sign(msg, seckey0):
if len(msg) != 32:
raise ValueError('The message must be a 32-byte array.')
seckey0 = int_from_bytes(seckey0)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe rename to d as in the pseudocode? Then we don't need to overwrite the variable and its more consistent with the text.

@sipa sipa merged commit 00f941b into sipa:bip-schnorr Oct 7, 2019
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.

3 participants