This project was developed as part of the Zero Knowledge Proofs MOOC 2023 from UC Berkeley RDI.
This repository contains three different implementations of Zero-Knowledge Proofs for Sudoku puzzles using different frameworks:
- Circom
- ZoKrates
- Arkworks
.
├── circom/
│ ├── sudoku.circom
│ └── sudoku.input.json
├── zokrates/
│ └── root.zok
└── arkworks/
└── src/
└── main.rs
- Navigate to the circom directory
- Run
make verify
to execute the end-to-end verification - Check the Makefile for individual steps
- Navigate to the zokrates directory
- Compile the program:
zokrates compile -i root.zok
- Generate the proving key:
zokrates setup
- Compute the witness:
zokrates compute-witness -a <puzzle-inputs>
- Generate the proof:
zokrates generate-proof
- Verify the proof:
zokrates verify
- Navigate to the arkworks directory
- Build the project:
cargo build --release
- Run the tests:
cargo test
- Execute the proof generation:
cargo run --release
sudoku.circom
: The circuit templatesudoku.input.json
: The prover's input- The verifier's input (
sudoku.inst.json
) is computed from it
- The verifier's input (
root.zok
: The main circuit implementation
src/main.rs
: The main circuit implementation