Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidVRF occurs when the VRF does not validate. ErrInvalidVRF = errors.New("invalid VRF proof") )
Functions ¶
func NewVRFSigner ¶
func NewVRFSigner(seck *bls.SecretKey) vrf.PrivateKey
NewVRFSigner creates a signer object from a private key.
Types ¶
type PrivateKey ¶
PrivateKey holds a private VRF key.
func (*PrivateKey) Evaluate ¶
func (k *PrivateKey) Evaluate(alpha []byte) ([32]byte, []byte)
Evaluate returns the verifiable unpredictable function evaluated using alpha verifiable unpredictable function using BLS reference: https://tools.ietf.org/html/draft-goldbe-vrf-01 properties of VRF-BLS: 1) Full Uniqueness : satisfied, it is deterministic 2) Full Pseudorandomness : satisfied through sha256 3) Full Collison Resistance : satisfied through sha256
func (*PrivateKey) Public ¶
func (k *PrivateKey) Public() crypto.PublicKey
Public returns the corresponding public key as bytes.
type PublicKey ¶
PublicKey holds a public VRF key.
func (*PublicKey) Deserialize ¶
Deserialize de-serialize bytes into public key
func (*PublicKey) ProofToHash ¶
ProofToHash asserts that proof is correct for input alpha and output VRF hash
Click to show internal directories.
Click to hide internal directories.