Introducing Noir: The Universal Language of Zero-Knowledge

After 18 months of development we’re thrilled to introduce Noir: the language of zero-knowledge proofs.

Noir is a Rust-based domain specific language (DSL) for creating and verifying zero-knowledge proofs. It’s the easiest way to write zk applications that are compatible with any proving system.

We’re also announcing two new Typescript libraries, NoirJS, which enables the compiling of Noir circuits in the browser, as well as Barretenberg.js, which enables proving and verifying those circuits in the browser.

Get started with Noir

What’s Holding Back ZK App Development?

The current zk stack is cumbersome and hard to understand. Our zk circuit-building counterparts like Circom and ZoKrates are powerful and flexible, but they require knowledge of cryptographic concepts, creating a barrier to widespread developer adoption.

Existing circuit compilation languages require two brains:

  1. a cryptography brain that understands proving systems, trusted setups, and some low-level cryptography, and:
  2. an application developer brain that can reason intuitively about public and private state to create novel blockchain applications

Not many people have two brains! And that means the number of zk app developers today is a small subset of the total number of blockchain devs.

The simplicity of Noir means that having one brain is enough.

By abstracting away underlying cryptographic complexity while retaining all the power and flexibility of other circuit-building languages, Noir allows any developer–not just those with cryptography knowledge–to construct zk apps. Developers can now focus solely on designing the logic behind private applications.

The Single-Brain Solution: the Noir Language

Noir makes the creation of zk circuits–and applications–easier than ever.

Simple, Familiar Syntax

Noir’s likeness to Rust makes it simple, familiar, and easy to understand.

1sKLwTKQdP64UDZUJWTOJ8w

Creating a conditional is as simple as writing “if.” Using other zk circuit writing languages entails downloading circuit libraries, reading them to understand their underlying logic, and then calling library implementations of basic features.

Many basic functions like Pedersen hashes don’t have to be reimplemented in Noir circuits–they’re baked into the language itself.

Example: Circomlib’s implementation of a multiplexer

Noir’s simplicity also means there are myriad quality-of-life improvements over alternative circuit writing languages.

Headache-free dependency management. Noir has its own package manager, nargo, that mocks Rust’s crate and package management system. nargo supports using dependencies uploaded to Github, allowing devs to separate the dependencies of their Noir circuits and the project integrating those circuits.

Simpler circuit debugging. Rather than writing scripts and downloading proving and verifier keys, developers can also use nargo to prove and verify circuits.

Autonomous execution. Finally, straight out of the box Noir allows you to build a compiled Solidity contract to verify proofs on any EVM-compatible blockchain. Smart contract developers can now execute logic based on Noir proofs.

Standard Crypto Library

Noir also possesses a standard library of highly optimized functions commonly used in circuit development.

The stdlib gives developers access to widely used, complex algorithms that are hand-written and tightly optimized by the Aztec team. There is always a trade-off between the simplicity of an abstraction layer and its efficiency — in this case, how efficiently programs are converted into constraints.

The standard library grants developers a high level of circuit efficiency while interacting with a simple, easy to use abstraction layer.

Proving System Agnostic

Finally, because Noir doesn’t compile directly to circuits but to an intermediary representation (akin to LLVM), it is compatible with multiple back-end proving systems including PLONK, Groth16, and Marlin.

We call this intermediate representation an ACIR (Abstract Circuit Intermediate Representation).

Aztec Network has a proving system back-end called Barretenberg that runs on Plonk. But developing with Noir means you can plug in any SNARK-based proving system according to your needs.

Noir in Practice

The intuitiveness of Noir has to be seen to be believed, so we’ve created some sample implementations of circuits in Noir to show you what they look like against common reference code:

Mastermind

Mastermind is a simple number-guessing game, akin to the wildly popular puzzle game Wordle. Our implementation of Mastermind in Noir is approximately half the length of existing reference implementations.

Mastermind in Circom

Mastermind in Noir

Merkle Membership Proof

A Merkle Membership proof allows users to prove they possess a given note in a Merkle Tree. Below we show a sample implementation of a Merkle membership proof in only 10 lines.

Simple shield in Noir

Barretenberg.js

Finally, alongside today’s release of Noir, we’ve developed and published Barretenberg.js–a Noir Typescript wrapper for Aztec’s Barretenberg back-end. It allows application developers to create proofs in Javascript rather than through Rust commands.

The wrapper allows for proof construction straight in the browser, allowing zk developers to quickly and easily create full-stack Noir programs.

Noir abstracts away a lot of cryptography, enabling developers to use cryptographic functionality without concerning themselves with safety, thus lowering barriers to development.

Noir: The Language

The Noir language, being Rust-like, comes with features out of the box that should look familiar to any app developer:

  • Functions
  • Submodules
  • Structs / user-defined types
  • If statements
  • Loops
  • Global constants

And there are a few features we are working on but have yet to implement, like generics and higher-order functions.

Use Cases

Noir can be used today to build zk games much faster than was previously possible. Implementations of Wordle, Battleships, and Mastermind can be done in an afternoon.

With the Barretenberg.js library, developers can also create proofs of membership and identity, blind auctions, and proofs of action on Aztec Connect that can enable private airdrops.

We are convinced that Noir is a transformational step for practical zk development. As such, we’re currently working toward rewriting Aztec’s core circuits using Noir, and we’re continuously working to improve its usability.

Getting Started

You’ve heard of zero-knowledge proofs. You’ve even heard of SNARKs and PLONK and zkRollups. But you’ve never gotten started, because you don’t have a spare brain to dedicate to learning cryptography.

That all changes today. Here’s how to install Noir, compile your first zk program, and verify it in a Solidity contract, all in 15 minutes:

Getting started with Noir

Once you’ve gotten off the ground, show us what you’ve built.

We also have a portion of the Aztec Grants Program dedicated to funding Noir developers with experience writing circuits in languages like Circom, Zokrates, or Leo. If you’re interested in actively participating in Noir development as an early tester, check out our Grants page for more information.

And if you’re headed to Colombia Blockchain Week, we have $20,000 in prizes we’re bringing to ETHBogota for novel zk applications built with Noir.

We’ll be publishing more guides on development with Noir and adding to the tooling infrastructure behind it, with a singular goal — making Noir the universal language of zero knowledge.

Ecosystem

The Noir ecosystem has just gotten off the ground. But now that we’ve shown you what we’re working on, we want you to contribute.

The goal is not a wanton proliferation of standards but a language stack whose universality and flexibility reinforces its utility across ecosystems.

And that means we want to hear from you. Contribute to the language and Barretenberg library, and join us on Discord to talk directly to the Noir team: discord.gg/aztec

Join Us

We’re on the lookout for talented engineers and applied cryptographers. If joining the mission to bring scalable privacy to blockchains excites you — check out our open roles.