Post
Topic
Board Development & Technical Discussion
Re: Need help reversing bitcoinutils "tagged_hash" to generate Taproot addresses
by
pooya87
on 16/01/2024, 12:27:21 UTC
Code:
A tagged hash is: SHA256( SHA256("TapTweak") ||
                              SHA256("F") ||
                              data
                            )
    Returns hashlib object (can then use .digest() or hexdigest())
You posted this correctly in OP but changed it here. The second hash is also TapTweak (not F).
Code:
SHA256("TapTweak")=e80fe1639c9ca050e3af1b39c143c63e429cbceb15d940fbb5c5a1f4af57c5e9

SHA256(e80f...c5e9 | e80f...c5e9 | 79be...1798)