Skip to main content

Crate sp1_verifier

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.

Modules§

compressed

Structs§

GROTH16_VK_BYTES
The Groth16 verifying key for this SP1 version.
Groth16Bn254Proof
Groth16Verifier
A verifier for Groth16 zero-knowledge proofs.
PLONK_VK_BYTES
The PLONK verifying key for this SP1 version.
PlonkBn254Proof
PlonkVerifier
A verifier for Plonk zero-knowledge proofs.
ProofFromNetwork
The proof generated by the prover network.
VK_ROOT_BYTES
The VK merkle tree root as 32 bytes (big-endian bn254 representation). Derived from the recursion verifying key data.
VerifierRecursionVks

Enums§

Groth16Error
PlonkError
ProofBn254
SP1Proof
A proof generated by the SP1 RISC-V zkVM.
SP1ProofMode

Functions§

blake3_hash
Hash the input using Blake3.
decode_sp1_vkey_hash
Decodes the sp1 vkey hash from the string from a call to vk.bytes32.
hash_public_inputs
Hashes the public inputs in the same format as the Plonk and Groth16 verifiers. Uses Sha256.
hash_public_inputs_with_fn
Hashes the public inputs in the same format as the Plonk and Groth16 verifiers, using the provided hash function.
sha256_hash
Hashes the public input using Sha256.