Skip to main content

verify

Function verify 

Source
pub fn verify<F, E, M1, M2, T>(
    commitment: E::GT,
    evaluation: F,
    point: &[F],
    proof: &DoryProof<E::G1, E::G2, E::GT>,
    setup: VerifierSetup<E>,
    transcript: &mut T,
) -> Result<(), DoryError>
where F: Field, E: PairingCurve + Clone, E::G1: Group<Scalar = F>, E::G2: Group<Scalar = F>, E::GT: Group<Scalar = F>, M1: DoryRoutines<E::G1>, M2: DoryRoutines<E::G2>, T: Transcript<Curve = E>,
Expand description

Verify an evaluation proof

Verifies that a committed polynomial evaluates to the claimed value at the given point. The matrix dimensions (nu, sigma) are extracted from the proof.

Works with both square and non-square matrix layouts (nu ≤ sigma), and can verify proofs for homomorphically combined polynomials.

§Parameters

  • commitment: Polynomial commitment (in GT) - can be a combined commitment for homomorphic proofs
  • evaluation: Claimed evaluation result
  • point: Evaluation point (length must equal proof.nu + proof.sigma)
  • proof: Evaluation proof to verify (contains nu and sigma)
  • setup: Verifier setup
  • transcript: Fiat-Shamir transcript

§Returns

Ok(()) if proof is valid, Err(DoryError) otherwise

§Errors

Returns DoryError::InvalidProof if the proof is invalid, or other variants if the input parameters are incorrect (e.g., point dimension mismatch).