This post was written by PSE researcher Miha Stopar.
Post-quantum cryptography (PQC) is important because it addresses the potential threat posed by quantum computers to classical cryptographic systems.
Quantum computers leverage the principles of quantum mechanics to perform calculations exponentially faster than classical computers in certain cases. Two algorithms, in particular, pose significant threats:
If large-scale, fault-tolerant quantum computers become practical, many of today’s encryption, digital signature, and key exchange protocols would be rendered insecure.
Lattice-based cryptography is a promising area within modern cryptography. It is likely the most versatile and performant subfield of PQC. For example, the folding scheme LatticeFold is believed to be as efficient as the fastest traditional elliptic curve-based folding schemes.
The competing non-lattice PQC zero-knowledge proof systems (Ligero, Aurora) base their security only on the security of unstructured hash functions, but they suffer from extremely high demands for computational resources.
In this post, we will discuss some of the challenges involved in constructing zero-knowledge proof systems based on lattices. For a more in-depth explanation, please refer to the video by Vadim Lyubashevsky.
A zero-knowledge proof (ZKP) is a cryptographic protocol that allows one party (the prover) to convince another party (the verifier) that a specific statement is true without revealing any additional information beyond the fact that the statement is true.
Typically, the prover may also wish to demonstrate additional properties of these statements. For instance, suppose the prover wants to prove the knowledge of such that:
and the knowledge of such that
for some public values . Furthermore, the prover would like to prove
for some .
For the zero-knowledge proof of such that , the Schnorr protocol can be employed (technically, it is an honest-verifier zero-knowledge proof, but we will set this detail aside):
Now, the protocol can be easily extended to prove the knowledge of such that . In this case, the prover would also send in the first step and in the third one. The verifier would then check whether .
Note that checking the additional property is straightforward:
Also, for instance, if we had , the linear relation is easy to check:
However, the Schnorr protocol is not quantum-safe, as it relies on the discrete logarithm problem, which can be broken by Shor's algorithm. Can we construct similar zero-knowledge proofs using lattices instead?
The discrete logarithm problem is to find given . There is a somewhat analogous problem in the lattice-based cryptography world: the Shortest Integer Solution (SIS) problem.
The system of linear equations
where and can be solved in polynomial time with Gaussian elimination.
But variations of this problem can be hard. For example, when we require that the norm of is smaller than some bound . Note that the bound needs to be smaller than ; otherwise, is a trivial solution.
The SIS problem is the problem of finding such that
and
Can we do Schnorr-like ZKP for such ?
Let's have such that
and
Would the following protocol work?
The last step of the protocol would be verifier checking whether .
However, this would not work. The problem is that might not be short, and if we don't require to be short, the prover could provide such that by using Gauss elimination!
So, needs to be small. To achieve this, needs to be small as well (note that ), but on the other hand, we want the challenge space to be large—the larger it is, the better the soundness property. Note that if the prover can guess the challenge , the prover sets the first message to and the last one to .
This is one of the reasons why the ring is used—it provides a larger set of elements with small norm this way (polynomials with small coefficients, as opposed to small integers).
In the last step, the verifier must verify whether is small as well.
However, that’s not the end of the problems with the lattice-based version of Schnorr.
Now, if this is a proof of knowledge of , we can extract the value from the prover. This is typically done by rewinding: we run the prover as a black box twice and obtain two transcripts: , , and , , . We get:
In the Schnorr algorithm, one can simply compute
to obtain the secret such that . Using lattices, we obtain (we can assume is invertible) such that . However, again, might not be small!
Thus, using lattices, one can only extract such that
where and .
Note that the value is still small (though not as small as ), and given and , it is still hard to get such and .
In what follows, you will see how the extractor, which returns "only" , can still be utilized to construct lattice-based proof systems.
One of the key steps in the development of lattice-based proof systems was the publication of the paper More Efficient Commitments from Structured Lattice Assumptions. The commitment scheme described in the paper proceeds as follows.
The key generation returns and as
where is random from and is random from .
To commit to , we choose a random polynomial vector with a small norm and output the commitment
A valid opening of a commitment
is a 3-tuple consisting of , , and
The verifier checks that:
Note that the opening for this commitment schemes is not simply and ; it also includes a polynomial This is due to the issue with the extractor described above.
The extractor needs to return the triple such that:
Such a triple can be obtained through rewinding:
Then we have:
where and .
Thus, instead of having , we have .
We extract the message as:
The extracted triple is . It can be easily seen ():
Since the commitment scheme described above, there have been many new improvements in the field of lattice-based zero-knowledge proofs. So expect some new material describing lattice-based and other post-quantum cryptographic schemes soon :). At PSE, we are committed to staying at the forefront of this rapidly evolving field by continuously following and testing the latest advancements in post-quantum cryptography. Our goal is to ensure that we are well-prepared for the challenges and opportunities that come with the transition to quantum-safe systems.