pub trait UniversalSetupSNARK<F: PrimeField>: SNARK<F> {
    type ComputationBound: Clone + Default + Debug;
    type PublicParameters: Clone + Debug;

    fn universal_setup<R: RngCore + CryptoRng>(
        compute_bound: &Self::ComputationBound,
        rng: &mut R
    ) -> Result<Self::PublicParameters, Self::Error>; fn index<C: ConstraintSynthesizer<F>, R: RngCore + CryptoRng>(
        pp: &Self::PublicParameters,
        circuit: C,
        rng: &mut R
    ) -> Result<(Self::ProvingKey, Self::VerifyingKey), UniversalSetupIndexError<Self::ComputationBound, Self::Error>>; }
Expand description

A SNARK with universal setup. That is, a SNARK where the trusted setup is circuit-independent.

Required Associated Types§

Specifies how to bound the size of public parameters required to generate the index proving and verification keys for a given circuit.

Specifies the type of universal public parameters.

Required Methods§

Specifies how to bound the size of public parameters required to generate the index proving and verification keys for a given circuit.

Indexes the public parameters according to the circuit circuit, and outputs circuit-specific proving and verification keys.

Implementors§