This repository contains a Jupyter notebook tutorial demonstrating various concepts of zero-knowledge proofs through interactive examples.
Zero-knowledge proofs are cryptographic methods that allow one party to prove to another that they know a value without revealing the actual value. This tutorial explores:
- Basic principles of zero-knowledge proofs
- Interactive verification protocols
- Graph coloring as a zero-knowledge proof example
- Practical implementation details with visualizations
- Python 3.10 or higher
uv(Python package installer and environment manager)- Git
First, clone this repository to your local machine:
git clone https://github.com/balancedscorpion/zero-knowledge-proof.git
cd zero-knowledge-proofuv is a fast Python package installer and environment manager. Here's how to set up and run the tutorial:
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"uv venvThis will create a virtual environment in a .venv directory in the current folder.
# macOS / Linux
source .venv/bin/activate
# Windows
.venv\Scripts\activateuv pip install .This will install all dependencies specified in the pyproject.toml file.
jupyter notebookThis will open a browser window with the Jupyter notebook interface. Navigate to the tutorial notebook and open it to begin.
The tutorial is organized into the following sections:
- Introduction to Zero-Knowledge Proofs
- Basic Interactive Proofs
- Graph Coloring ZKP Example
- Practical Applications
- Hands-on Exercises
Contributions to improve the tutorial or add new examples are welcome! Please feel free to submit a pull request.
Created by balancedscorpion
This project is licensed under the MIT License - see the LICENSE file for details.