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§
Structs§
- GROT
H16_ VK_ BYTES - The Groth16 verifying key for this SP1 version.
- Groth16
Verifier - A verifier for Groth16 zero-knowledge proofs.
- PLONK_
VK_ BYTES - The PLONK verifying key for this SP1 version.
- Plonk
Verifier - A verifier for Plonk zero-knowledge proofs.
Enums§
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.