Module compute

Module compute 

Source
Expand description

Functions to perform various computations needed for v1 and v2

Functionsยง

aggregate_nonce
Compute the aggregate nonce
binding
Compute a binding value from the party ID, public nonces, and signed message using XMD-based expansion.
binding_compressed
Compute a binding value from the party ID, public nonces, and signed message using XMD-based expansion.
challenge
Compute the schnorr challenge from the public key, aggregated commitments, and the signed message using XMD-based expansion.
id
Compute a one-based Scalar from a zero-based integer
intermediate
Compute the intermediate values used in both the parties and the aggregator
lambda
Compute the Lagrange interpolation value
merkle_root
Create a taproot style merkle root from the serialized script data
point
Get a Point from an ecdsa::PublicKey
poly
Evaluate the public polynomial f at scalar x using multi-exponentiation
tagged_hash
Create a BIP340 compliant tagged hash by double hashing the tag
tweak
Create a BIP341 compliant taproot tweak from a public key and merkle root
tweaked_public_key
Create a BIP341 compliant taproot tweak from a public key and merkle root
tweaked_public_key_from_tweak
Create a BIP341 compliant taproot tweak from a public key and a pre-calculated tweak