ecdsa library
Package ecdsa implements the Elliptic Curve Digital Signature Algorithm, as defined in FIPS 186-3.
This implementation derives the nonce from dartlang random.Secure() temporarily.
The curves are all in elliptic package
Classes
Functions
-
deterministicSign(
PrivateKey priv, List< int> hash) → Signature - deterministicSign generates a deterministic ECDSA signature according to RFC 6979 and BIP 62 https://datatracker.ietf.org/doc/html/rfc6979
-
ethereumSign(
PrivateKey priv, List< int> hash) → EthSignature - ethereumSign generates a deterministic ECDSA signature according to RFC 6979 and BIP 62 https://datatracker.ietf.org/doc/html/rfc6979 https://ethereum.stackexchange.com/questions/65910/is-signatures-from-web3-eth-personal-sign-deterministic-and-a-safe-to-be-used-as Ethereum uses the deterministic (and elliptic-curve) variant of DSA.
-
generateSecret(
BigInt q, BigInt x, List< int> hash) → BigInt -
signature(
PrivateKey priv, List< int> hash) → Signature - signature signs a hash (which should be the result of hashing a larger message) using the private key, priv. If the hash is longer than the bit-length of the private key's curve order, the hash will be truncated to that length. It returns the signature as a pair of integers.
-
verify(
PublicKey pub, List< int> hash, Signature sig) → bool - verify verifies the signature in r, s of hash using the public key, pub. Its return value records whether the signature is valid.