Skip to main content

Crate solana_ecvrf

Crate solana_ecvrf 

Source
Expand description

ECVRF-EDWARDS25519-SHA512-TAI (RFC 9381) verification for Solana programs.

A VRF proof is a signature whose output is also a pseudorandom 64-byte value that is unique per (key, input): the prover cannot grind for a favourable output, which is what makes it usable as on-chain randomness.

On target_os = "solana" every primitive is a syscall: sol_curve_* for the group arithmetic and sol_sha512 (SIMD-0512) for hashing. Nothing cryptographic runs in software.

Structs§

Proof
pi_string = Gamma || c || s.
PublicKey
An Ed25519 public key Y = x·B, compressed per RFC 8032 §5.1.2. The same bytes as the Solana address of the proving keypair.

Enums§

Error

Constants§

OUTPUT_LENGTH
PROOF_LENGTH
ptLen + cLen + qLen = 32 + 16 + 32.
PUBLIC_KEY_LENGTH
SUITE
suite_string for ECVRF-EDWARDS25519-SHA512-TAI, RFC 9381 §5.5.

Type Aliases§

Output
VRF hash output beta_string.