snark_verifier::verifier

Trait SnarkVerifier

Source
pub trait SnarkVerifier<C, L>
where C: CurveAffine, L: Loader<C>,
{ type VerifyingKey: Clone + Debug; type Protocol: Clone + Debug; type Proof: Clone + Debug; type Output: Clone + Debug; // Required methods fn read_proof<T>( vk: &Self::VerifyingKey, protocol: &Self::Protocol, instances: &[Vec<L::LoadedScalar>], transcript: &mut T, ) -> Result<Self::Proof, Error> where T: TranscriptRead<C, L>; fn verify( vk: &Self::VerifyingKey, protocol: &Self::Protocol, instances: &[Vec<L::LoadedScalar>], proof: &Self::Proof, ) -> Result<Self::Output, Error>; }
Expand description

(S)NARK verifier for verifying a (S)NARK.

Required Associated Types§

Source

type VerifyingKey: Clone + Debug

Verifying key for subroutines if any.

Source

type Protocol: Clone + Debug

Protocol specifying configuration of a (S)NARK.

Source

type Proof: Clone + Debug

Structured proof read from transcript.

Source

type Output: Clone + Debug

Output of verification.

Required Methods§

Source

fn read_proof<T>( vk: &Self::VerifyingKey, protocol: &Self::Protocol, instances: &[Vec<L::LoadedScalar>], transcript: &mut T, ) -> Result<Self::Proof, Error>
where T: TranscriptRead<C, L>,

Read SnarkVerifier::Proof from transcript.

Source

fn verify( vk: &Self::VerifyingKey, protocol: &Self::Protocol, instances: &[Vec<L::LoadedScalar>], proof: &Self::Proof, ) -> Result<Self::Output, Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<C, L, AS, AE> SnarkVerifier<C, L> for PlonkSuccinctVerifier<AS, AE>
where C: CurveAffine, L: Loader<C>, AS: AccumulationScheme<C, L> + PolynomialCommitmentScheme<C, L, Output = AS::Accumulator>, AE: AccumulatorEncoding<C, L, Accumulator = AS::Accumulator>,

Source§

impl<C, L, AS, AE> SnarkVerifier<C, L> for PlonkVerifier<AS, AE>
where C: CurveAffine, L: Loader<C>, AS: AccumulationDecider<C, L> + PolynomialCommitmentScheme<C, L, Output = AS::Accumulator>, AS::DecidingKey: AsRef<<AS as PolynomialCommitmentScheme<C, L>>::VerifyingKey>, AE: AccumulatorEncoding<C, L, Accumulator = AS::Accumulator>,