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.
- VrfPublic
Key - VRF public key for verifying proofs.
- VrfSecret
Key - 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.