Module vrf

Module vrf 

Source
Expand description

Module using the OpenSSL library to offer Verfiable Random Function (VRF) functionality

§References

sk: the private key for the vrf

pk: the public key for the vrf

alpha: the input to be hashed by the vrf

beta: the vrf hash output; beta = VRF_hash(sk, alpha)

pi: the vrf proof; pi = VRF_prove(sk, alpha)

prover: the prover holds the private vrf key ‘sk’ and public vrf key ‘pk’

verifier: the verifier holds the public vrf key ‘pk’

The prover generates beta and pi.

To deterministically obtain the vrf hash output beta directly from the proof pi:

beta = VRF_proof_to_hash(pi)

VRF_hash(sk, alpha) = VRF_proof_to_hash(VRF_prove(sk, alpha))

pi allows a verifier holding the public key pk to verify the correctness of beta as the vrf hash of the input alpha under key pk

§Verfication:

  • VRF_verify(pk, alpha, pi)

§Output if valid:

  • (valid, beta = VRF_proof_to_hash(pi))

§Features

  • Compute VRF proof
  • Verify VRF proof

Structs§

VRF

Enums§

Error
Error types that can be raised
VRFCipherSuite
Cipher suites for VRF