pub struct ZerocheckProver<'a, F, PW, DomainField, W>where
F: Field,
PW: PackedField,
PW::Scalar: From<F> + Into<F> + ExtensionField<DomainField>,
DomainField: Field,
W: AbstractSumcheckWitness<PW>,{ /* private fields */ }
Expand description
A zerocheck protocol prover.
To prove a zerocheck claim, supply a multivariate composite witness. In
some cases it makes sense to do so in an different yet isomorphic field PW (witness packed
field) which may preferable due to superior performance. One example of such operating field
would be BinaryField128bPolyval
, which tends to be much faster than 128-bit tower field on x86
CPUs. The only constraint is that constituent MLEs should have MultilinearPoly impls for PW -
something which is trivially satisfied for MLEs with tower field scalars for claims in tower
field as well.
Prover state is instantiated via new
method, followed by exactly $n\_vars$ execute_round
invocations.
Each of those takes in an optional challenge (None on first round and Some on following rounds) and
evaluation domain. Proof and Evalcheck claim are obtained via finalize
call at the end.
Implementations§
source§impl<'a, F, PW, DomainField, W> ZerocheckProver<'a, F, PW, DomainField, W>where
F: Field,
PW: PackedField,
PW::Scalar: From<F> + Into<F> + ExtensionField<DomainField>,
DomainField: Field,
W: AbstractSumcheckWitness<PW>,
impl<'a, F, PW, DomainField, W> ZerocheckProver<'a, F, PW, DomainField, W>where
F: Field,
PW: PackedField,
PW::Scalar: From<F> + Into<F> + ExtensionField<DomainField>,
DomainField: Field,
W: AbstractSumcheckWitness<PW>,
pub fn claim(&self) -> &ZerocheckClaim<F>
pub fn round_claim(&self) -> &AbstractSumcheckRoundClaim<F>
source§impl<'a, F, PW, DomainField, W> ZerocheckProver<'a, F, PW, DomainField, W>where
F: Field,
PW: PackedExtension<DomainField>,
PW::Scalar: From<F> + Into<F> + ExtensionField<DomainField>,
DomainField: Field,
W: AbstractSumcheckWitness<PW, MultilinearId = OracleId>,
impl<'a, F, PW, DomainField, W> ZerocheckProver<'a, F, PW, DomainField, W>where
F: Field,
PW: PackedExtension<DomainField>,
PW::Scalar: From<F> + Into<F> + ExtensionField<DomainField>,
DomainField: Field,
W: AbstractSumcheckWitness<PW, MultilinearId = OracleId>,
sourcepub fn new(
claim: ZerocheckClaim<F>,
witness: W,
domain: InterpolationDomain<DomainField>,
zerocheck_challenges: &'a [F],
seq_id: usize,
) -> Result<Self, Error>
pub fn new( claim: ZerocheckClaim<F>, witness: W, domain: InterpolationDomain<DomainField>, zerocheck_challenges: &'a [F], seq_id: usize, ) -> Result<Self, Error>
Start a new zerocheck instance with claim in field F
. Witness may be given in
a different (but isomorphic) packed field PW. switchover_fn
closure specifies
switchover round number per multilinear polynomial as a function of its
crate::polynomial::MultilinearPoly::extension_degree
value.
Trait Implementations§
source§impl<'a, F, PW, DomainField, W> Debug for ZerocheckProver<'a, F, PW, DomainField, W>where
F: Field + Debug,
PW: PackedField + Debug,
PW::Scalar: From<F> + Into<F> + ExtensionField<DomainField>,
DomainField: Field + Debug,
W: AbstractSumcheckWitness<PW> + Debug,
impl<'a, F, PW, DomainField, W> Debug for ZerocheckProver<'a, F, PW, DomainField, W>where
F: Field + Debug,
PW: PackedField + Debug,
PW::Scalar: From<F> + Into<F> + ExtensionField<DomainField>,
DomainField: Field + Debug,
W: AbstractSumcheckWitness<PW> + Debug,
Auto Trait Implementations§
impl<'a, F, PW, DomainField, W> Freeze for ZerocheckProver<'a, F, PW, DomainField, W>where
<DomainField as WithUnderlier>::Underlier: Sized,
<PW as PackedField>::Scalar: Sized,
<<PW as PackedField>::Scalar as WithUnderlier>::Underlier: Sized,
<F as WithUnderlier>::Underlier: Sized,
W: Freeze,
F: Freeze,
impl<'a, F, PW, DomainField, W> !RefUnwindSafe for ZerocheckProver<'a, F, PW, DomainField, W>
impl<'a, F, PW, DomainField, W> Send for ZerocheckProver<'a, F, PW, DomainField, W>where
<DomainField as WithUnderlier>::Underlier: Sized,
<PW as PackedField>::Scalar: Sized,
<<PW as PackedField>::Scalar as WithUnderlier>::Underlier: Sized,
<F as WithUnderlier>::Underlier: Sized,
W: Send,
impl<'a, F, PW, DomainField, W> Sync for ZerocheckProver<'a, F, PW, DomainField, W>where
<DomainField as WithUnderlier>::Underlier: Sized,
<PW as PackedField>::Scalar: Sized,
<<PW as PackedField>::Scalar as WithUnderlier>::Underlier: Sized,
<F as WithUnderlier>::Underlier: Sized,
W: Sync,
impl<'a, F, PW, DomainField, W> Unpin for ZerocheckProver<'a, F, PW, DomainField, W>where
<DomainField as WithUnderlier>::Underlier: Sized,
<PW as PackedField>::Scalar: Sized,
<<PW as PackedField>::Scalar as WithUnderlier>::Underlier: Sized,
<F as WithUnderlier>::Underlier: Sized,
W: Unpin,
F: Unpin,
DomainField: Unpin,
PW: Unpin,
impl<'a, F, PW, DomainField, W> !UnwindSafe for ZerocheckProver<'a, F, PW, DomainField, W>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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