Advances in quantum computing has quickly turned many of our modern cryptographic standards obsolete. Here, we talk about new hard problems which are forming the new basis of post-quantum cryptography.
Lattice Based Cryptography
Lattices
An -dimensional lattice is an additive discrete subgroup of . Given a basis forming , we can use it to define a lattice as
In other words, the integer linear combinations of the basis vectors.
This forms a grid of points in space!
Given two bases , they define the same lattice if and only if , where is a unimodular matrix, an integer matrix with determinant equal to .
With lattices, we have the following hard problems. Given “approximation factor” :
- Shortest Vector Problem (SVP): Given a basis , find a non-zero vector in the lattice whose length is at most .
- Shortest Independent Vector Problem (SIVP): Given a basis , find a linearly independent set such that all vectors have length at most .
- Gap Shortest Vector Problem (GapSVP): Given a basis , and a radius ,
- Return YES if
- Return NO otherwise.
Shortest Integer Solution (SIS)
Consider the following scheme called the Shortest Integer Solution (SIS) problem.
Given a random public matrix , find the shortest vector such that
In other words, find the shortest vector that is in the null-space of .
Finding vectors in the nullspace is not hard. However, finding the shortest vector in a space is hard!
Learning with Errors (LWE)
Since lattices are often hard to work with, we have a simplified representation. Now, many of us use the intermediate problem Learning with Errors (LWE).
(Search) LWE has the following setup:
- Take with random entries, with random (and small) noise.
- Given and (under ), compute (where is chosen randomly).
In our case, we will consider ’s entries to take on values with probability each.
There is also an equivalent Decisional LWE problem.
- You are given or , where is chosen randomly.
- Try to distinguish which one you got.
Both search and decision LWE are equally hard.
Regev’s Cryptosystem
LWE sets up a post-quantum scheme called Regev’s Cryptosystem.
First, choose a random public matrix from , and a random secret vector . Then, use LWE to compute
Where is small. Here, will be our public key, and will be our secret key.
For our purposes, we will say that .
Our scheme works as follows:
-
Encryption: For chosen at random, compute . Then, compute . Our ciphertext is .
- Here, we choose the size of to be larger than the output size, so that we cannot recover (since we lose information)
-
Decryption: Compute to get
And because is small, we will locally be close to a single message point, letting us unambiguously determine what our message is. This requires we set things up so that .
In the case that our setup is secure, then essentially functions as a one-time pad, as it yields a random result.
Rejection Sampling
Suppose we want to sample from a distribution with probability density function . However, we are only given draws from a distribution with probability density function . Could we simulate sampling from with ?
Sometimes, it may be cheaper or simpler to sample from than .
If we assume that for all , , then we can do this as follows:
- For , sample from .
- Accept with probability .
This will give us a scaled version of . This is because
Thus, after normalizing, we can recover our desired distribution.
Lyubashevsky’s Scheme
Rejection sampling lets us create a lattice-based signature scheme, known as Lyubashevsky’s Scheme.
- Prover:
- Compute , where has small entries. Then, our public key is , and our secret key is .
- Now, compute from the Gaussian distribution. Compute .
- Hash this to get , and compute . Output .
- Verifier:
- A verifier can compute . Now, check that and is short.