vdf_verify

Function vdf_verify 

Source
pub fn vdf_verify(
    params: &VdfParams,
    input: &[u8],
    output: &VdfOutput,
    proof: &VdfProof,
) -> VdfResult<()>
Expand description

Verify a VDF proof.

Verification is much faster than computation as it only checks the checkpoints rather than all iterations.

§Arguments

  • params - VDF parameters
  • input - Original input data
  • output - Claimed output
  • proof - Proof of computation

§Example

use chie_crypto::vdf_delay::{VdfParams, vdf_compute, vdf_verify};

let params = VdfParams::new(10000);
let input = b"challenge_data";
let (output, proof) = vdf_compute(&params, input);

assert!(vdf_verify(&params, input, &output, &proof).is_ok());