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§
Sourcetype VerifyingKey: Clone + Debug
type VerifyingKey: Clone + Debug
Verifying key for subroutines if any.
Required Methods§
Sourcefn 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 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.
Sourcefn verify(
vk: &Self::VerifyingKey,
protocol: &Self::Protocol,
instances: &[Vec<L::LoadedScalar>],
proof: &Self::Proof,
) -> Result<Self::Output, Error>
fn verify( vk: &Self::VerifyingKey, protocol: &Self::Protocol, instances: &[Vec<L::LoadedScalar>], proof: &Self::Proof, ) -> Result<Self::Output, Error>
Verify SnarkVerifier::Proof
and output SnarkVerifier::Output
.
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.