summaryrefslogtreecommitdiff
path: root/bip-0341.mediawiki
diff options
context:
space:
mode:
authoreugene <elzeigel@gmail.com>2021-04-23 17:32:49 -0400
committereugene <elzeigel@gmail.com>2021-04-26 17:43:41 -0400
commitb1dbe62a21381661dff8d670480944c7a70eff61 (patch)
tree0da5acccd6b9d88de0098b5c426a91afcc8ce047 /bip-0341.mediawiki
parent40b10c83db225b891c3b5153d69aedb5c7297aed (diff)
downloadbips-b1dbe62a21381661dff8d670480944c7a70eff61.tar.xz
BIP 341: fix tuple index
Diffstat (limited to 'bip-0341.mediawiki')
-rw-r--r--bip-0341.mediawiki4
1 files changed, 2 insertions, 2 deletions
diff --git a/bip-0341.mediawiki b/bip-0341.mediawiki
index 586bb39..fb6e222 100644
--- a/bip-0341.mediawiki
+++ b/bip-0341.mediawiki
@@ -173,7 +173,7 @@ First, we define <code>taproot_tweak_pubkey</code> for 32-byte [[bip-0340.mediaw
The function returns a bit indicating the tweaked public key's Y coordinate as well as the public key byte array.
The parity bit will be required for spending the output with a script path.
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.
-For any byte string <code>h</code> it holds that <code>taproot_tweak_pubkey(pubkey_gen(seckey), h)[0] == pubkey_gen(taproot_tweak_seckey(seckey, h))</code>.
+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>.
<source lang="python">
def taproot_tweak_pubkey(pubkey, h):
@@ -219,7 +219,7 @@ def taproot_output_script(internal_pubkey, script_tree):
h = bytes()
else:
_, h = taproot_tree_helper(script_tree)
- output_pubkey, _ = taproot_tweak_pubkey(internal_pubkey, h)
+ _, output_pubkey = taproot_tweak_pubkey(internal_pubkey, h)
return bytes([0x51, 0x20]) + output_pubkey
</source>