1
0
mirror of https://github.com/bitcoin/bips.git synced 2024-11-20 10:11:46 +01:00

Replace R with P in taproot_tweak_seckey

This commit is contained in:
Orfeas Stefanos Thyfronitis Litos 2019-11-13 14:00:03 +00:00
parent b79935a883
commit 7bce5a0930
No known key found for this signature in database
GPG Key ID: D8E88F3AB8A0CEA4

View File

@ -194,7 +194,7 @@ def taproot_tweak_pubkey(pubkey, h):
def taproot_tweak_seckey(seckey0, h):
P = point_mul(G, int_from_bytes(seckey0))
seckey = SECP256K1_ORDER - seckey0 if not has_square_y(R) else seckey
seckey = SECP256K1_ORDER - seckey0 if not has_square_y(P) else seckey
t = int_from_bytes(tagged_hash("TapTweak", bytes_from_int(x(P)) + h))
if t >= SECP256K1_ORDER:
raise ValueError