schnorr library
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
Classes
Functions
-
aggregateSign(
List< PrivateKey> privateKeys, List<int> message) → Signature -
batchVerify(
List< PublicKey> publicKeys, List<List< messages, List<int> >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. https://github.com/sipa/bips/blob/bip-schnorr/bip-schnorr.mediawiki#verification