Blog
The technical content top engineers rely on to level up.
6 min read
ZK Friendly Hash Functions
ZK-friendly hash functions are hash functions that require much fewer constraints to prove and verify than traditional cryptographic hash functions.
6 min read
The Permutation Argument
A permutation argument is a proof that two lists hold the same elements, but possibly in a different order.
24 min read
Modeling the Stack Data Structure in ZK
This tutorial shows how to create a stack in Circom. Be warned — this chapter is long.
4 min read
MD5 Hash In Circom
In this tutorial, we will implement the MD5 hash in Circom both to compute the hash and to constrain in Circom that it was computed correctly.
8 min read
32-Bit Emulation in ZK
The default datatype in ZK is the field element, where all arithmetic is done modulo a large prime number.
6 min read
Intermediate Signals and Sub-Component
Circom’s primary purpose is to compile down to a Rank 1 Constraint System (R1CS), but its secondary purpose is to populate the witness.
3 min read
Circom Components in a Loop
Circom does not allow for components to be directly instantiated in a loop. For example, compiling the following code results in the error below.
12 min read
Compute Then Constrain
"Compute then constrain" is a design pattern in ZK circuits where an algorithm's correct output is first computed without constraints.
3 min read
Quadratic Constraints
A Rank 1 Constraint System has at most one multiplication between signals per constraint. This is called a "quadratic" constraint.
10 min read
Hello World Circom
This chapter shows the relationship between Circom code and the Rank 1 Constraint System (R1CS) it compiles to.
6 min read
Indicate Then Constrain
The solution is to create indicator signals of the different conditions (e.g., x being less than 5, or being greater than 17), then apply constraints to…
11 min read
Introduction to ZK Circuits with Circom
Circom is a programming language for creating Rank 1 Constraint Systems (R1CS) and populating the witness vector of the R1CS.