1
0
mirror of https://github.com/bitcoin/bips.git synced 2025-01-19 05:45:07 +01:00

Merge pull request #1142 from RCasatta/lift_x

remove int_from_bytes in lift_x call since it is done internally
This commit is contained in:
Luke Dashjr 2021-07-20 18:40:26 +00:00 committed by GitHub
commit 9b861c2e05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -180,7 +180,7 @@ def taproot_tweak_pubkey(pubkey, h):
t = int_from_bytes(tagged_hash("TapTweak", pubkey + h))
if t >= SECP256K1_ORDER:
raise ValueError
Q = point_add(lift_x(int_from_bytes(pubkey)), point_mul(G, t))
Q = point_add(lift_x(pubkey), point_mul(G, t))
return 0 if has_even_y(Q) else 1, bytes_from_int(x(Q))
def taproot_tweak_seckey(seckey0, h):