Secp256k1
Functions
Convert a compact ECDSA signature (64 bytes) to a der-encoded ECDSA signature.
Recover a public key from an ECDSA signature.
Aggregate public nonces from all participants of a signing session.
Generate a secret nonce to be used in a musig2 signing session. This nonce must never be persisted or reused across signing sessions. All optional arguments exist to enrich the quality of the randomness used, which is critical for security.
Alternative counter-based method for generating nonce. This nonce must never be persisted or reused across signing sessions. All optional arguments exist to enrich the quality of the randomness used, which is critical for security.
Create a signing session context based on the public information from all participants.
Check that a secret nonce was generated with a public key that matches the private key used for signing.
Aggregate partial signatures from all participants into a single schnorr signature. If some of the partial signatures are invalid, this function will return an invalid aggregated signature without raising an error. It is recommended to use musigPartialSigVerify to verify partial signatures first.
Aggregate public keys from all participants of a signing session.
Tweak the aggregated public key of a signing session.
Tweak the aggregated public key of a signing session, treating it as an x-only public key (e.g. when using taproot).
Negate the given private key.
Tweak a private key by adding tweak to it.
Tweak a private key by multiplying it by a tweak.
Add a number of public keys together. Returns the uncompressed public key (65 bytes).
Serialize a public key to compact form (33 bytes).
Get the public key corresponding to the given private key. Returns the uncompressed public key (65 bytes).
Negate the given public key. Returns the uncompressed public key (65 bytes).
Parse a serialized public key. Returns the uncompressed public key (65 bytes).
Tweak a public key by adding tweak times the generator to it. Returns the uncompressed public key (65 bytes).
Tweak a public key by multiplying it by a tweak value. Returns the uncompressed public key (65 bytes).
Verify the validity of a private key.
Convert an ECDSA signature to a normalized lower-S form (bitcoin standardness rule). Returns the normalized signature and a boolean set to true if the input signature was not normalized.
Create a Schnorr signature.
Verify a Schnorr signature.