Skip to content

Learning ZK with Noir - Simple password verification in ZK with tests

Notifications You must be signed in to change notification settings

leovido/zk-explorations-noir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zk-password

License: MIT Noir ZK Tests

Learning Zero Knowledge Proofs (ZK) with Noir - A simple password verification implementation using Zero Knowledge Proofs.

Overview

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.

What is Zero Knowledge?

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

Why Noir?

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

Getting Started

Prerequisites

  1. 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/
  1. Install Barretenberg (the proving system backend):
curl -L https://raw.githubusercontent.com/AztecProtocol/aztec-packages/refs/heads/master/barretenberg/bbup/install | bash

Basic Commands

  1. Compile the circuit:
nargo compile
  1. Create a witness:
nargo execute
  1. Check the circuit:
nargo check

Learning Resources

Author

Created by @leovido.eth

License

This project is MIT licensed.

About

Learning ZK with Noir - Simple password verification in ZK with tests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published