███╗ ███╗ ██╗ ██╗ ███████╗ ██╗ ██╗ ██████╗ 🦀
████╗ ████║ ╚██╗ ██╔╝ ╚══███╔╝ ██║ ██╔╝ ██╔══██╗ 🦀
██╔████╔██║ ╚████╔╝ ███╔╝ █████╔╝ ██████╔╝
██║╚██╔╝██║ ╚██╔╝ ███╔╝ ██╔═██╗ ██╔═══╝ 🦀
██║ ╚═╝ ██║ ██║ ███████╗ ██║ ██╗ ██║ 🦀
╚═╝ ╚═╝ ╚═╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝ 🦀
MyZKP is a Rust implementation of zero-knowledge protocols built entirely from scratch! This project serves as an educational resource for understanding and working with zero-knowledge proofs.
- 🌟 Explore the accompanying textbook: Book of MyZKP.
- 📢 Contributions and feedback are encouraged to help make this project even better!
Warning
This repository is a work in progress and may contain bugs or inaccuracies. Contributions and feedback are welcome!
MyZKP is a growing library that provides:
- A step-by-step guide to the theoretical foundations of ZKPs, including number theory, elliptic curves, and field arithmetic.
- Implementation of core primitives for ZKP protocols.
- A solid base for developers and researchers to learn, experiment, or build their own ZKP-based systems.
💡 Whether you're a cryptography enthusiast, a Rustacean, or a student, MyZKP is for you!
🧮 Basic of Number Theory
- 📝 Computation Rule and Properties
- ⚙️ Semigroup, Group, Ring, and Field
- 🔢 Polynomials
- 🌐 Galois Field
- 📈 Elliptic Curve
- 🔗 Pairing
- 🤔 Useful Assumptions
🔒 Basic of zk-SNARKs
🌟 Basic of zk-STARKs
- ✍️ TBD
💻 Basic of zkVM
- ✍️ TBD
Module | Submodule | Description | 📂 Path |
---|---|---|---|
albebra | ring |
Defines Ring | ring.rs |
field |
Defines Finite Field | field.rs | |
efield |
Field Extension (Galois Field) | efield.rs | |
Polynomial |
Polynomial Arithmetic | polynomial.rs | |
curve |
Elliptic curve operations | curve | |
Arithmetization | r1cs |
Rank One Constraint System | r1cs.rs |
qap |
Quadratic Arithmetic Program | qap.rs | |
zkSNARKs | tutorial_single_polynomial |
tutorial_single_polynomial | |
tutorial_snark |
tutorial_snark | ||
pinocchio |
Pinocchio Protocol | pinocchio.rs |
We welcome your ideas, feedback, and contributions!
💡 Here are ways to contribute:
- Report Issues: Found a bug or have a suggestion? Open an issue!
- Submit Pull Requests: Have code improvements? Feel free to submit them.
- Write Documentation: Help us make the educational modules clearer.