pub fn build_taptweak(a: Pubkey, b: u256) -> u256Expand description
Implementation of taproot_tweak_pubkey from BIP-0341.
§Panics
- The input x-only public key is off curve or exceeds the field size.
- The internal hash value
texceeds the secp256k1 group order. - The generated tweaked point is infinity, and thus has no valid x-only public key.
Note that situations 2 and 3 are cryptographically impossible to occur.
§Cost
92813 mWU (milli weight units)