Documentation ¶
Overview ¶
Package vrf implements "Verifiable Random Functions (VRFs)" as specified in RFC 9381, providing the ECVRF-EDWARDS25519-SHA512-ELL2 suite.
Index ¶
- Constants
- func ProofToHash(piString []byte) ([]byte, error)
- func Prove(sk ed25519.PrivateKey, alphaString []byte) []byte
- func Prove_v10(sk ed25519.PrivateKey, alphaString []byte) []byte
- func Verify(pk ed25519.PublicKey, piString, alphaString []byte) (bool, []byte)
- func Verify_v10(pk ed25519.PublicKey, piString, alphaString []byte) (bool, []byte)
Constants ¶
View Source
const ( // ProofSize is the size, in bytes, of proofs as used in this package. ProofSize = 80 // OutputSize is the size, in bytes, of outputs as used in this package. OutputSize = 64 )
Variables ¶
This section is empty.
Functions ¶
func ProofToHash ¶
ProofToHash implements ECVRF_proof_to_hash for the suite ECVRF-EDWARDS25519-SHA512-ELL2.
ECVRF_proof_to_hash should be run only on pi_string that is known to have been produced by ECVRF_prove, or from within ECVRF_verify.
func Prove ¶
func Prove(sk ed25519.PrivateKey, alphaString []byte) []byte
Prove implements ECVRF_prove for the suite ECVRF-EDWARDS25519-SHA512-ELL2.
func Prove_v10 ¶
func Prove_v10(sk ed25519.PrivateKey, alphaString []byte) []byte
Prove_v10 is Prove but using the draft v7 to v10 semantics.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.