Struct ark_poly_commit::marlin::marlin_pst13_pc::MarlinPST13
source · pub struct MarlinPST13<E: Pairing, P: DenseMVPolynomial<E::ScalarField>, S: CryptographicSponge> { /* 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, S> PolynomialCommitment<<E as Pairing>::ScalarField, P, S> for MarlinPST13<E, P, S>where
E: Pairing,
P: DenseMVPolynomial<E::ScalarField> + Sync,
S: CryptographicSponge,
P::Point: Index<usize, Output = E::ScalarField>,
impl<E, P, S> PolynomialCommitment<<E as Pairing>::ScalarField, P, S> for MarlinPST13<E, P, S>where E: Pairing, P: DenseMVPolynomial<E::ScalarField> + Sync, S: CryptographicSponge, 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::Randomness>), 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::Randomness>), 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,
opening_challenges: &mut ChallengeGenerator<E::ScalarField, S>,
rands: impl IntoIterator<Item = &'a Self::Randomness>,
_rng: Option<&mut dyn RngCore>
) -> Result<Self::Proof, Self::Error>where
P: 'a,
Self::Randomness: '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, opening_challenges: &mut ChallengeGenerator<E::ScalarField, S>, rands: impl IntoIterator<Item = &'a Self::Randomness>, _rng: Option<&mut dyn RngCore> ) -> Result<Self::Proof, Self::Error>where P: 'a, Self::Randomness: '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,
opening_challenges: &mut ChallengeGenerator<E::ScalarField, S>,
_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, opening_challenges: &mut ChallengeGenerator<E::ScalarField, S>, _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>,
opening_challenges: &mut ChallengeGenerator<E::ScalarField, S>,
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>, opening_challenges: &mut ChallengeGenerator<E::ScalarField, S>, 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
.
§type UniversalParams = UniversalParams<E, P>
type UniversalParams = UniversalParams<E, P>
Self::CommitterKey
and Self::VerifierKey
by Self::trim
.