pub struct MultiDegreeSumcheck<C>(/* private fields */);Implementations§
Source§impl<C> MultiDegreeSumcheck<C>where
C: BaseFieldConfig + ProjectPrimitiveIntegersWithConfig,
C::Integer: ConstTranscribable,
impl<C> MultiDegreeSumcheck<C>where
C: BaseFieldConfig + ProjectPrimitiveIntegersWithConfig,
C::Integer: ConstTranscribable,
Sourcepub fn prove_as_subprotocol(
transcript: &mut impl Transcript,
families: Vec<(Vec<MultiDegreeSumcheckGroup<C>>, &C)>,
num_vars: usize,
q_star_cfg: &C,
) -> Vec<(MultiDegreeSumcheckProof<C::Element>, Vec<SumcheckProverState<C>>)>
pub fn prove_as_subprotocol( transcript: &mut impl Transcript, families: Vec<(Vec<MultiDegreeSumcheckGroup<C>>, &C)>, num_vars: usize, q_star_cfg: &C, ) -> Vec<(MultiDegreeSumcheckProof<C::Element>, Vec<SumcheckProverState<C>>)>
Multi-degree sumcheck prover.
Drives one or more families of multi-degree sumchecks in lockstep
(interleaved), sharing one per-round verifier challenge across all
families and all groups within each family. Each family carries
its own degree groups in its own field config (i.e. a different
prime); the shared challenge is sampled once per round as an integer
in $[0, q^)$ via q_star_cfg, then lifted into each family’s field
via cfg.project (a no-op type cast when $q^ \le q_i$).
Proves, for every family $f$ and every group $g$ in that family:
$$ \sum_{x \in {0, 1}^{\text{num\vars}}} G{f, g}(x) = \text{claimed\sum}{f, g} $$
where $G_{f, g}(x) = \text{comb\fn}{f, g}(\text{mles}_{f, g}(x))$.
Designed to be used as a subprotocol within a larger system: takes
the FS transcript (transcript) as input and returns the internal
ProverState alongside the sumcheck proof for every family. Claimed
sums are derived by the prover during the first round.
The single-family case (families.len() == 1) is the natural
degenerate form; pass q_star_cfg = &families[0].1 and the lift is
the identity.
§Arguments
transcript: Fiat-Shamir transcript.families: One entry per family:(groups, F::Config). Each family contributes one or more degree groups that share that family’sF::Config.num_vars: Number of variables (must be consistent across all groups in all families).q_star_cfg: Field configuration used for transcript metadata absorbs and per-round challenge squeezes. This is the smallest of the per-family moduli (so every family can losslessly cast the shared integer into its own field).
§Returns
One (proof, prover_states) tuple per family, in the order families
were provided.
§Panics
- If
num_vars == 0. - If
familiesis empty or any family has no groups.
Sourcepub fn verify_as_subprotocol(
transcript: &mut impl Transcript,
num_vars: usize,
proofs: &[(&MultiDegreeSumcheckProof<C::Element>, &C)],
q_star_cfg: &C,
) -> Result<Vec<MultiDegreeSubClaims<C::Element>>, SumCheckError<C::Element>>
pub fn verify_as_subprotocol( transcript: &mut impl Transcript, num_vars: usize, proofs: &[(&MultiDegreeSumcheckProof<C::Element>, &C)], q_star_cfg: &C, ) -> Result<Vec<MultiDegreeSubClaims<C::Element>>, SumCheckError<C::Element>>
Multi-degree sumcheck verifier.
Mirror of [prove_as_subprotocol]: drives one or more families of
multi-degree sumchecks in lockstep, sharing one per-round challenge
sampled in $[0, q^*)$ via q_star_cfg and lifted into each family’s
field. Verifies, for every family $f$ and every group $g$:
$$ \sum_{x \in {0, 1}^{\text{num\vars}}} G{f, g}(x) = \text{claimed\sum}{f, g} $$
where $G_{f, g}(x) = \text{comb\fn}{f, g}(\text{mles}_{f, g}(x))$.
Returns one MultiDegreeSubClaims<F> per family: shared evaluation
point r* (in that family’s field) and per-group expected
evaluations. The caller must verify each family’s MLE combination at
its r* equals its expected evaluation.
The single-family case (proofs.len() == 1) is the natural degenerate
form; pass q_star_cfg = &proofs[0].1.
§Arguments
transcript: Fiat-Shamir transcript (must match prover state at the start of the sumcheck).num_vars: Number of variables (sumcheck rounds).proofs: One(proof, F::Config)per family.q_star_cfg: Field configuration used for transcript metadata absorbs and per-round challenge squeezes (mirror of the prover).
§Panics
- If
num_vars == 0. - If
proofsis empty or any family’s proof has no groups.
Auto Trait Implementations§
impl<C> Freeze for MultiDegreeSumcheck<C>
impl<C> RefUnwindSafe for MultiDegreeSumcheck<C>where
C: RefUnwindSafe,
impl<C> Send for MultiDegreeSumcheck<C>where
C: Send,
impl<C> Sync for MultiDegreeSumcheck<C>where
C: Sync,
impl<C> Unpin for MultiDegreeSumcheck<C>where
C: Unpin,
impl<C> UnsafeUnpin for MultiDegreeSumcheck<C>
impl<C> UnwindSafe for MultiDegreeSumcheck<C>where
C: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more