Type Alias bitcoin::key::UntweakedKeypair
source · pub type UntweakedKeypair = Keypair;
Expand description
Untweaked BIP-340 key pair
Aliased Type§
struct UntweakedKeypair(/* private fields */);
Trait Implementations§
source§impl TapTweak for UntweakedKeypair
impl TapTweak for UntweakedKeypair
source§fn tap_tweak<C: Verification>(
self,
secp: &Secp256k1<C>,
merkle_root: Option<TapNodeHash>
) -> TweakedKeypair
fn tap_tweak<C: Verification>( self, secp: &Secp256k1<C>, merkle_root: Option<TapNodeHash> ) -> TweakedKeypair
Tweaks private and public keys within an untweaked Keypair
with corresponding public key
value and optional script tree merkle root.
This is done by tweaking private key within the pair using the equation q = p + H(P|c), where
- q is the tweaked private key
- p is the internal private key
- H is the hash function
- c is the commitment data The public key is generated from a private key by multiplying with generator point, Q = qG.
§Returns
The tweaked key and its parity.
§type TweakedAux = TweakedKeypair
type TweakedAux = TweakedKeypair
Tweaked key type with optional auxiliary information
§type TweakedKey = TweakedKeypair
type TweakedKey = TweakedKeypair
Tweaked key type