Documentation
¶
Index ¶
- Variables
- func AggregateSignatures(privateKeys []*big.Int, message [32]byte) ([64]byte, error)
- func BatchVerify(publicKeys [][33]byte, messages [][32]byte, signatures [][64]byte) (bool, error)
- func GenerateRFC6979Nonce(private []byte, msg []byte) *big.Int
- func Marshal(curve elliptic.Curve, x, y *big.Int) []byte
- func Sign(privateKey *big.Int, message [32]byte) ([64]byte, error)
- func Unmarshal(curve elliptic.Curve, data []byte) (x, y *big.Int)
- func Verify(publicKey [33]byte, message [32]byte, signature [64]byte) (bool, error)
- func VersaHash(data []byte, nonce []byte, extraNonce []byte) []byte
Constants ¶
This section is empty.
Variables ¶
var ( // Curve is a KoblitzCurve which implements secp256k1. Curve = btcec.S256() // One holds a big integer of 1 One = new(big.Int).SetInt64(1) // Two holds a big integer of 2 Two = new(big.Int).SetInt64(2) // Three holds a big integer of 3 Three = new(big.Int).SetInt64(3) // Four holds a big integer of 4 Four = new(big.Int).SetInt64(4) // Seven holds a big integer of 7 Seven = new(big.Int).SetInt64(7) // N2 holds a big integer of N-2 N2 = new(big.Int).Sub(Curve.N, Two) )
Functions ¶
func AggregateSignatures ¶
AggregateSignatures aggregates multiple signatures of different private keys over the same message into a single 64 byte signature.
func BatchVerify ¶
BatchVerify verifies a list of 64 byte signatures of 32 byte messages against the public keys. Returns an error if verification fails. https://github.com/sipa/bips/blob/bip-schnorr/bip-schnorr.mediawiki#batch-verification
func Marshal ¶
Marshal converts a point into the form specified in section 2.3.3 of the SEC 1 standard.
func Sign ¶
Sign a 32 byte message with the private key, returning a 64 byte signature. https://github.com/sipa/bips/blob/bip-schnorr/bip-schnorr.mediawiki#signing
func Unmarshal ¶
Unmarshal converts a point, serialised by Marshal, into an x, y pair. On error, x = nil.
func Verify ¶
Verify a 64 byte 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
Types ¶
This section is empty.