pub type UntweakedKeypair = Keypair;Expand description
Untweaked BIP-340 key pair
Aliased Type§
pub 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.
Source§type TweakedAux = TweakedKeypair
type TweakedAux = TweakedKeypair
Tweaked key type with optional auxiliary information
Source§type TweakedKey = TweakedKeypair
type TweakedKey = TweakedKeypair
Tweaked key type