pub struct MarlinPST13<E: Pairing, P: DenseMVPolynomial<E::ScalarField>> { /* private fields */ }Expand description
Multivariate polynomial commitment based on the construction in [PST13] with batching and (optional) hiding property inspired by the univariate scheme in [CHMMVW20, “Marlin”]
Trait Implementations§
Source§impl<E, P> PolynomialCommitment<<E as Pairing>::ScalarField, P> for MarlinPST13<E, P>where
E: Pairing,
P: DenseMVPolynomial<E::ScalarField> + Sync,
P::Point: Index<usize, Output = E::ScalarField>,
impl<E, P> PolynomialCommitment<<E as Pairing>::ScalarField, P> for MarlinPST13<E, P>where
E: Pairing,
P: DenseMVPolynomial<E::ScalarField> + Sync,
P::Point: Index<usize, Output = E::ScalarField>,
Source§fn setup<R: RngCore>(
max_degree: usize,
num_vars: Option<usize>,
rng: &mut R,
) -> Result<UniversalParams<E, P>, Error>
fn setup<R: RngCore>( max_degree: usize, num_vars: Option<usize>, rng: &mut R, ) -> Result<UniversalParams<E, P>, Error>
Constructs public parameters when given as input the maximum degree max_degree
and number of variables num_vars for the polynomial commitment scheme.
Source§fn trim(
pp: &Self::UniversalParams,
supported_degree: usize,
_supported_hiding_bound: usize,
_enforced_degree_bounds: Option<&[usize]>,
) -> Result<(Self::CommitterKey, Self::VerifierKey), Self::Error>
fn trim( pp: &Self::UniversalParams, supported_degree: usize, _supported_hiding_bound: usize, _enforced_degree_bounds: Option<&[usize]>, ) -> Result<(Self::CommitterKey, Self::VerifierKey), Self::Error>
Specializes the public parameters for polynomials up to the given supported_degree
TODO: Add the ability to trim the number of variables TODO: Update for support_hiding_bound
Source§fn commit<'a>(
ck: &Self::CommitterKey,
polynomials: impl IntoIterator<Item = &'a LabeledPolynomial<E::ScalarField, P>>,
rng: Option<&mut dyn RngCore>,
) -> Result<(Vec<LabeledCommitment<Self::Commitment>>, Vec<Self::CommitmentState>), Self::Error>where
P: 'a,
fn commit<'a>(
ck: &Self::CommitterKey,
polynomials: impl IntoIterator<Item = &'a LabeledPolynomial<E::ScalarField, P>>,
rng: Option<&mut dyn RngCore>,
) -> Result<(Vec<LabeledCommitment<Self::Commitment>>, Vec<Self::CommitmentState>), Self::Error>where
P: 'a,
Outputs a commitments to polynomials.
Source§fn open<'a>(
ck: &Self::CommitterKey,
labeled_polynomials: impl IntoIterator<Item = &'a LabeledPolynomial<E::ScalarField, P>>,
_commitments: impl IntoIterator<Item = &'a LabeledCommitment<Self::Commitment>>,
point: &P::Point,
sponge: &mut impl CryptographicSponge,
states: impl IntoIterator<Item = &'a Self::CommitmentState>,
_rng: Option<&mut dyn RngCore>,
) -> Result<Self::Proof, Self::Error>where
P: 'a,
Self::CommitmentState: 'a,
Self::Commitment: 'a,
fn open<'a>(
ck: &Self::CommitterKey,
labeled_polynomials: impl IntoIterator<Item = &'a LabeledPolynomial<E::ScalarField, P>>,
_commitments: impl IntoIterator<Item = &'a LabeledCommitment<Self::Commitment>>,
point: &P::Point,
sponge: &mut impl CryptographicSponge,
states: impl IntoIterator<Item = &'a Self::CommitmentState>,
_rng: Option<&mut dyn RngCore>,
) -> Result<Self::Proof, Self::Error>where
P: 'a,
Self::CommitmentState: 'a,
Self::Commitment: 'a,
On input a polynomial p and a point point, outputs a proof for the same.
Source§fn check<'a>(
vk: &Self::VerifierKey,
commitments: impl IntoIterator<Item = &'a LabeledCommitment<Self::Commitment>>,
point: &'a P::Point,
values: impl IntoIterator<Item = E::ScalarField>,
proof: &Self::Proof,
sponge: &mut impl CryptographicSponge,
_rng: Option<&mut dyn RngCore>,
) -> Result<bool, Self::Error>where
Self::Commitment: 'a,
fn check<'a>(
vk: &Self::VerifierKey,
commitments: impl IntoIterator<Item = &'a LabeledCommitment<Self::Commitment>>,
point: &'a P::Point,
values: impl IntoIterator<Item = E::ScalarField>,
proof: &Self::Proof,
sponge: &mut impl CryptographicSponge,
_rng: Option<&mut dyn RngCore>,
) -> Result<bool, Self::Error>where
Self::Commitment: 'a,
Verifies that value is the evaluation at x of the polynomial
committed inside comm.
Source§fn check_combinations<'a, R: RngCore>(
vk: &Self::VerifierKey,
linear_combinations: impl IntoIterator<Item = &'a LinearCombination<E::ScalarField>>,
commitments: impl IntoIterator<Item = &'a LabeledCommitment<Self::Commitment>>,
eqn_query_set: &QuerySet<P::Point>,
eqn_evaluations: &Evaluations<P::Point, E::ScalarField>,
proof: &BatchLCProof<E::ScalarField, Self::BatchProof>,
sponge: &mut impl CryptographicSponge,
rng: &mut R,
) -> Result<bool, Self::Error>where
Self::Commitment: 'a,
fn check_combinations<'a, R: RngCore>(
vk: &Self::VerifierKey,
linear_combinations: impl IntoIterator<Item = &'a LinearCombination<E::ScalarField>>,
commitments: impl IntoIterator<Item = &'a LabeledCommitment<Self::Commitment>>,
eqn_query_set: &QuerySet<P::Point>,
eqn_evaluations: &Evaluations<P::Point, E::ScalarField>,
proof: &BatchLCProof<E::ScalarField, Self::BatchProof>,
sponge: &mut impl CryptographicSponge,
rng: &mut R,
) -> Result<bool, Self::Error>where
Self::Commitment: 'a,
Checks that values are the true evaluations at query_set of the polynomials
committed in labeled_commitments.
Source§type UniversalParams = UniversalParams<E, P>
type UniversalParams = UniversalParams<E, P>
Self::CommitterKey and Self::VerifierKey by Self::trim.Source§type CommitterKey = CommitterKey<E, P>
type CommitterKey = CommitterKey<E, P>
Source§type VerifierKey = VerifierKey<E>
type VerifierKey = VerifierKey<E>
Source§type Commitment = Commitment<E>
type Commitment = Commitment<E>
Source§type CommitmentState = Randomness<E, P>
type CommitmentState = Randomness<E, P>
commit phase.
It contains information that can be reused by the committer
during the open phase, such as the commitment randomness.
Not to be shared with the verifier.Source§type BatchProof = Vec<<MarlinPST13<E, P> as PolynomialCommitment<<E as Pairing>::ScalarField, P>>::Proof>
type BatchProof = Vec<<MarlinPST13<E, P> as PolynomialCommitment<<E as Pairing>::ScalarField, P>>::Proof>
Source§fn batch_check<'a, R: RngCore>(
vk: &Self::VerifierKey,
commitments: impl IntoIterator<Item = &'a LabeledCommitment<Self::Commitment>>,
query_set: &QuerySet<P::Point>,
values: &Evaluations<P::Point, E::ScalarField>,
proof: &Self::BatchProof,
sponge: &mut impl CryptographicSponge,
rng: &mut R,
) -> Result<bool, Self::Error>where
Self::Commitment: 'a,
fn batch_check<'a, R: RngCore>(
vk: &Self::VerifierKey,
commitments: impl IntoIterator<Item = &'a LabeledCommitment<Self::Commitment>>,
query_set: &QuerySet<P::Point>,
values: &Evaluations<P::Point, E::ScalarField>,
proof: &Self::BatchProof,
sponge: &mut impl CryptographicSponge,
rng: &mut R,
) -> Result<bool, Self::Error>where
Self::Commitment: 'a,
Source§fn open_combinations<'a>(
ck: &Self::CommitterKey,
linear_combinations: impl IntoIterator<Item = &'a LinearCombination<E::ScalarField>>,
polynomials: impl IntoIterator<Item = &'a LabeledPolynomial<E::ScalarField, P>>,
commitments: impl IntoIterator<Item = &'a LabeledCommitment<Self::Commitment>>,
query_set: &QuerySet<P::Point>,
sponge: &mut impl CryptographicSponge,
states: impl IntoIterator<Item = &'a Self::CommitmentState>,
rng: Option<&mut dyn RngCore>,
) -> Result<BatchLCProof<E::ScalarField, Self::BatchProof>, Self::Error>where
P: 'a,
Self::CommitmentState: 'a,
Self::Commitment: 'a,
fn open_combinations<'a>(
ck: &Self::CommitterKey,
linear_combinations: impl IntoIterator<Item = &'a LinearCombination<E::ScalarField>>,
polynomials: impl IntoIterator<Item = &'a LabeledPolynomial<E::ScalarField, P>>,
commitments: impl IntoIterator<Item = &'a LabeledCommitment<Self::Commitment>>,
query_set: &QuerySet<P::Point>,
sponge: &mut impl CryptographicSponge,
states: impl IntoIterator<Item = &'a Self::CommitmentState>,
rng: Option<&mut dyn RngCore>,
) -> Result<BatchLCProof<E::ScalarField, Self::BatchProof>, Self::Error>where
P: 'a,
Self::CommitmentState: 'a,
Self::Commitment: 'a,
Source§fn batch_open<'a>(
ck: &Self::CommitterKey,
labeled_polynomials: impl IntoIterator<Item = &'a LabeledPolynomial<F, P>>,
commitments: impl IntoIterator<Item = &'a LabeledCommitment<Self::Commitment>>,
query_set: &QuerySet<P::Point>,
sponge: &mut impl CryptographicSponge,
states: impl IntoIterator<Item = &'a Self::CommitmentState>,
rng: Option<&mut dyn RngCore>,
) -> Result<Self::BatchProof, Self::Error>where
P: 'a,
Self::CommitmentState: 'a,
Self::Commitment: 'a,
fn batch_open<'a>(
ck: &Self::CommitterKey,
labeled_polynomials: impl IntoIterator<Item = &'a LabeledPolynomial<F, P>>,
commitments: impl IntoIterator<Item = &'a LabeledCommitment<Self::Commitment>>,
query_set: &QuerySet<P::Point>,
sponge: &mut impl CryptographicSponge,
states: impl IntoIterator<Item = &'a Self::CommitmentState>,
rng: Option<&mut dyn RngCore>,
) -> Result<Self::BatchProof, Self::Error>where
P: 'a,
Self::CommitmentState: 'a,
Self::Commitment: 'a,
Auto Trait Implementations§
impl<E, P> Freeze for MarlinPST13<E, P>
impl<E, P> RefUnwindSafe for MarlinPST13<E, P>where
E: RefUnwindSafe,
P: RefUnwindSafe,
impl<E, P> Send for MarlinPST13<E, P>where
P: Send,
impl<E, P> Sync for MarlinPST13<E, P>
impl<E, P> Unpin for MarlinPST13<E, P>
impl<E, P> UnsafeUnpin for MarlinPST13<E, P>
impl<E, P> UnwindSafe for MarlinPST13<E, P>where
E: UnwindSafe,
P: 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