[][src]Struct snarkvm_marlin::Marlin

pub struct Marlin<F: PrimeField, PC: PolynomialCommitment<F>, D: Digest>(_, _, _);

The compiled argument system.

Implementations

impl<F: PrimeField, PC: PolynomialCommitment<F>, D: Digest> Marlin<F, PC, D>[src]

pub const PROTOCOL_NAME: &'static [u8][src]

The personalization string for this protocol. Used to personalize the Fiat-Shamir rng.

pub fn universal_setup<R: RngCore>(
    num_constraints: usize,
    num_variables: usize,
    num_non_zero: usize,
    rng: &mut R
) -> Result<UniversalSRS<F, PC>, Error<PC::Error>>
[src]

Generate the universal prover and verifier keys for the argument system.

pub fn index<'a, C: ConstraintSynthesizer<F>>(
    srs: &UniversalSRS<F, PC>,
    c: &C
) -> Result<(IndexProverKey<'a, F, PC, C>, IndexVerifierKey<F, PC, C>), Error<PC::Error>>
[src]

Generate the index-specific (i.e., circuit-specific) prover and verifier keys. This is a deterministic algorithm that anyone can rerun.

pub fn prove<C: ConstraintSynthesizer<F>, R: RngCore>(
    index_pk: &IndexProverKey<'_, F, PC, C>,
    c: &C,
    zk_rng: &mut R
) -> Result<Proof<F, PC, C>, Error<PC::Error>>
[src]

Create a zkSNARK asserting that the constraint system is satisfied.

pub fn verify<C: ConstraintSynthesizer<F>, R: RngCore>(
    index_vk: &IndexVerifierKey<F, PC, C>,
    public_input: &[F],
    proof: &Proof<F, PC, C>,
    rng: &mut R
) -> Result<bool, Error<PC::Error>>
[src]

Verify that a proof for the constrain system defined by C asserts that all constraints are satisfied.

Auto Trait Implementations

impl<F, PC, D> RefUnwindSafe for Marlin<F, PC, D> where
    D: RefUnwindSafe,
    F: RefUnwindSafe,
    PC: RefUnwindSafe
[src]

impl<F, PC, D> Send for Marlin<F, PC, D> where
    D: Send,
    PC: Send
[src]

impl<F, PC, D> Sync for Marlin<F, PC, D> where
    D: Sync,
    PC: Sync
[src]

impl<F, PC, D> Unpin for Marlin<F, PC, D> where
    D: Unpin,
    F: Unpin,
    PC: Unpin
[src]

impl<F, PC, D> UnwindSafe for Marlin<F, PC, D> where
    D: UnwindSafe,
    F: UnwindSafe,
    PC: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,