pub struct InnerProductArgPC<G: AffineRepr, D: Digest, P: DenseUVPolynomial<G::ScalarField>, S: CryptographicSponge> { /* private fields */ }
Expand description

A polynomial commitment scheme based on the hardness of the discrete logarithm problem in prime-order groups. The construction is described in detail in [BCMS20].

Degree bound enforcement requires that (at least one of) the points at which a committed polynomial is evaluated are from a distribution that is random conditioned on the polynomial. This is because degree bound enforcement relies on checking a polynomial identity at this point. More formally, the points must be sampled from an admissible query sampler, as detailed in [CHMMVW20].

Implementations§

source§

impl<G, D, P, S> InnerProductArgPC<G, D, P, S>where G: AffineRepr, G::Group: VariableBaseMSM<MulBase = G>, D: Digest, P: DenseUVPolynomial<G::ScalarField>, S: CryptographicSponge,

source

pub const PROTOCOL_NAME: &'static [u8] = b"PC-DL-2020"

PROTOCOL_NAME is used as a seed for the setup function.

Trait Implementations§

source§

impl<G, D, P, S> PolynomialCommitment<<G as AffineRepr>::ScalarField, P, S> for InnerProductArgPC<G, D, P, S>where G: AffineRepr, G::Group: VariableBaseMSM<MulBase = G>, D: Digest, P: DenseUVPolynomial<G::ScalarField, Point = G::ScalarField>, S: CryptographicSponge,

source§

fn commit<'a>( ck: &Self::CommitterKey, polynomials: impl IntoIterator<Item = &'a LabeledPolynomial<G::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<G::ScalarField>>, commitments: impl IntoIterator<Item = &'a LabeledCommitment<Self::Commitment>>, eqn_query_set: &QuerySet<P::Point>, eqn_evaluations: &Evaluations<P::Point, G::ScalarField>, proof: &BatchLCProof<G::ScalarField, Self::BatchProof>, opening_challenges: &mut ChallengeGenerator<G::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<G>

The universal parameters for the commitment scheme. These are “trimmed” down to Self::CommitterKey and Self::VerifierKey by Self::trim.
§

type CommitterKey = CommitterKey<G>

The committer key for the scheme; used to commit to a polynomial and then open the commitment to produce an evaluation proof.
§

type VerifierKey = CommitterKey<G>

The verifier key for the scheme; used to check an evaluation proof.
§

type PreparedVerifierKey = CommitterKey<G>

The prepared verifier key for the scheme; used to check an evaluation proof.
§

type Commitment = Commitment<G>

The commitment to a polynomial.
§

type PreparedCommitment = Commitment<G>

The prepared commitment to a polynomial.
§

type Randomness = Randomness<G>

The commitment randomness.
§

type Proof = Proof<G>

The evaluation proof for a single point.
§

type BatchProof = Vec<<InnerProductArgPC<G, D, P, S> as PolynomialCommitment<<G as AffineRepr>::ScalarField, P, S>>::Proof, Global>

The evaluation proof for a query set.
§

type Error = Error

The error type for the scheme.
source§

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 setup
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>

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<G::ScalarField, P>>, commitments: impl IntoIterator<Item = &'a LabeledCommitment<Self::Commitment>>, point: &'a P::Point, opening_challenges: &mut ChallengeGenerator<G::ScalarField, S>, rands: impl IntoIterator<Item = &'a Self::Randomness>, rng: Option<&mut dyn RngCore> ) -> Result<Self::Proof, Self::Error>where Self::Commitment: 'a, Self::Randomness: '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 = G::ScalarField>, proof: &Self::Proof, opening_challenges: &mut ChallengeGenerator<G::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<G::ScalarField, P::Point>, proof: &Self::BatchProof, opening_challenges: &mut ChallengeGenerator<G::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<G::ScalarField>>, polynomials: impl IntoIterator<Item = &'a LabeledPolynomial<G::ScalarField, P>>, commitments: impl IntoIterator<Item = &'a LabeledCommitment<Self::Commitment>>, query_set: &QuerySet<P::Point>, opening_challenges: &mut ChallengeGenerator<G::ScalarField, S>, rands: impl IntoIterator<Item = &'a Self::Randomness>, rng: Option<&mut dyn RngCore> ) -> Result<BatchLCProof<G::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,

batch_open with individual challenges

Auto Trait Implementations§

§

impl<G, D, P, S> RefUnwindSafe for InnerProductArgPC<G, D, P, S>where D: RefUnwindSafe, G: RefUnwindSafe, P: RefUnwindSafe, S: RefUnwindSafe,

§

impl<G, D, P, S> Send for InnerProductArgPC<G, D, P, S>where D: Send, P: Send, S: Send,

§

impl<G, D, P, S> Sync for InnerProductArgPC<G, D, P, S>where D: Sync, S: Sync,

§

impl<G, D, P, S> Unpin for InnerProductArgPC<G, D, P, S>where D: Unpin, G: Unpin, P: Unpin, S: Unpin,

§

impl<G, D, P, S> UnwindSafe for InnerProductArgPC<G, D, P, S>where D: UnwindSafe, G: UnwindSafe, P: UnwindSafe, S: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V