Trait ark_snark::UniversalSetupSNARK[][src]

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>>; }

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

Associated Types

type ComputationBound: Clone + Default + Debug[src]

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

type PublicParameters: Clone + Debug[src]

Specifies the type of universal public parameters.

Loading content...

Required methods

fn universal_setup<R: RngCore + CryptoRng>(
    compute_bound: &Self::ComputationBound,
    rng: &mut R
) -> Result<Self::PublicParameters, Self::Error>
[src]

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

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>>
[src]

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

Loading content...

Implementors

Loading content...