diff options
author | kallewoof <kalle.alm@gmail.com> | 2023-05-29 17:11:24 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-29 17:11:24 +0900 |
commit | 0ea600548846d35b22bcc01dca1e50b15a6b6f7f (patch) | |
tree | e12d7c923a36549df12d3fd783611977c3854a74 /bip-0340/reference.py | |
parent | 80d44743dcbb85f738fd72116cc62edb31ca34ec (diff) | |
parent | d80e437ab1660a134c0cdd3e0397f37482e47f43 (diff) | |
download | bips-0ea600548846d35b22bcc01dca1e50b15a6b6f7f.tar.xz |
Merge pull request #1446 from sipa/bip-taproot
BIP340 updates: clarifications, variable-length messages, expand domain separation
Diffstat (limited to 'bip-0340/reference.py')
-rw-r--r-- | bip-0340/reference.py | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/bip-0340/reference.py b/bip-0340/reference.py index 162bb88..b327e0a 100644 --- a/bip-0340/reference.py +++ b/bip-0340/reference.py @@ -96,8 +96,6 @@ def pubkey_gen(seckey: bytes) -> bytes: return bytes_from_point(P) def schnorr_sign(msg: bytes, seckey: bytes, aux_rand: bytes) -> bytes: - if len(msg) != 32: - raise ValueError('The message must be a 32-byte array.') d0 = int_from_bytes(seckey) if not (1 <= d0 <= n - 1): raise ValueError('The secret key must be an integer in the range 1..n-1.') @@ -121,8 +119,6 @@ def schnorr_sign(msg: bytes, seckey: bytes, aux_rand: bytes) -> bytes: return sig def schnorr_verify(msg: bytes, pubkey: bytes, sig: bytes) -> bool: - if len(msg) != 32: - raise ValueError('The message must be a 32-byte array.') if len(pubkey) != 32: raise ValueError('The public key must be a 32-byte array.') if len(sig) != 64: |