diff options
Diffstat (limited to 'bip-0340/test-vectors.py')
-rw-r--r-- | bip-0340/test-vectors.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bip-0340/test-vectors.py b/bip-0340/test-vectors.py index 317f2ec..5a131c4 100644 --- a/bip-0340/test-vectors.py +++ b/bip-0340/test-vectors.py @@ -24,14 +24,14 @@ def vector0(): assert(y(P) % 2 == 0) # For historical reasons (pubkey tiebreaker was squareness and not evenness) - # we should have at least one test vector where the the point reconstructed + # we should have at least one test vector where the point reconstructed # from the public key has a square and one where it has a non-square Y # coordinate. In this one Y is non-square. pubkey_point = lift_x(pubkey) assert(not has_square_y(pubkey_point)) # For historical reasons (R tiebreaker was squareness and not evenness) - # we should have at least one test vector where the the point reconstructed + # we should have at least one test vector where the point reconstructed # from the R.x coordinate has a square and one where it has a non-square Y # coordinate. In this one Y is non-square. R = lift_x(sig[0:32]) @@ -99,7 +99,7 @@ def insecure_schnorr_sign_fixed_nonce(msg, seckey0, k): e = int_from_bytes(tagged_hash("BIP0340/challenge", bytes_from_point(R) + bytes_from_point(P) + msg)) % n return bytes_from_point(R) + bytes_from_int((k + e * seckey) % n) -# Creates a singature with a small x(R) by using k = -1/2 +# Creates a signature with a small x(R) by using k = -1/2 def vector4(): one_half = n - 0x7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0 seckey = bytes_from_int(0x763758E5CBEEDEE4F7D3FC86F531C36578933228998226672F13C4F0EBE855EB) |