Struct snarkvm_algorithms::snark::marlin::MarlinSNARK
source · pub struct MarlinSNARK<E: PairingEngine, FS: AlgebraicSponge<E::Fq, 2>, MM: MarlinMode>(_);
Expand description
The Marlin proof system.
Implementations§
source§impl<E: PairingEngine, FS: AlgebraicSponge<E::Fq, 2>, MM: MarlinMode> MarlinSNARK<E, FS, MM>
impl<E: PairingEngine, FS: AlgebraicSponge<E::Fq, 2>, MM: MarlinMode> MarlinSNARK<E, FS, MM>
sourcepub const PROTOCOL_NAME: &'static [u8] = b"MARLIN-2019"
pub const PROTOCOL_NAME: &'static [u8] = b"MARLIN-2019"
The personalization string for this protocol. Used to personalize the Fiat-Shamir RNG.
sourcepub fn circuit_specific_setup<C: ConstraintSynthesizer<E::Fr>>(
c: &C
) -> Result<(CircuitProvingKey<E, MM>, CircuitVerifyingKey<E, MM>), SNARKError>
pub fn circuit_specific_setup<C: ConstraintSynthesizer<E::Fr>>( c: &C ) -> Result<(CircuitProvingKey<E, MM>, CircuitVerifyingKey<E, MM>), SNARKError>
Generate the index-specific (i.e., circuit-specific) prover and verifier keys. This is a trusted setup.
Warning
This method should be used only for testing purposes, and not in production.
In production, one should instead perform a universal setup via Self::universal_setup
,
and then deterministically specialize the resulting universal SRS via Self::circuit_setup
.
sourcepub fn circuit_setup<C: ConstraintSynthesizer<E::Fr>>(
universal_srs: &UniversalSRS<E>,
circuit: &C
) -> Result<(CircuitProvingKey<E, MM>, CircuitVerifyingKey<E, MM>), SNARKError>
pub fn circuit_setup<C: ConstraintSynthesizer<E::Fr>>( universal_srs: &UniversalSRS<E>, circuit: &C ) -> Result<(CircuitProvingKey<E, MM>, CircuitVerifyingKey<E, MM>), SNARKError>
Generates the circuit proving and verifying keys. This is a deterministic algorithm that anyone can rerun.
Trait Implementations§
source§impl<E: Clone + PairingEngine, FS: Clone + AlgebraicSponge<E::Fq, 2>, MM: Clone + MarlinMode> Clone for MarlinSNARK<E, FS, MM>
impl<E: Clone + PairingEngine, FS: Clone + AlgebraicSponge<E::Fq, 2>, MM: Clone + MarlinMode> Clone for MarlinSNARK<E, FS, MM>
source§fn clone(&self) -> MarlinSNARK<E, FS, MM>
fn clone(&self) -> MarlinSNARK<E, FS, MM>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<E: Debug + PairingEngine, FS: Debug + AlgebraicSponge<E::Fq, 2>, MM: Debug + MarlinMode> Debug for MarlinSNARK<E, FS, MM>
impl<E: Debug + PairingEngine, FS: Debug + AlgebraicSponge<E::Fq, 2>, MM: Debug + MarlinMode> Debug for MarlinSNARK<E, FS, MM>
source§impl<E: PairingEngine, FS, MM> SNARK for MarlinSNARK<E, FS, MM>where
E::Fr: PrimeField,
E::Fq: PrimeField,
FS: AlgebraicSponge<E::Fq, 2>,
MM: MarlinMode,
impl<E: PairingEngine, FS, MM> SNARK for MarlinSNARK<E, FS, MM>where E::Fr: PrimeField, E::Fq: PrimeField, FS: AlgebraicSponge<E::Fq, 2>, MM: MarlinMode,
type BaseField = <E as PairingEngine>::Fq
§type Certificate = Certificate<E>
type Certificate = Certificate<E>
A certificate that the indexing was performed correctly.