You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
arnaucube b63a1d84b2 update to last sonobe version (simplifies interface) 4 months ago
circuit update README.md 6 months ago
src update to last sonobe version (simplifies interface) 4 months ago
.gitignore update to last Sonobe version 6 months ago
Cargo.toml update README.md 6 months ago
README.md update README.md 6 months ago
compile-circuit.sh add rust-native hashing to compare final state 7 months ago

README.md

keccak-chain-sonobe

Repo showcasing usage of Sonobe with Circom circuits.

Proves a chain of keccak256 hashes, using the vocdoni/keccak256-circom circuit, with Nova+CycleFold.

The main idea is to prove $z_n = H(H(...~H(H(H(z_0)))))$, where $n$ is the number of Keccak256 hashes ($H$) that we compute. Proving this in a 'normal' R1CS circuit for a large $n$ would be too costly, but with folding we can manage to prove it in a reasonable time span.

For more info about Sonobe, check out Sonobe's docs.

Usage

Assuming rust and circom have been installed:

  • ./compile-circuit.sh
  • cargo test --release -- --nocapture

Repo structure

  • the Circom circuit to be folded is defined at ./circuit/keccak-chain.circom
  • the logic to fold the circuit using Sonobe is defined at src/lib.rs
    • (it contains some extra sanity check that would not be needed in a real-world use case)