Documentation
¶
Overview ¶
Package vrf defines the interface to a verifiable random function.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrivateKey ¶
type PrivateKey interface {
// Evaluate returns the output of H(f_k(m)) and its proof.
Evaluate(m []byte) (index [32]byte, proof []byte)
// Public returns the corresponding public key.
Public() crypto.PublicKey
}
PrivateKey supports evaluating the VRF function.
type PublicKey ¶
type PublicKey interface {
// ProofToHash verifies the NP-proof supplied by Proof and outputs Index.
ProofToHash(m, proof []byte) (index [32]byte, err error)
// Serialize serialize the public key into bytes
Serialize() []byte
// Deserialize de-serialize bytes into public key
Deserialize([]byte)
}
PublicKey supports verifying output from the VRF function.
Click to show internal directories.
Click to hide internal directories.