pub trait ProofSystem {
type ProvingKey;
type VerifyingKey;
// Required methods
fn prove(
pk: &Self::ProvingKey,
witness: &Witness,
public_inputs: &PublicInputs,
) -> Result<Vec<u8>, ProofSystemError>;
fn verify(
vk: &Self::VerifyingKey,
proof: &[u8],
public_inputs: &PublicInputs,
) -> Result<bool, ProofSystemError>;
}Expand description
Abstract proof system backend — the primary swap point in the architecture.
zk402-groth16 implements this; future backends (Halo2, etc.) implement the same
trait without changes to consumers.
Required Associated Types§
type ProvingKey
type VerifyingKey
Required Methods§
fn prove( pk: &Self::ProvingKey, witness: &Witness, public_inputs: &PublicInputs, ) -> Result<Vec<u8>, ProofSystemError>
fn verify( vk: &Self::VerifyingKey, proof: &[u8], public_inputs: &PublicInputs, ) -> Result<bool, ProofSystemError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".