Trait OpenProof

Source
pub trait OpenProof<G: CommitmentCurve>: Sized + Clone {
    type SRS: SRS<G> + Debug;

    // Required methods
    fn open<EFqSponge, RNG, D: EvaluationDomain<<G as AffineRepr>::ScalarField>>(
        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
       where EFqSponge: Clone + FqSponge<<G as AffineRepr>::BaseField, G, <G as AffineRepr>::ScalarField>,
             RNG: RngCore + CryptoRng;
    fn verify<EFqSponge, RNG>(
        srs: &Self::SRS,
        group_map: &G::Map,
        batch: &mut [BatchEvaluationProof<'_, G, EFqSponge, Self>],
        rng: &mut RNG,
    ) -> bool
       where EFqSponge: FqSponge<G::BaseField, G, G::ScalarField>,
             RNG: RngCore + CryptoRng;
}

Required Associated Types§

Source

type SRS: SRS<G> + Debug

Required Methods§

Source

fn open<EFqSponge, RNG, D: EvaluationDomain<<G as AffineRepr>::ScalarField>>( 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
where EFqSponge: Clone + FqSponge<<G as AffineRepr>::BaseField, G, <G as AffineRepr>::ScalarField>, RNG: RngCore + CryptoRng,

Create an opening proof for a batch of polynomials. The parameters are the following:

  • srs: the structured reference string used to commit to the polynomials
  • group_map: the group map
  • plnms: the list of polynomials to open, with possible blinders. The type is simply an alias to handle the polynomials in evaluations or coefficients forms.
  • elm: the evaluation points
  • polyscale: a challenge to bacth the polynomials.
  • evalscale: a challenge to bacth the evaluation points
  • sponge: Sponge used to coin and absorb values and simulate non-interactivity using the Fiat-Shamir transformation.
  • rng: a pseudo random number generator used for zero-knowledge
Source

fn verify<EFqSponge, RNG>( srs: &Self::SRS, group_map: &G::Map, batch: &mut [BatchEvaluationProof<'_, G, EFqSponge, Self>], rng: &mut RNG, ) -> bool
where EFqSponge: FqSponge<G::BaseField, G, G::ScalarField>, RNG: RngCore + CryptoRng,

Verify the opening proof

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<BaseField: PrimeField, G: AffineRepr<BaseField = BaseField> + CommitmentCurve + EndoCurve> OpenProof<G> for OpeningProof<G>

Source§

type SRS = SRS<G>

Source§

impl<F: PrimeField, G: CommitmentCurve<ScalarField = F>, G2: CommitmentCurve<ScalarField = F>, Pair: Pairing<G1Affine = G, G2Affine = G2>> OpenProof<G> for KZGProof<Pair>

Source§

type SRS = PairingSRS<Pair>