package
1.2.17
Repository: https://github.com/hubmakerlabs/replicatr.git
Documentation: pkg.go.dev

# Functions

CustomNonce allows users to pass in a custom set of auxData that's used as input randomness to generate the nonce used during signing.
FastSign forces signing to skip the extra verification step at the end.
NewSignature instantiates a new signature given some r and s values.
ParsePubKey parses a public key for a koblitz curve from a bytestring into a btcec.Publickey, verifying that it is valid.
ParseSignature parses a signature according to the BIP-340 specification and enforces the following additional restrictions specific to secp256k1: - The r component must be in the valid range for secp256k1 field elements - The s component must be in the valid range for secp256k1 scalars.
SerializePubKey serializes a public key as specified by BIP 340.
Sign generates an BIP-340 signature over the secp256k1 curve for the provided hash (which should be the result of hashing a larger message) using the given secret key.

# Constants

ErrInvalidHashLen indicates that the input hash to sign or verify is not the required length.
These constants are used to identify a specific RuleError.
ErrPubKeyNotOnCurve indicates that a point was not on the given elliptic curve.
ErrSchnorrHashValue indicates that the hash of (R || m) was too large and so a new nonce should be used.
ErrSecretKeyIsZero indicates an attempt was made to sign a message with a secret key that is equal to zero.
ErrSigRNotOnCurve indicates that the calculated or given point R for some signature was not on the curve.
ErrSigRTooBig is returned when a signature has r with a value that is greater than or equal to the prime of the field underlying the group.
ErrSigRYIsOdd indicates that the calculated Y value of R was odd.
ErrSigSTooBig is returned when a signature has s with a value that is greater than or equal to the group order.
ErrSigTooLong is returned when a signature that should be a Schnorr signature is too long.
ErrSigTooShort is returned when a signature that should be a Schnorr signature is too short.
ErrUnequalRValues indicates that the calculated point R for some signature was not the same as the given R value for the signature.
No description provided by the author
SignatureSize is the size of an encoded Schnorr signature.

# Structs

Error identifies an error related to a schnorr signature.
Signature is a type representing a Schnorr signature.

# Type aliases

ErrorKind identifies a kind of error.
SignOption is a functional option arguemnt that allows callers to modify the way we generate BIP-340 schnorr signatues.