pub trait Proof: Sized {
type ProvingKey;
type VerifyingKey;
type Instance;
type Witness;
type Error;
// Required methods
fn create<R: RngCore>(
pk: &Self::ProvingKey,
instance: &Self::Instance,
witness: &Self::Witness,
rng: R,
) -> Result<Self, Self::Error>;
fn verify(
&self,
vk: &Self::VerifyingKey,
instance: &Self::Instance,
) -> Result<(), Self::Error>;
}
Expand description
Trait for a zero-knowledge proof about some statement.
Required Associated Types§
Sourcetype ProvingKey
type ProvingKey
The parameters necessary to create a proof.
Sourcetype VerifyingKey
type VerifyingKey
The parameters necessary to verify a proof.
Required Methods§
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.