pub type UntweakedKeyPair = KeyPair;
Expand description

Untweaked BIP-340 key pair

Aliased Type§

struct UntweakedKeyPair(/* private fields */);

Trait Implementations§

source§

impl TapTweak for UntweakedKeyPair

source§

fn tap_tweak<C: Verification>( self, secp: &Secp256k1<C>, merkle_root: Option<TapBranchHash> ) -> 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

Tweaked key type with optional auxiliary information
§

type TweakedKey = TweakedKeyPair

Tweaked key type
source§

fn dangerous_assume_tweaked(self) -> TweakedKeyPair