Trait ark_crypto_primitives::UniversalSetupSNARK[][src]

pub trait UniversalSetupSNARK<F>: SNARK<F> where
    F: PrimeField
{ type ComputationBound: Clone + Default + Debug; type PublicParameters: Clone + Debug; pub fn universal_setup<R>(
        compute_bound: &Self::ComputationBound,
        rng: &mut R
    ) -> Result<Self::PublicParameters, Self::Error>
    where
        R: RngCore + CryptoRng
;
pub fn index<C, R>(
        pp: &Self::PublicParameters,
        circuit: C,
        rng: &mut R
    ) -> Result<(Self::ProvingKey, Self::VerifyingKey), UniversalSetupIndexError<Self::ComputationBound, Self::Error>>
    where
        C: ConstraintSynthesizer<F>,
        R: RngCore + CryptoRng
; }

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

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

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

pub fn index<C, R>(
    pp: &Self::PublicParameters,
    circuit: C,
    rng: &mut R
) -> Result<(Self::ProvingKey, Self::VerifyingKey), UniversalSetupIndexError<Self::ComputationBound, Self::Error>> where
    C: ConstraintSynthesizer<F>,
    R: RngCore + CryptoRng
[src]

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

Loading content...

Implementors

Loading content...