schnorr

package
v0.0.0-...-aee6f80 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2016 License: MIT, MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// The number of bytes needed to represent an EC Schnorr signature.  32 bytes
	// for SHA256 digest + 32 bytes for EC coefficient
	SignatureSize = 32 + 32
)

Variables

View Source
var (
	// ErrECSchnorrVerify signifies that the signature failed to verify with the
	// given public key.
	ErrECSchnorrVerify = errors.New("Signature does not belong to public key")
)

Functions

func Verify

func Verify(sig *Signature, pk *eckey.PublicKey, hash []byte) error

Verify determines whether or not the signature is on the given hash and belongs to the public key.

Types

type Signature

type Signature [SignatureSize]byte

Signature is used to prove ownership of a secret key.

func Sign

func Sign(sk *eckey.SecretKey, hash []byte) (*Signature, error)

Sign creates a signature on the hash under the given secret key.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL