Skip to content

Commit 3e3ac64

Browse files
authored
Merge pull request bitcoin#140 from jonatack/clarify-and-link-to-bip-schnorr-reference-code
bip-taproot: clarify bip-schnorr reference code
2 parents a00c4a3 + 8b92d05 commit 3e3ac64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bip-taproot.mediawiki

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Alice will not be able to notice the script path, but Mallory can unilaterally s
177177
</ref>
178178
* The remaining scripts should be organized into the leaves of a binary tree. This can be a balanced tree if each of the conditions these scripts correspond to are equally likely. If probabilities for each condition are known, consider constructing the tree as a Huffman tree.
179179
180-
'''Computing the output script''' Once the spending conditions are split into an internal key <code>internal_pubkey</code> and a binary tree whose leaves are (leaf_version, script) tuples, the output script can be computed using the following Python3 algorithms with helper functions from the bip-schnorr reference code for integer conversion, point multiplication and tagged hashes.
180+
'''Computing the output script''' Once the spending conditions are split into an internal key <code>internal_pubkey</code> and a binary tree whose leaves are (leaf_version, script) tuples, the output script can be computed using the Python3 algorithms below. These algorithms take advantage of helper functions from the [https://github.com/sipa/bips/blob/bip-schnorr/bip-schnorr/reference.py bip-schnorr reference code] for integer conversion, point multiplication, and tagged hashes.
181181
182182
First, we define <code>taproot_tweak_pubkey</code> for 32-byte bip-schnorr public key arrays.
183183
In addition to the tweaked public key byte array, the function returns a boolean for the squareness of the tweaked points' Y coordinate modulo the secp256k1 field order.

0 commit comments

Comments
 (0)