LatticeFold
This article aims to intuitively explain the goals and processes of the LatticeFold protocol.
Last updated
This article aims to intuitively explain the goals and processes of the LatticeFold protocol.
Last updated
is the first lattice-based folding scheme. Folding schemes require a Homomorphic Additive Commitment Scheme, which is why Pedersen commitments are commonly used. These elliptic curve-based commitments are vulnerable to quantum computing attacks, require large-sized fields, and rely on non-native field arithmetic for folding verification. In contrast, LatticeFold uses Ajtai commitments based on the Module SIS problem, which is known to be quantum-resistant, supports small-sized fields, and is cost-efficient to verify.
A circuit is typically expressed as , where the public input x and witness w represent a certain relation . For example, a circuit representing could have relations such as and satisfying it. While public inputs act as constraints on the relation, since witnesses must be kept hidden, a ZK SNARK proof ensures the relation is held accordingly.
As shown in Fig. 1, some cases require expressing sequences of computations. For example, and represent the four steps in computing the square root of . Such computational sequences are common, with zkEVMs and zkVMs being other notable examples.
The computational expense of generating a SNARK proof for is a major challenge. This inefficiency is compounded when there are multiple instances satisfying the relation, as generating separate proofs for each instance is costly. For example, creating two separate SNARK proofs for and , both satisfying the same relation , can be prohibitively expensive.
In comparison, a folding scheme creates a single new pair from and that also satisfies the relation . Then, the SNARK proof for the folded not only validates the new relation but also proves the relations for the original pairs and . Generating and verifying folding proofs is faster and cheaper than doing the same with SNARK proofs. Therefore, instead of recursively generating and verifying SNARK proofs, the process is optimized by using folding proofs for intermediate steps before creating a final SNARK proof. The example shown here demonstrates 2-to-1 folding, but some folding schemes support n-to-1 folding.\
Folding generally employs a technique called Random Linear Combination (RLC) where values are combined together with a random value. To ensure succinctness and to hide the witness, the prover uses commitments of the witness to apply RLC. This means that the commitment must support additive homomorphism.
Since FRI-based STARKs use Merkle Trees as commitments, which do not satisfy the additive homomorphism property, folding schemes cannot be used in FRI-based STARK systems.
A lattice refers to a combination of points following a repetitive pattern, defined as:
Here, a set of is called the basis, is the rank, and is the dimension, satisfying . The basis vectors must be linearly independent, defined as:
A given lattice can be created with different bases. One notable problem in lattices is the Shortest Vector Problem (SVP), which asks for the shortest vector that can be formed given a basis. For instance:
Given a uniformly random integer matrix and , find a non-zero integer vector () such that and .
Ajtai demonstrated a worst-case-to-average-case reduction, proving that solving SIS implies solving SVP. The key insight here is that the random matrix allows uniform sampling of bases, retaining the complexity of hard lattice problems and making them practical for cryptographic applications. This was a pivotal step in advancing lattice-based cryptography.
The Module SIS (M-SIS) with problem, a generalization of SIS, serves as the foundation for LatticeFold. It is defined as:
In LatticeFold, the matrix and witness vector create a commitment , which is called an Ajtai commitment. For a commitment scheme, the following properties are required:
Hiding: The original message cannot be inferred from the commitment. This is satisfied if is randomly sampled.
Binding: Each commitment maps to one original message with high probability. If the same commitment is created from two different and , it is equivalent to solving the M-SIS with , which is probabilistically very difficult.
Compression: The commitment size is smaller than the original message. This is achieved if .
Additionally, unlike SIS, M-SIS leverages rings instead of fields, introducing challenges in proving knowledge soundness. Specifically, not all ring elements are invertible, and even if they are, their norms can become excessively large, necessitating solutions to address this.
The Ajtai commitment supports additive homomorphism, making it suitable for folding schemes, which use random linear combinations. To preserve the binding property, the norm of the random linear combination of two witness vectors must stay within a certain boundary . If performed naively like shown below, the norm may become excessively large, exceeding .
In LatticeFold, the (infinity norm) is used for norm calculations. For a vector , the infinity norm is defined as:
From this point onward, we use the infinity norm even without an infinity symbol.
LatticeFold is divided into three steps: Expansion, Decomposition, and Fold.
The difference between the two relations lies with . For simplicity, the public value will be omitted.
In the Expansion step, is transformed into using the zero vector. This transformation is necessary because, in the Fold step, the structure must conform to the format of .
Remember that this takes as input and produces . See Fig 6. above
The Decomposition proceeds through the steps below for each relation:
The prover provides to the verifier, satisfying the following conditions:
The verifier checks the following conditions
If the conditions above are satisfied, each is transformed into instances of .
By applying this to the , the number increases from to . This is done to restrict the norm size to , which should be smaller than , preventing the norm from growing excessively during the Fold step. However, note that the range check for each has not yet been performed.
To verify that the values from the previous step lie within the range , the following polynomial will be used.
If a value is sampled within and evaluated with , the result must be 0 for the range check of to succeed (This is used in Step 2 below.).
As mentioned earlier, it is also crucial to sample random values effectively. For this purpose, we sample from , known as a strong sampling set. Even when multiplied by sampled from this set, the norm increases by at most a factor of , known as the expansion factor. If , the norm of the folded witnesses will remain less than . It can be formally described as:
This takes as input and produces .
The Fold proceeds through the steps below:
The verifier samples and sends them to the prover.
The prover performs the sumcheck protocol to prove the following.
At the end of the sumcheck protocol, the following evaluation claim is obtained:
The prover sends to the verifier, where:
The verifier checks the following condition:
The verifier samples from and sends them to the prover. Using these, a new relation is created.
Using the of all the basis vectors, the solution to the SVP for this basis is found to be formed by (). This problem becomes significantly harder with poorly chosen bases and higher dimensions, posing challenges even for quantum computers.
The Short Integer Solution (SIS) problem was introduced in, defined as:
Given and , with a uniformly random matrix and , find a non-zero vector such that and . Here, is a cyclotomic polynomial (), specifically one where is a power of 2.
This image above is taken from . As shown above, we first define the multilinear extension (MLE), and then define the following two relations.
This image above is taken from . As shown above, we first define the multilinear extension (MLE), and then define the following two relations.
Although not covered in detail here, the paper also discusses the use of extension fields to enable smaller field sizes and methods to apply this approach to ’s . However, some aspects of LatticeFold limit its application to Protostar's, leaving it an open problem. The significance of LatticeFold lies in it being the first to apply lattice-based cryptography to folding schemes, paving the way for incorporating lattice-based folding schemes into STARKs.
Written by from A41