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§

converter

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§

blake3_hash
Hash the input using Blake3.
bn254_public_values
Formats the sp1 vkey hash and public inputs for use in either the Plonk or Groth16 verifier.
compress_groth16_proof_from_bytes
Compress the Groth16 proof from a byte slice to a compressed byte slice.
decode_sp1_vkey_hash
Decodes the sp1 vkey hash from the string from a call to vk.bytes32.
decompress_groth16_proof_from_bytes
Decompress the Groth16 proof from a compressed byte slice to a byte slice.
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.