Merge pull request #142 from OrfeasLitos/python-typo

Replace R with P in taproot_tweak_seckey
This commit is contained in:
Pieter Wuille authored and GitHub committed 2019-11-13 08:50:18 -08:00
commit 1e27c4e307
1 file changed
+1 -1
+1 -1
View File
@@ -194,7 +194,7 @@ def taproot_tweak_pubkey(pubkey, h):
def taproot_tweak_seckey(seckey0, h): def taproot_tweak_seckey(seckey0, h):
P = point_mul(G, int_from_bytes(seckey0)) 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)) t = int_from_bytes(tagged_hash("TapTweak", bytes_from_int(x(P)) + h))
if t >= SECP256K1_ORDER: if t >= SECP256K1_ORDER:
raise ValueError raise ValueError