pub struct KZGProof<Pair: Pairing> {
    pub quotient: Pair::G1Affine,
    pub blinding: <Pair::G1Affine as AffineRepr>::ScalarField,
}Fields§
§quotient: Pair::G1Affine§blinding: <Pair::G1Affine as AffineRepr>::ScalarFieldA blinding factor used to hide the polynomial, if necessary
Implementations§
Source§impl<F: PrimeField, G: CommitmentCurve<ScalarField = F>, G2: CommitmentCurve<ScalarField = F>, Pair: Pairing<G1Affine = G, G2Affine = G2>> KZGProof<Pair>
 
impl<F: PrimeField, G: CommitmentCurve<ScalarField = F>, G2: CommitmentCurve<ScalarField = F>, Pair: Pairing<G1Affine = G, G2Affine = G2>> KZGProof<Pair>
Sourcepub fn create<D: EvaluationDomain<F>>(
    srs: &PairingSRS<Pair>,
    plnms: &'_ [(DensePolynomialOrEvaluations<'_, G::ScalarField, D>, PolyComm<G::ScalarField>)],
    elm: &[F],
    polyscale: F,
) -> Option<Self>
 
pub fn create<D: EvaluationDomain<F>>( srs: &PairingSRS<Pair>, plnms: &'_ [(DensePolynomialOrEvaluations<'_, G::ScalarField, D>, PolyComm<G::ScalarField>)], elm: &[F], polyscale: F, ) -> Option<Self>
Create a KZG proof. Parameters:
- srs: the structured reference string used to commit to the polynomials
- plnms: the list of polynomials to open. The type is simply an alias to handle the polynomials in evaluations or coefficients forms.
- elm: vector of evaluation points. Note that it only works for two elements for now.
- polyscale: a challenge to batch the polynomials.
Sourcepub fn verify(
    &self,
    srs: &PairingSRS<Pair>,
    evaluations: &[Evaluation<G>],
    polyscale: F,
    elm: &[F],
) -> bool
 
pub fn verify( &self, srs: &PairingSRS<Pair>, evaluations: &[Evaluation<G>], polyscale: F, elm: &[F], ) -> bool
Verify a proof. Note that it only works for two elements for now, i.e. elm must be of size 2. Also, chunking is not supported.
Trait Implementations§
Source§impl<'de, Pair: Pairing> Deserialize<'de> for KZGProof<Pair>where
    Pair::G1Affine: CanonicalDeserialize + CanonicalSerialize,
 
impl<'de, Pair: Pairing> Deserialize<'de> for KZGProof<Pair>where
    Pair::G1Affine: CanonicalDeserialize + CanonicalSerialize,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<F: PrimeField, G: CommitmentCurve<ScalarField = F>, G2: CommitmentCurve<ScalarField = F>, Pair: Pairing<G1Affine = G, G2Affine = G2>> OpenProof<G> for KZGProof<Pair>
 
impl<F: PrimeField, G: CommitmentCurve<ScalarField = F>, G2: CommitmentCurve<ScalarField = F>, Pair: Pairing<G1Affine = G, G2Affine = G2>> OpenProof<G> for KZGProof<Pair>
Source§fn open<EFqSponge, RNG, D: EvaluationDomain<F>>(
    srs: &Self::SRS,
    _group_map: &<G as CommitmentCurve>::Map,
    plnms: &'_ [(DensePolynomialOrEvaluations<'_, G::ScalarField, D>, PolyComm<G::ScalarField>)],
    elm: &[<G as AffineRepr>::ScalarField],
    polyscale: <G as AffineRepr>::ScalarField,
    _evalscale: <G as AffineRepr>::ScalarField,
    _sponge: EFqSponge,
    _rng: &mut RNG,
) -> Self
 
fn open<EFqSponge, RNG, D: EvaluationDomain<F>>( srs: &Self::SRS, _group_map: &<G as CommitmentCurve>::Map, plnms: &'_ [(DensePolynomialOrEvaluations<'_, G::ScalarField, D>, PolyComm<G::ScalarField>)], elm: &[<G as AffineRepr>::ScalarField], polyscale: <G as AffineRepr>::ScalarField, _evalscale: <G as AffineRepr>::ScalarField, _sponge: EFqSponge, _rng: &mut RNG, ) -> Self
Parameters:
- srs: the structured reference string
- plnms: vector of polynomials with optional degree bound and commitment randomness
- elm: vector of evaluation points
- polyscale: scaling factor for polynoms group_maps, sponge, rng and evalscale are not used. The parameters are kept to fit the trait and to be used generically.
type SRS = PairingSRS<Pair>
Auto Trait Implementations§
impl<Pair> Freeze for KZGProof<Pair>
impl<Pair> RefUnwindSafe for KZGProof<Pair>where
    <Pair as Pairing>::G1Affine: RefUnwindSafe,
    <Pair as Pairing>::ScalarField: RefUnwindSafe,
impl<Pair> Send for KZGProof<Pair>
impl<Pair> Sync for KZGProof<Pair>
impl<Pair> Unpin for KZGProof<Pair>
impl<Pair> UnwindSafe for KZGProof<Pair>where
    <Pair as Pairing>::G1Affine: UnwindSafe,
    <Pair as Pairing>::ScalarField: 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