Module vrf

Module vrf 

Source
Expand description

Verifiable Random Functions (VRF) for unpredictable but verifiable randomness.

VRFs are useful for generating unpredictable challenges that can be verified by others. Perfect for bandwidth proof protocols where challenges must be:

  • Unpredictable (to prevent pre-computation attacks)
  • Verifiable (to prove the challenge was legitimate)
  • Deterministic (same input always produces same output)

This implementation uses Ed25519-based VRF (ECVRF-ED25519-SHA512-ELL2).

Structs§

VrfProof
A VRF proof that can be verified by anyone with the public key.
VrfPublicKey
VRF public key for verifying proofs.
VrfSecretKey
VRF secret key for generating proofs.

Enums§

VrfError
VRF-specific errors.

Functions§

generate_bandwidth_challenge
Generate a verifiable random challenge for bandwidth proofs.
verify_bandwidth_challenge
Verify a bandwidth challenge proof.

Type Aliases§

VrfResult