Awesome
Awesome Noir
A curated list of resources for learning and programming in Noir.
⚠️ This repository or the contained links are not endorsed as safe and secure by Aztec Labs or the Noir team. Users are advised to exercise caution before utilizing any content or code provided herein.
Contents
Official Resources
Get Coding
Dev Tools
- VS Code Extension - Syntax highlight, error highlight, codelens, etc. (Source Code)
- Neovim Plugin - Syntax highlight, error highlight, etc.
- Emacs Plugin - Syntax highlight (Source Code)
- Zed Plugin - Syntax highlight, LSP support
- Tree-sitter-noir - Tree-sitter grammar for Noir language
- Emacs Tree-sitter Plugin - Syntax highlight (Source Code)
- hardhat-noir - Hardhat plugin (Source Code)
- Python2Noir - From Python to Noir language transpiler
- noir_rs - Rust-based zkSNARK Proving&Verifying tool for noir-lang
- noir_java - Java-based zkSNARK Proving&Verifying tool for noir-lang (Java & Android)
- noir_swift - Swift-based zkSNARK Proving&Verifying tool for noir-lang (macOS & IOS & watchOS)
- hunter - A tool for performing mutation-testing on Noir programs
- merkle tree generator - A tool to help generate Noir-optimized merkle trees
Boilerplates
- noir-starter - Template repository containing example projects using Noir (Vite + Hardhat, Foundry, etc.)
- hardhat-noir-starter - Hardhat starter that seamlessly integrates with Noir.
- noir-react-native-starter - Template repository containing an example minimal project using React Native
- noir-library-starter - Template used by the noir-lang org when creating internally maintained libraries
Proving Backends
- Barretenberg (UltraHonk / MegaHonk) by Aztec Labs
- Plonky2 by Blocksense
- Plonky2 by Eryx
- Nova, HyperNova by 0xPARC and PSE
- Plonky3 by Josef (needs updating)
- Halo2 by Ethan (needs updating)
- Groth16 (needs updating)
- Marlin (needs updating)
Benchmarks
- ZK-Bench - Compare Noir to other ZK frameworks (Risc Zero, Leo, Miden, etc)
Libraries
Noir Directory - A directory of Noir libraries.
Data Types
Numerics
- BigNum - a library for arithmetic computations of large unsigned integers of any length
- Fraction - a library for accessing fractional number data type in Noir, allowing results that aren't whole numbers
- ZKFloat - a floating point library for Noir
- Complex Numbers - This library offers a comprehensive suite of operations for complex numbers
- Fixed Point Library - The FixedPoint library offers precise fixed-point arithmetic operations tailored for Noir
Dates & Times
- Noir Dates - A Noir library to parse and abstract away Dates
- DateTimeNr - A Noir library to parse and abstract away DateTime objects
Data Type Manipulation
Numerics
- Matrix Operations - a library for matrix operations provides functionality for performing various matrix operations
- Statistical Library - Noir Statistical Library is a comprehensive library for statistical computations in the Noir language
- Quantized arithmetic - a library for quantized value operations of zero-point quantization
Bytes
- U(int)2B(ytes) - a library for converting
u8
->u120
s to[u8]
array
Text
- Base64 - a library for base64 encoding
- JSON parser - This library adheres to the revered IETF RFC 8259 specifications, ensuring precise interpretation of JSON-friendly strings
- String Utils - A wrapper for String in Noir that adds some useful methods for common string operations
- Base64 Lib - Extension of
noir_base64
with support for Vectors and Base64 URL encoding and decoding.
Cryptography
Hashes
- Griffin for BN254 - zk-friendly hash function
- Hash to curve - Noir lib for hashing to bigger curves
- Poseidon{2} - an improved implementation of Poseidon and its successor Poseidon2
- SHA-1 - a library for generating hashes using SHA-1 hashing function
- SHA-2 - a library for generating hashes using SHA-2 hashing function
Message Authentication Code (HMAC)
- Noir HMAC - HMAC implementation in Noir Language.
Encryption
- AES - a (naive) implementation of AES encryption and decryption
- ChaCha20 Implementation - a Noir implementation of ChaCha20 as defined by RFC7539
- ElGamal Encryption - Exponential ElGamal Encryption on the Baby Jubjub curve
- Hydra for BN254 - symmetric encryption and decryption
- ECIES - simple implementation of ECIES on the Baby Jubjub curve
- ECDH - simple implementation of ECDH on the Baby Jubjub curve
Signatures
- RSA - RSA signature verification
- BLS12_381 Elliptic Curve Pairing and Signature Verification Library
- PLUME - Noir implementation of the https://blog.aayushg.com/nullifier/ library for zk-signatures
- WebAuthn/Passkeys - WebAuthn/Passkeys signature verification. Verifies signatures produced by
credentials.get
- JWT - Noir library to verify JWT tokens and prove claims. Currently only supports RS256 with 2048 bit keys.
- Noir JWT - Verify JWTs and attest claims in Noir Language
Merkle Trees
- Merkle Root - a library for calculating Merkle root from given inputs. Using the Poseidon function for hashing
- Sparse Merkle Tree Implementation - a typescript library to generate optimized sparse merkle trees
- Sparse Merkle Tree Verifier - a library for verification of sparse Merkle trees
- Sparse Merkle Tree Verify/Add/Update/Delete - a Noir library to verify (non-)membership proofs and add/update/delete leafs
Randomness
Pairing
- Pairing over BLS12-381 - Implementation of pairing over BLS12-381 that uses the new Noir BigNum library
Ethereum
- ECrecover - a library to verify an ECDSA signature and return the source Ethereum address
- Ethereum Storage Proof Verification - a library that contains the primitives necessary for RLP decoding (in the form of look-up table construction) and Ethereum state and storage proof verification (or verification of any trie proof involving 32-byte long keys)
Machine Learning
- Convolution - a library for Convolutional Neural Network (CNN) library in Noir, including Convolutional layers, Pooling layers, and Linear (fully connected) layers
- ML - a library for implementing neural networks in Noir
- SKProof - a Scikit-learn compatible Python library for generating ZK proofs of execution
- zkML-Noir - a library for Python ML model transcoding Noir, including various algorithms such as Decision tree, K-Means, XGBoost, FNN, CNN
Miscellaneous
- Standard Library - the Noir Standard Library
- nodash - a generic utility library. "Lodash for Noir"
- Noir Social Verify - Wrapper around zkemailnr to verify social accounts and extract details like X username, and emails.
Learning
Learning By Doing
- [Practice Exercises] NoirGuardians
- 3 quests that use storytelling and lore to teach basic programming in Noir, along with some advanced features that Noir offers
- Get a first introduction to the Noir language, and learn how to integrate Noir programs into Solidity contracts
- [Educational Curriculum] ZKCamp's Open Source Noir course
- 6 lectures to give participants the knowledge and skills necessary to build decentralized applications based on ZKPs using Noir
- Lessons include ZKP Fundamentals; An Introduction to Aztec Ecosystem; Noir Basics; Building a Noir Application; and Advanced Noir
- [Video Series] BattleZips-Noir (Source Code)
- Walkthrough of building an on-chain Battleships game using zero-knowledge
- Follow along and build your own game using Noir
- [Practice Exercises] Circuit Examples
- Demonstration of dot products & Merkle proofs in Noir, in comparison to Circom and RISC0
- [Educational Demo] scaffold-eth-2-noir
- Small demo of a dApp with ZK-age restriction. UI, smart contracts and ZK-circuits.
- Built with scaffold-eth.
Talks & Workshops
- [10 mins] Writing Circuits with Noir (Source Code)
- Nargo setup
- Basic Noir syntax
- Noir interactions in TypeScript
- [20 mins] Painless Zero-Knowledge Circuitry with Noir at ETHDam
- Introduction to Noir
- Simple demo and test
- [20 mins] Private Value Transfer in 10 Lines (Source Code)
- Tornado-like private asset transfer using Merkle proofs
- [25 mins] Noir as a Smart Contract Language
- Noir as the smart contract language for the Aztec rollup
- Noir smart contracts
- [45 mins] Outlandish Noir Stuff; Workshop at ETHCC
- How to use Noir to build a bunch of outlandish stuff
- [1 hr] Circuit Safety and an Introduction to Noir
- Common circuit bugs
- Proving system vulnerabilities
- Unconstrained functions
- [1.5 hrs] ZK dApps - Why, What and How?
- [1.5 hrs] Sudoku in Noir (Source Code)
- [2 hrs] ZK HACK III - Introduction to Noir (Source Code)
- Code-together: Quadratic Voting
- [1.1 hrs] Noir on Scroll Workshop (Part of Source Code)
Blog Posts & Articles
- Understanding the Technical Aspects of Aztec and Noir
- Noir 101 for Solidity devs in (English) and (Spanish)
- Privacy-preserving KYC with Noir
- An incomplete guide to zk-KYC apps
International Resources
Projects
A curated list of projects powered by Noir.
Authentication
- SafeRecover - Recovery of ownership of Gnosis Safe accounts
- ZCaptcha - A ZK version of Captcha
- ZKPic - generate zero knowledge proofs for image edits
- Safecat - a simple CLI tool to generate, sign, and verify digital signatures using EdDSA Baby Jubjub Elliptic Curve signatures and a Poseidon hash function
Gaming
- BattleZips (Source Code) - On-chain Battleship
- Dappicom - zk Nintendo Entertainment System (NES) emulation
- Sudoku, Wordle, and Trivia - Sudoku, Wordle, and Trivia games in Aleo and Noir
Governance
- Nouns Anonymous Voting - Anonymous voting research project for NounsDAO
KYC
- Educational zk-KYC app - NoirJS app to check age, country and recent salaries.
Social
- FruityFriends - Various circuits (Proof of Intersection, Proof of Proximity, Proof of Proper Secret) to be used in social applications
- Rate Limiting Nullifiers - a zero-knowledge gadget that enables spam prevention in anonymous environments
- StealthNote - an application for people in an organization to anonymously broadcast messages.
Miscellaneous
- Graphite - Python tool for proving graph algorithms
- zkVRF - Provable random number generation service
- Past hackathon winners
- GitClaim - A sample app on top of zkemail.nr to claim airdrops by proving Github contributions using PR merge notification emails.
Contribute
Propose link additions by visiting README.md and click the "pen" icon in the top right corner. Make changes to the file and follow the instructions to create a pull request.