schnorr library Null safety

Package schnorr implements the Schnorr signature, which is a digital signature produced by the Schnorr signature algorithm that was described by Claus Schnorr

The code is based upon the initial proposal of Pieter Wuille when it didn't have a BIP number assigned yet.

Support all curves in elliptic package




aggregateSign(List<PrivateKey> privateKeys, List<int> message) Signature
batchVerify(List<PublicKey> publicKeys, List<List<int>> messages, List<Signature> signatures) bool
combinePublicKeys(List<PublicKey> pubs) PublicKey
deterministicSign(PrivateKey priv, List<int> hash) Signature
deterministicSign 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 a signature of a 32 byte message against the public key. Returns an error if verification fails.

Exceptions / Errors