Skip to main content

prove_single

Function prove_single 

Source
pub fn prove_single<F: Field>(
    prover: impl SumcheckProver<F>,
    channel: &mut impl IPProverChannel<F>,
) -> ProveSingleOutput<F>
Expand description

Executes the sumcheck proving protocol for a single multivariate polynomial.

This function drives the interactive sumcheck protocol, where the prover convinces a verifier that a claimed sum over a multivariate polynomial is correct. The protocol proceeds in rounds, with one round per variable in the polynomial.

§Arguments

  • prover - An implementation of SumcheckProver that computes the polynomial evaluations for each round. The prover must evaluate exactly one composition polynomial per round.
  • channel - The channel for sending prover messages and sampling challenges.

§Returns

Returns ProveSingleOutput containing:

  • multilinear_evals: Final evaluations of the multilinear polynomials at the challenge point
  • challenges: The verifier challenges used in each round

§Panics

Panics if the prover returns more than one composition polynomial from its execute() method.

§Protocol Flow

For each of the n_vars rounds:

  1. The prover computes univariate polynomial coefficients via execute()
  2. These coefficients are written to the channel
  3. A challenge is sampled from the channel
  4. The prover folds the polynomial with this challenge via fold()

After all rounds, finish() is called to obtain the final multilinear evaluations.