Hands-on experiments exploring Zero-Knowledge (ZK) systems and concepts.
zk-labs is a collection of small, self-contained labs documenting practical experiments, learnings, and insights for exploring Zero-Knowledge proofs, verifiable computation, and privacy-preserving systems.
Each lab includes:
- A clear goal or question
- The approach or implementation steps
- The result or output
- The learning and conclusion
| Lab | Title | Focus | Status | Description |
|---|---|---|---|---|
| 01 | Merkle Commitments | Commitments, inclusion proofs | ✅ Completed | The goal is to build and analyze Merkle trees as cryptographic commitments. The lab implements a tree structure, generates proofs for leaf inclusion, and verifies them using only the root hash. It introduces commitment schemes, hash-based integrity, and the concept of succinct verifiability — the foundation of most Zero-Knowledge systems. |
| 02 | Hash Preimage Proof | zkSNARK basics (Groth16) | ⏳ Planned | Focused on creating a first Zero-Knowledge Proof using a Groth16 zkSNARK circuit. The goal is to prove knowledge of a secret x such that H(x) = h, without revealing x. It introduces the notion of witnesses, public inputs, constraints, and trusted setups, forming the base for understanding ZK circuits. |
| 03 | Merkle Membership Proof | Private set membership | ⏳ Planned | Builds upon the first two labs by combining Merkle commitments with Zero-Knowledge techniques. The experiment proves that a hidden leaf belongs to a known Merkle root without disclosing its value or position. This type of private set membership proof underpins privacy-preserving systems such as Tornado Cash or Semaphore. |
| 04 | Range Proof | Value ranges, Halo2 or Bulletproofs | ⏳ Planned | Explores proofs of numerical relationships. The objective is to demonstrate that a secret number x lies within a valid range (for example, 0 ≤ x < 2^32) without revealing the actual value. It introduces constraint systems, arithmetic gadgets, and modular reasoning, often used in confidential transactions. |
| 05 | zkVM Hash Verification | Deterministic execution, zkVMs | ⏳ Planned | Transitions from static circuits to verifiable computation. The lab runs a small deterministic program (such as a hash function) inside a zkVM (Risc0 or SP1) and generates a proof of correct execution. It explores how zkVMs generalize SNARKs by proving the correctness of arbitrary programs without rewriting them as circuits. |
| 06 | SP1 zkVM Exploration | zkVM comparison & performance | ⏳ Planned | Focuses on hands-on experimentation with SP1, the zkVM referenced by Babylon Labs. The goal is to evaluate proof generation, verification, and performance metrics. It includes a comparison with Risc0, analyzing proof size, proving time, determinism, and developer experience. |
| 07 | zk Light Client | Verifiable state proofs | ⏳ Planned | Applies previous concepts to design a simplified zk light client capable of verifying blockchain-like state transitions using ZK proofs. It uses block headers, Merkle proofs, and proof verification to validate state consistency, illustrating how Zero-Knowledge systems can improve scalability and trust minimization. |
| 08 | Verifier Service | Proof verification API | ⏳ Planned | The final lab integrates cryptographic verification into a service. The objective is to expose proof verification through a lightweight API that receives and validates proofs. This stage connects cryptographic computation with system design, addressing reproducibility, performance, and deployment considerations. |
Cryptography enables entities or individuals who do not trust each other to cooperate through irrefutable mathematical proofs. Zero-Knowledge Proofs take this principle to the next level, allowing trust to be established without revealing the underlying information.
This repository is an open, ongoing journey to understand and apply those ideas through small, reproducible experiments. Each lab explores how verifiable computation, privacy, and integrity can coexist in modern systems.
zk-labs/ ├── labs/ │ ├── 01_merkle_commitments/ │ │ ├── src/ │ │ └── README.md │ ├── 02_hash_preimage_proof/ │ ├── 03_merkle_membership/ │ └── ... └── README.md Cristian Spinetta | GitHub | LinkedIn
Software Engineer exploring practical applications of Zero-Knowledge cryptography.