From b1dbe62a21381661dff8d670480944c7a70eff61 Mon Sep 17 00:00:00 2001 From: eugene Date: Fri, 23 Apr 2021 17:32:49 -0400 Subject: BIP 341: fix tuple index --- bip-0341.mediawiki | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bip-0341.mediawiki') 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 taproot_tweak_pubkey 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 taproot_tweak_seckey to compute the secret key for a tweaked public key. -For any byte string h it holds that taproot_tweak_pubkey(pubkey_gen(seckey), h)[0] == pubkey_gen(taproot_tweak_seckey(seckey, h)). +For any byte string h it holds that taproot_tweak_pubkey(pubkey_gen(seckey), h)[1] == pubkey_gen(taproot_tweak_seckey(seckey, h)). 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 -- cgit v1.2.3