Learning Zero Knowledge Proofs (ZK) with Noir - A simple password verification implementation using Zero Knowledge Proofs.
This project demonstrates a basic implementation of password verification using Zero Knowledge Proofs with Noir. Instead of revealing the actual password, the system proves knowledge of the correct password without exposing it.
Zero Knowledge Proofs allow one party (the prover) to prove to another party (the verifier) that a statement is true without revealing any information beyond the validity of the statement. In this project's context:
- The prover demonstrates they know the correct password
- The verifier can confirm this is true
- The actual password is never revealed in the process
Noir is a Domain Specific Language for writing zero-knowledge proofs. It offers:
- Simple, Rust-like syntax
- Built-in cryptographic primitives
- Efficient proof generation
- Strong type system
- Growing ecosystem and tooling
- Install Nargo (Noir's package manager):
curl -L https://github.com/noir-lang/noir/releases/download/v1.0.0-beta.1/nargo-x86_64-unknown-linux-gnu.tar.gz -o nargo.tar.gz
tar -xvf nargo.tar.gz
sudo mv nargo /usr/local/bin/
- Install Barretenberg (the proving system backend):
curl -L https://raw.githubusercontent.com/AztecProtocol/aztec-packages/refs/heads/master/barretenberg/bbup/install | bash
- Compile the circuit:
nargo compile
- Create a witness:
nargo execute
- Check the circuit:
nargo check
Created by @leovido.eth
This project is MIT licensed.