Documentation ¶
Overview ¶
Package secp256k1 implements a verifiable random function using curve secp256k1.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidVRF err ErrInvalidVRF = errors.New("invalid VRF proof") )
Functions ¶
func GenerateKey ¶
func GenerateKey() (vrfp.PrivateKey, vrfp.PublicKey)
GenerateKey generates a fresh keypair for this VRF
Types ¶
type PrivateKey ¶
type PrivateKey struct {
*ecdsa.PrivateKey
}
PrivateKey holds a private VRF key.
func (PrivateKey) Evaluate ¶
func (k PrivateKey) Evaluate(m []byte) (index [32]byte, proof []byte)
Evaluate returns the verifiable unpredictable function evaluated at m
func (PrivateKey) Public ¶
func (k PrivateKey) Public() crypto.PublicKey
Public returns the corresponding public key as bytes.
Click to show internal directories.
Click to hide internal directories.