pub struct MultilinearPC<E: Pairing> { /* private fields */ }
Expand description
Polynomial Commitment Scheme on multilinear extensions.
Implementations§
Source§impl<E: Pairing> MultilinearPC<E>
impl<E: Pairing> MultilinearPC<E>
Sourcepub fn trim(
params: &UniversalParams<E>,
supported_num_vars: usize,
) -> (CommitterKey<E>, VerifierKey<E>)
pub fn trim( params: &UniversalParams<E>, supported_num_vars: usize, ) -> (CommitterKey<E>, VerifierKey<E>)
Trim the universal parameters to specialize the public parameters
for multilinear polynomials to the given supported_num_vars
, and returns committer key and verifier key.
supported_num_vars
should be in range 1..=params.num_vars
Sourcepub fn commit(
ck: &CommitterKey<E>,
polynomial: &impl MultilinearExtension<E::ScalarField>,
) -> Commitment<E>
pub fn commit( ck: &CommitterKey<E>, polynomial: &impl MultilinearExtension<E::ScalarField>, ) -> Commitment<E>
commit
Sourcepub fn open(
ck: &CommitterKey<E>,
polynomial: &impl MultilinearExtension<E::ScalarField>,
point: &[E::ScalarField],
) -> Proof<E>
pub fn open( ck: &CommitterKey<E>, polynomial: &impl MultilinearExtension<E::ScalarField>, point: &[E::ScalarField], ) -> Proof<E>
On input a polynomial p
and a point point
, outputs a proof for the same.
Sourcepub fn check<'a>(
vk: &VerifierKey<E>,
commitment: &Commitment<E>,
point: &[E::ScalarField],
value: E::ScalarField,
proof: &Proof<E>,
) -> bool
pub fn check<'a>( vk: &VerifierKey<E>, commitment: &Commitment<E>, point: &[E::ScalarField], value: E::ScalarField, proof: &Proof<E>, ) -> bool
Verifies that value
is the evaluation at x
of the polynomial
committed inside comm
.
Auto Trait Implementations§
impl<E> Freeze for MultilinearPC<E>
impl<E> RefUnwindSafe for MultilinearPC<E>where
E: RefUnwindSafe,
impl<E> Send for MultilinearPC<E>
impl<E> Sync for MultilinearPC<E>
impl<E> Unpin for MultilinearPC<E>where
E: Unpin,
impl<E> UnwindSafe for MultilinearPC<E>where
E: 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
Mutably borrows from an owned value. Read more
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>
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 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>
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