View Source Secp256k1.Schnorr (secp256k1 v0.4.1)
Module implementing Schnorr signatures as defined in BIP340
Summary
Functions
Generate Schnorr signature of a hash (AUX is randomly generated)
Generate Schnorr signature of a hash and specify AUX - NOT RECOMMENDED
Generate Schnorr signature of message (can be hash or custom length message)
Generate Schnorr signature of arbitrary message (AUX is randomly generated)
Generate Schnorr signature of a arbitrary message and specify AUX - NOT RECOMMENDED
Validate Schnorr signature
Functions
@spec sign32(msg_hash :: Secp256k1.hash(), seckey :: Secp256k1.seckey()) :: Secp256k1.schnorr_sig()
Generate Schnorr signature of a hash (AUX is randomly generated)
@spec sign32( msg_hash :: Secp256k1.hash(), seckey :: Secp256k1.seckey(), aux :: <<_::32, _::_*8>> ) :: Secp256k1.schnorr_sig()
Generate Schnorr signature of a hash and specify AUX - NOT RECOMMENDED
@spec sign(message :: binary(), seckey :: Secp256k1.seckey()) :: Secp256k1.schnorr_sig()
Generate Schnorr signature of message (can be hash or custom length message)
@spec sign_custom(message :: binary(), seckey :: Secp256k1.seckey()) :: Secp256k1.schnorr_sig()
Generate Schnorr signature of arbitrary message (AUX is randomly generated)
@spec sign_custom( message :: binary(), seckey :: Secp256k1.seckey(), aux :: <<_::32, _::_*8>> ) :: Secp256k1.schnorr_sig()
Generate Schnorr signature of a arbitrary message and specify AUX - NOT RECOMMENDED
@spec valid?( signature :: Secp256k1.schnorr_sig(), message :: binary(), pubkey :: Secp256k1.xonly_pubkey() ) :: boolean()
Validate Schnorr signature