Skip to main content

OpenProof

Trait OpenProof 

Source
pub trait OpenProof<G: CommitmentCurve, const FULL_ROUNDS: usize>: 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, FULL_ROUNDS>,
             RNG: RngCore + CryptoRng;
    fn verify<EFqSponge, RNG>(
        srs: &Self::SRS,
        group_map: &G::Map,
        batch: &mut [BatchEvaluationProof<'_, G, EFqSponge, Self, FULL_ROUNDS>],
        rng: &mut RNG,
    ) -> bool
       where EFqSponge: FqSponge<G::BaseField, G, G::ScalarField, FULL_ROUNDS>,
             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, FULL_ROUNDS>, 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, FULL_ROUNDS>], rng: &mut RNG, ) -> bool
where EFqSponge: FqSponge<G::BaseField, G, G::ScalarField, FULL_ROUNDS>, 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".

Implementors§

Source§

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

Source§

type SRS = SRS<G>

Source§

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

Available on crate feature std only.
Source§

type SRS = PairingSRS<Pair>