module Secp256k1::Signature
Overview
implements ecdsa signature generation and verification for secp256k1 ref: https://cryptobook.nakov.com/digital-signatures/ecdsa-sign-verify-messages
Defined in:
signature.crClass Method Summary
-
.sign(msg : String, priv : BigInt)
the ecdsa signing algorithm (rfc 6979) takes as input a message
msg
and a private keypriv
. -
.verify(msg : String, sig : ECDSA_Signature, pub : EC_Point)
the algorithm to verify an ecdsa signature takes as input the signed message
msg
and the signature(r, s)
produced from self.sign and the public keypub
, corresponding to the signer's private key. -
.verify_hash(hash : BigInt, sig : ECDSA_Signature, pub : EC_Point)
same as self.verify, just using the hashed message directly
Class Method Detail
the ecdsa signing algorithm (rfc 6979) takes as input a message msg
and a private key priv
. It produces as output a signature, which
consists of pair of integers (r, s)
.
the algorithm to verify an ecdsa signature takes as input the signed message msg
and the signature (r, s)
produced from self.sign and the public key pub
,
corresponding to the signer's private key. The result is boolean.
same as self.verify, just using the hashed message directly