Struct ark_poly_commit::sonic_pc::SonicKZG10
source · pub struct SonicKZG10<E: Pairing, P: DenseUVPolynomial<E::ScalarField>, S: CryptographicSponge> { /* private fields */ }
Expand description
Polynomial commitment based on [KZG10], with degree enforcement and batching taken from [MBKM19, “Sonic”] (more precisely, their counterparts in [Gabizon19, “AuroraLight”] that avoid negative G1 powers). The (optional) hiding property of the commitment scheme follows the approach described in [CHMMVW20, “Marlin”].
Trait Implementations§
source§impl<E, P, S> PolynomialCommitment<<E as Pairing>::ScalarField, P, S> for SonicKZG10<E, P, S>where
E: Pairing,
P: DenseUVPolynomial<E::ScalarField, Point = E::ScalarField>,
S: CryptographicSponge,
for<'a, 'b> &'a P: Div<&'b P, Output = P>,
impl<E, P, S> PolynomialCommitment<<E as Pairing>::ScalarField, P, S> for SonicKZG10<E, P, S>where E: Pairing, P: DenseUVPolynomial<E::ScalarField, Point = E::ScalarField>, S: CryptographicSponge, for<'a, 'b> &'a P: Div<&'b P, Output = P>,
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 commitment to polynomial
.
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>
type UniversalParams = UniversalParams<E>
The universal parameters for the commitment scheme. These are “trimmed”
down to
Self::CommitterKey
and Self::VerifierKey
by Self::trim
.§type CommitterKey = CommitterKey<E>
type CommitterKey = CommitterKey<E>
The committer key for the scheme; used to commit to a polynomial and then
open the commitment to produce an evaluation proof.
§type VerifierKey = VerifierKey<E>
type VerifierKey = VerifierKey<E>
The verifier key for the scheme; used to check an evaluation proof.
§type PreparedVerifierKey = VerifierKey<E>
type PreparedVerifierKey = VerifierKey<E>
The prepared verifier key for the scheme; used to check an evaluation proof.
§type Commitment = Commitment<E>
type Commitment = Commitment<E>
The commitment to a polynomial.
§type PreparedCommitment = PreparedCommitment<E>
type PreparedCommitment = PreparedCommitment<E>
The prepared commitment to a polynomial.
§type Randomness = Randomness<<E as Pairing>::ScalarField, P>
type Randomness = Randomness<<E as Pairing>::ScalarField, P>
The commitment randomness.
§type BatchProof = Vec<<SonicKZG10<E, P, S> as PolynomialCommitment<<E as Pairing>::ScalarField, P, S>>::Proof, Global>
type BatchProof = Vec<<SonicKZG10<E, P, S> as PolynomialCommitment<<E as Pairing>::ScalarField, P, S>>::Proof, Global>
The evaluation proof for a query set.
source§fn setup<R: RngCore>(
max_degree: usize,
_: Option<usize>,
rng: &mut R
) -> Result<Self::UniversalParams, Self::Error>
fn setup<R: RngCore>( max_degree: usize, _: Option<usize>, rng: &mut R ) -> Result<Self::UniversalParams, Self::Error>
Constructs public parameters when given as input the maximum degree
degree
for the polynomial commitment scheme. num_vars
specifies the number of
variables for multivariate setupsource§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
and for enforcing degree bounds in the range 1..=supported_degree
.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: &'a 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
Self::Randomness: 'a,
Self::Commitment: 'a,
P: '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: &'a 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 Self::Randomness: 'a, Self::Commitment: 'a, P: 'a,
open but with individual challenges
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,
check but with individual challenges
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<E::ScalarField, P::Point>,
proof: &Self::BatchProof,
opening_challenges: &mut ChallengeGenerator<E::ScalarField, S>,
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<E::ScalarField, P::Point>, proof: &Self::BatchProof, opening_challenges: &mut ChallengeGenerator<E::ScalarField, S>, rng: &mut R ) -> Result<bool, Self::Error>where Self::Commitment: 'a,
batch_check but with individual challenges
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>,
opening_challenges: &mut ChallengeGenerator<E::ScalarField, S>,
rands: impl IntoIterator<Item = &'a Self::Randomness>,
rng: Option<&mut dyn RngCore>
) -> Result<BatchLCProof<E::ScalarField, Self::BatchProof>, Self::Error>where
Self::Randomness: 'a,
Self::Commitment: 'a,
P: '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>, opening_challenges: &mut ChallengeGenerator<E::ScalarField, S>, rands: impl IntoIterator<Item = &'a Self::Randomness>, rng: Option<&mut dyn RngCore> ) -> Result<BatchLCProof<E::ScalarField, Self::BatchProof>, Self::Error>where Self::Randomness: 'a, Self::Commitment: 'a, P: 'a,
open_combinations but with individual challenges
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>,
challenge_generator: &mut ChallengeGenerator<F, S>,
rands: impl IntoIterator<Item = &'a Self::Randomness>,
rng: Option<&mut dyn RngCore>
) -> Result<Self::BatchProof, Self::Error>where
P: 'a,
Self::Randomness: '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>, challenge_generator: &mut ChallengeGenerator<F, S>, rands: impl IntoIterator<Item = &'a Self::Randomness>, rng: Option<&mut dyn RngCore> ) -> Result<Self::BatchProof, Self::Error>where P: 'a, Self::Randomness: 'a, Self::Commitment: 'a,
batch_open with individual challenges
Auto Trait Implementations§
impl<E, P, S> RefUnwindSafe for SonicKZG10<E, P, S>where E: RefUnwindSafe, P: RefUnwindSafe, S: RefUnwindSafe,
impl<E, P, S> Send for SonicKZG10<E, P, S>where P: Send, S: Send,
impl<E, P, S> Sync for SonicKZG10<E, P, S>where S: Sync,
impl<E, P, S> Unpin for SonicKZG10<E, P, S>where E: Unpin, P: Unpin, S: Unpin,
impl<E, P, S> UnwindSafe for SonicKZG10<E, P, S>where E: UnwindSafe, P: UnwindSafe, S: 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