Zero Knowledge
Browse all Zero Knowledge articles.
3 min read
Quin Selector
The Quin Selector is a design pattern that allows us to use a signal as an index for an array of signals.
4 min read
Introduction to Stateful Computations in ZK
When carrying out iterative computations such as powers, factorials, or computing the Fibonacci sequence, we need to “stop the computation” after a…
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.
3 min read
Swapping Two Items in an Array in Circom
This chapter shows how to swap two signals in a list of signals. This is an important subroutine for a sorting algorithm.
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.
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…
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
Circom Template Parameters, Variables, Loops, If Statements, Assert
This chapter covers essential syntax, which you'll see in most Circom programs.
21 min read
Range Proof
A range proof in the context of inner product arguments is a proof that the scalar v has been committed to V and v is less than 2^n for some non-negative…
6 min read
Reducing the number of equality checks (constraints) through random linear combinations
Random linear combinations are a common trick in zero knowledge proof algorithms to enable m equality checks to be probabilistically checked with a…
6 min read
Bulletproofs ZKP: Zero Knowledge and Succinct Proofs for Inner Products
Bulletproofs ZKPs allow a prover to prove knowledge of an inner product with a logarithmic-sized proof. Bulletproofs do not require a trusted setup.
9 min read
Logarithmic sized proofs of commitment
We also showed that the outer product "contains" the inner product along its main diagonal.