Package ethschnorr implements a version of the Schnorr signature which is //////////////////////////////////////////////////////////////////////////////
XXX: Do not use in production until this code has been audited.
////////////////////////////////////////////////////////////////////////////// cheap to verify on-chain.
See https://en.wikipedia.org/wiki/Schnorr_signature For vanilla Schnorr.
Since we are targeting ethereum specifically, there is no need to abstract away the group operations, as original kyber Schnorr code does. Thus, these functions only work with secp256k1 objects, even though they are expressed in terms of the abstract kyber Group interfaces.
This code is largely based on EPFL-DEDIS's go.dedis.ch/kyber/sign/schnorr
ChallengeHash returns the value the signer must use to demonstrate knowledge of the secret key
NB: for parity with the on-chain hash, it's important that public and r marshall to the big-endian x ordinate, followed by a byte which is 0 if the y ordinate is even, 1 if it's odd. See evm/contracts/SchnorrSECP256K1.sol and evm/test/schnorr_test.js
ValidSignature(s) is true iff s.Signature represents an element of secp256k1
Verify verifies the given Schnorr signature. It returns true iff the signature is valid.
type Signature = *signature
Signature is a representation of the Schnorr signature generated and verified by this library.
NewSignature allocates space for a Signature, and returns it
Sign creates a signature from a msg and a private key. Verify with the function Verify, or on-chain with SchnorrSECP256K1.sol.
The go get command cannot install this package because of the following issues: