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 ofSumcheckProverthat 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 pointchallenges: 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:
- The prover computes univariate polynomial coefficients via
execute() - These coefficients are written to the channel
- A challenge is sampled from the channel
- The prover folds the polynomial with this challenge via
fold()
After all rounds, finish() is called to obtain the final multilinear evaluations.