mirror of
https://github.com/bitcoin/bips.git
synced 2025-02-26 08:59:43 +01:00
Merge pull request #128 from codeShark149/tweak_pubkey_change
Internal pubkey calculation fixed in taproot_tweak_pubkey()
This commit is contained in:
commit
3700e18055
1 changed files with 1 additions and 1 deletions
|
@ -189,7 +189,7 @@ def taproot_tweak_pubkey(pubkey, h):
|
||||||
t = int_from_bytes(tagged_hash("TapTweak", pubkey + h))
|
t = int_from_bytes(tagged_hash("TapTweak", pubkey + h))
|
||||||
if t >= SECP256K1_ORDER:
|
if t >= SECP256K1_ORDER:
|
||||||
raise ValueError
|
raise ValueError
|
||||||
Q = point_mul(point(pubkey), t)
|
Q = point_add(point(pubkey), point_mul(G, t))
|
||||||
return bytes_from_int(x(Q)), has_square_y(Q)
|
return bytes_from_int(x(Q)), has_square_y(Q)
|
||||||
|
|
||||||
def taproot_tweak_seckey(seckey0, h):
|
def taproot_tweak_seckey(seckey0, h):
|
||||||
|
|
Loading…
Add table
Reference in a new issue