Crate sp1_verifier

Source
Expand description

This crate provides verifiers for SP1 Groth16 and Plonk BN254 proofs in a no-std environment. It is patched for efficient verification within the SP1 zkVM context.

Structs§

GROTH16_VK_BYTES
The Groth16 verifying key for this SP1 version.
Groth16Verifier
A verifier for Groth16 zero-knowledge proofs.
PLONK_VK_BYTES
The PLONK verifying key for this SP1 version.
PlonkVerifier
A verifier for Plonk zero-knowledge proofs.

Enums§

Groth16Error
PlonkError

Functions§

bn254_public_values
Formats the sp1 vkey hash and public inputs for use in either the Plonk or Groth16 verifier.
decode_sp1_vkey_hash
Decodes the sp1 vkey hash from the string from a call to vk.bytes32.
hash
Hashes the public input using Sha256, or Blake3 if the blake3 feature is enabled.
hash_public_inputs
Hashes the public inputs in the same format as the Plonk and Groth16 verifiers. Uses Sha256, or Blake3 if the blake3 feature is enabled.