This repository is a curated learning path for understanding Zero-Knowledge Proofs (ZKPs). It provides a structured collection of resources, tutorials, and implementation in Python to guide learners from the fundamentals of zero-knowledge concepts to advanced applications, including cryptographic implementations, zk-SNARKs, and zk-STARKs.
This project requires Python 3.7+ and Jupyter Notebook/Lab.
The easiest way to get started with a consistent development environment and automatic port forwarding.
Prerequisites:
- Docker Desktop installed and running
- VS Code or Cursor IDE with the "Dev Containers" extension
Steps:
- Clone the repository:
git clone <repository-url>
cd zeroknowledge- Open the project in VS Code/Cursor:
code . # For VS Code
# or
cursor . # For Cursor IDE-
When prompted, click "Reopen in Container", or manually:
- Press
Cmd/Ctrl + Shift + P - Select "Dev Containers: Reopen in Container"
- Press
-
Wait for the container to build (first time only)
- Clone the repository:
git clone <repository-url>
cd zeroknowledge- Create a virtual environment (recommended):
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate- Install dependencies:
pip install -r requirements.txtLocked Dependencies (see requirements.txt):
- numpy==2.4.6
- sympy==1.14.0
- galois==0.4.11
- matplotlib==3.10.9
- jupyter==1.1.1
- notebook==7.3.3
- merkle (custom module included in this repository as
merkle.py)
This notebook demonstrates the implementation of a zk-STARK (Zero-Knowledge Scalable Transparent Argument of Knowledge) proof system. It includes step-by-step examples of:
- Finite field arithmetic
- Polynomial constraints
- FRI (Fast Reed-Solomon Interactive Oracle Proof of Proximity) protocol
- Merkle tree commitments
To run:
jupyter notebook zkSTARK.ipynbThis notebook implements Circle STARK, a variant of the standard STARK proof system that uses the circle group over a prime field instead of a multiplicative subgroup. It demonstrates:
- Circle group arithmetic over finite fields
- Using Mersenne primes (like M₃₁) for efficient FFT domains
- Circle STARK protocol implementation
To run:
jupyter notebook circleSTARK.ipynbIf using the Dev Container, Jupyter is already configured. You can:
-
Open notebooks directly in VS Code/Cursor:
- Simply click on any
.ipynbfile, and it will open with Jupyter support
- Simply click on any
-
Start Jupyter Notebook server:
jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser
The port 8888 is automatically forwarded, so you can access it at
http://localhost:8888