Skip to content

Commit a81124f

Browse files
committed
BIP341: Clarify tweaking of secret keys
1 parent 110b3c5 commit a81124f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bip-0341.mediawiki

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ The parity bit will be required for spending the output with a script path.
176176
In order to allow spending with the key path, we define <code>taproot_tweak_seckey</code> to compute the secret key for a tweaked public key.
177177
For any byte string <code>h</code> it holds that <code>taproot_tweak_pubkey(pubkey_gen(seckey), h)[1] == pubkey_gen(taproot_tweak_seckey(seckey, h))</code>.
178178

179+
Note that the secret key must be negated, if necessary, to produce an even-y pubkey before applying the tweak.
180+
179181
<source lang="python">
180182
def taproot_tweak_pubkey(pubkey, h):
181183
t = int_from_bytes(tagged_hash("TapTweak", pubkey + h))

0 commit comments

Comments
 (0)