Identity Protocol Documentation Circom 2.0 Blog

Efficient circuit framework for programmable zero-knowledge

Circom is a circuit programming language and a compiler that allows programmers to design and create their own arithmetic circuits for ZK proofs.

Circom 2.0

Circuit Compiler for Zk Proving Systems

Circom is a novel domain-specific language for defining arithmetic circuits and its associated compiler written in Rust language.

Our open-source library of templates called CircomLib is publicly available to practitioners and developers. The library contains multiple circuit templates that have been reviewed and proven to work by our research team.

The implementations of proving systems are also available in our libraries including SnarkJS, written in Javascript and Pure Web Assembly, wasmsnark written in native Web Assembly, rapidSnark written in C++ and Intel Assembly. Our team is currently working in the development of RapidPLONK and a run-time architecture for ARM processors.

This way, Circom aims to provide developers a holistic framework to construct arithmetic circuits through an easy-to- use interface and abstract the complexity of the proving mechanisms.


Efficient

Open Source

Flexible

Features

Expressivity and balance

Circom closes the gap between developers and privacy-preserving technologies to impulse full adoption of the privacy by design framework.

The main concept is to keep a fair balance between the flexibility and full control of the arithmetic circuit designs written in a low-level language and the easiness and developer-friendliness of high-level languages.

By enabling full control of number of constraints and prevent the inefficiency of redundant linear constraints caused by modularity, Circom highly simplifies the construction process of arithmetic circuits in a reliable and developer-friendly way.


Reusable components

CircomLib is an open-source library of templates provided with hundreds of circuits such as comparators, hash functions, digital signatures, binary and decimal convertors, and many more.

All templates defined in the Circom libraries have been manually proved and are guaranteed to be safe by construction. The idea of building large and complex circuits from small individual components makes it easier to test, review and audit the resulting code.

Circom helps programmers to work in a modular fashion by defining small pieces and combining them to create large circuits that describe complex real-world problems.

Users can create their own custom templates, but using circuits from the library has the advantage to having been reviewed by our research team and our supporting open-source community.


Efficient Compiler

The architecture behind Circom provides a holistic framework for building privacy-enabled applications.

In addition to constructing efficient arithmetic circuits and generating their constraints, it also abstracts the complexity of the underlying proving mechanism.

Circom can be completed by SnarkJS, our zk-Snark tool developed to automatize the generation and verification of proofs. The crypto-compiler also generates smart contract code for the proof verification, concretely Solidity code, which is one of the most widely used languages for writing smart contracts.

The novelty of our architecture relies on separating the description of the computational problem from the specific ZK protocol and it has always been conceived as an adaptable compiler to other arithmetic circuit encodings.

Furthermore, our framework covers the trusted setup phase through the multi-party computation (MPC) generation, which allows independent parties to set collaboratively the trusted setup parameters.


Community-oriented

Circom is largely a community-driven project, with an active Telegram chat and the support from venture-capital investors of the web3 success-story Dark Forest.

Circom receives valuable contributions from developers from the entire world, among them Ethereum Foundation Grant recipients, who help us reviewing the circuits library.

Circom itself has received a grant from the Ethereum Foundation, which helped the project to move past its first phase with Circom 2.0.

Integration with Zero-Knowledge SNARK proving systems

Groth16 (Snark)

  • Considerably small proof size

  • Faster proving and verification speed

  • Technically mature proof widely used in many projects

PLONK

  • Universal trusted setup

  • Multi-party computation (MPC) integrated by design

  • Great scalability

References

Circom 2.0 in depth review

Following the links below you can find further detailed technical information about Circom 2.0, such as: documentation, Github repository and related research articles and videos.

Battle tested and embraced by community

Circom and SnarkJS have been successfully used for building several projects currently in production within the Ethereum network