Skip to main content

Module adaptor_sig

Module adaptor_sig 

Source
Expand description

Adaptor signatures — pre-signature + completion with witness.

An adaptor signature is a “pre-signature” that can be completed into a valid signature by anyone who knows a secret witness y. Revealing the completed signature also reveals y, enabling atomic swaps and payment channels.

Structs§

AdaptorPreSig
An adaptor pre-signature.
WitnessStatement
A witness statement: Y = y * G.

Functions§

complete
Complete an adaptor pre-signature using the witness y. Produces a valid ECDSA signature.
create_witness
Generate a witness statement from a secret witness.
extract_witness
Extract the witness y from a completed signature and pre-signature. Anyone who sees both can recover y.
pre_sign
Create an adaptor pre-signature. The signer signs with nonce k but publishes R’ = (k + y) * G.
verify_pre_sig
Verify an adaptor pre-signature.