Skip to main content

verify

Function verify 

Source
pub fn verify<F, C>(
    log_segment_words: usize,
    operand_claims: &[C::Elem],
    channel: &mut C,
) -> Result<VerifyOutput<C::Elem>, Error>
Expand description

Verifies the shift protocol with a single sumcheck.

§Protocol Overview

  1. Sampling Phase: Samples the challenge vector whose equality indicator batches the operand columns’ evaluation claims.
  2. Sumcheck: Verifies the batched evaluation claim over all SHIFT_LOG_VARS + log_word_count variables of the claim, degree 2 in each. A shifted value index names two shifts applied in sequence, and the rounds peel them from the output end inward: the outer shift’s variant and amount, then the inner shift’s, then the bit position within a word, then the intermediate word’s bit index where the two shift indicators meet, then the output bit index, and last the word index — the order the prover’s phases need.
  3. Challenge Splitting: Splits the challenge point into its per-slot shift runs, its three bit-index runs and r_y
  4. Monster Multilinear Verification: Checks that the claim the sumcheck reduced to matches the product of its five factors, for AND constraints (bitand), IMUL constraints (intmul) and BMUL constraints (binmul)

§Parameters

  • log_segment_words: The word-index variables each value segment spans, the wider of the two
  • operand_claims: One evaluation per operand column, in the flat column order WiringInfo lays the terms out in. The point they are claimed at is check_eval’s to read
  • channel: Interactive channel for challenge sampling and message reading

§Returns

Returns VerifyOutput containing the final challenges and witness evaluation, or an error if verification fails.

§Errors

  • Returns Error::VerificationFailure if monster multilinear evaluations don’t match expected values
  • Propagates sumcheck verification errors