Skip to main content

MultiDegreeSumcheck

Struct MultiDegreeSumcheck 

Source
pub struct MultiDegreeSumcheck<C>(/* private fields */);

Implementations§

Source§

impl<C> MultiDegreeSumcheck<C>
where C: BaseFieldConfig + ProjectPrimitiveIntegersWithConfig, C::Integer: ConstTranscribable,

Source

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’s F::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 families is empty or any family has no groups.
Source

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 proofs is 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.