The lift_x
function in the BIP and the reference implementation expect an integer to be passed rather than a byte array.
Can be tested with:
0$ python3 test-vectors.py > expected.csv
1$ diff test-vectors.csv expected.csv
On master, the first call fails with
0Traceback (most recent call last):
1 File "/home/thestack/bips/bip-0340/test-vectors.py", line 267, in <module>
2 vector0(),
3 ^^^^^^^^^
4 File "/home/thestack/bips/bip-0340/test-vectors.py", line 30, in vector0
5 pubkey_point = lift_x(pubkey)
6 ^^^^^^^^^^^^^^
7 File "/home/thestack/bips/bip-0340/reference.py", line 72, in lift_x
8 if x >= p:
9 ^^^^^^
10TypeError: '>=' not supported between instances of 'bytes' and 'int'