Latice Based Cryptography
Latice Based Cryptography
1
Mathematical Institute, Leiden University, The Netherlands
2
Univ. Bordeaux, CNRS, Inria, Bordeaux INP, IMB, Talence,
France
2
PQShield, [email protected]
I Lattice terminology 8
1 Introduction 9
3 Structured lattices 36
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.1.1 Efficiency . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.1.2 Structure vs. Security . . . . . . . . . . . . . . . . . . . . 36
3.1.3 Module lattices in NIST candidates . . . . . . . . . . . . 37
3.2 Number fields and number rings . . . . . . . . . . . . . . . . . . 37
3.2.1 The Minkowski embedding . . . . . . . . . . . . . . . . . 38
1
3.3 Ideal Lattices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.4 Module Lattices . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
2
III Structured attacks 91
7 Attacks on ideal lattices 92
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
7.2 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
7.3 Solving Ideal-SVP in cyclotomic fields . . . . . . . . . . . . . . . 95
7.3.1 Plan for Solving Ideal-SVP in Cyclotomic Fields . . . . . 95
7.3.2 Finding a close principal multiple . . . . . . . . . . . . . . 96
7.3.3 Finding a generator of the principal ideal . . . . . . . . . 97
7.3.4 Reducing the generator . . . . . . . . . . . . . . . . . . . 98
7.4 A Quantum Attack on Ideal Lattices in General Number Fields . 99
7.4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 99
7.4.2 Differences between generalized and cyclotomic attack . . 99
7.4.3 Sketch of the attack . . . . . . . . . . . . . . . . . . . . . 100
7.4.4 The Log-S-unit lattice and the problem of positive expo-
nents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
7.4.5 Quality of the output . . . . . . . . . . . . . . . . . . . . 102
7.4.6 Complexity and quality of the output . . . . . . . . . . . 103
7.5 Quantum algorithm for computing (S-)unit groups and class groups103
7.5.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
7.5.2 The Hidden Subgroup Problem . . . . . . . . . . . . . . . 105
7.5.3 Preliminaries for the Oracle Function . . . . . . . . . . . 105
7.5.4 The oracle function for finding the generator of a principal
ideal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
7.5.5 The oracle function for finding the discrete logarithm in
the class group . . . . . . . . . . . . . . . . . . . . . . . . 107
IV Appendix 124
3
Preface
Table 1: The NIST algorithms, selected for standardization and fourth round
finalists, and their underlying cryptographic assumptions. In this survey we will
consider only the first three, as those are based on lattices.
4
Chapter 1 is an introduction that gives a rough, intuitive idea how lattice-based
cryptography works and where it is built on.
Part I In Chapter 2, Sections 2.1 to 2.3 are about lattices, bases, fundamental
domains, relevant computational problems, projection and orthogonalization.
These sections can be considered as preliminaries.
Sections 2.5 to 2.9 are about so-called basis reduction algorithms, whose,
given a basis of a lattice, attempt to find a new basis of such lattice with better
qualities. Finding such a good quality basis is one of the ingredients for attacks
on lattice-based cryptosystems.
These basis-reduction algorithms in a rather large-dimensional basis of a
lattice require the ability to find exact short vectors in lower dimensional lattices.
How to find such short vectors is treated in Sections 2.10 to 2.12. To summarize,
in Chapter 2 essentially all attacks on lattice-based cryptography are roughly
treated.
Chapter 3 is about structured lattices, which are lattices based on number
rings. These number rings are succinctly treated in Section 3.2 and ideal lattices
and module lattices are defined in Sections 3.3 and 3.4.
Next, in Chapter 4, the computational problems NTRU and LWE are in-
troduced. The ‘plain’ variants of these are explained in Section 4.2 (LWE) and
Section 4.4 (NTRU), where the precise definitions are in Sections 4.2.5 and 4.4.5.
The other sections (Sections 4.3 and 4.5) show the structured variants of LWE
and the ‘unstructured’ variant of NTRU; and shows how to transform structured
LWE into unstructured LWE.
5
Chapter 2:
Overview of lattice
terminology and
techniques
Chapter 4: Chapter 3:
NTRU & LWE Structured Lattices
Chapter 5: Chapter 7:
Attacks on General Lattices Structured Attacks
Chapter 6:
The fine-grained costs
of BKZ and SVP
Figure 1: In this diagram is depicted which two main reading routes can be
followed; the left part is the ‘unstructured route’ which mainly treats general
lattices and attacks thereof. The right part is the ‘structured route’, which
is more focused on structured lattices (module and ideal lattices) and specific
structured attacks.
6
Acknowledgments
The work of the first author was funded by the AIVD (the General Intelligence
and Security Service of the Netherlands) with the aim of stimulating further
work on the security foundations of post-quantum cryptography standards. The
second author performed an initial part of this work while employed in the
Cryptology Group at CWI in Amsterdam and the remainder while employed
at the University of Bordeaux with support of the CHARM ANR-NSF grant
(ANR-21-CE94-0003). We thank Ronald Cramer (CWI Cryptology Group and
Mathematical Institute, Leiden University) for his contributions to the initiation
of this project and to its scoping.
7
Part I
Lattice terminology
8
Chapter 1
Introduction
Lattices are, among others, one of the most promising mathematical objects to
base cryptography on. Indeed, some of the NIST candidates for standardization
for post-quantum cryptography are based on lattices.
In this introduction we wish to give you an intuition on how lattice-based
cryptography works and what the underlying assumptions are. For simplicity,
we choose to explain a simple public-key cryptosystem based on lattices.
Public-key cryptosystem
A public-key cryptosystem allows for an individual, say Alice, to securely send
a message over an untrusted channel to another individual, say, Bob, in such a
way that only Bob can read the message.
The message Alice wants to send is encrypted using a public key (pk) that
Bob had announced publicly before. She then sends the encrypted message
Encpk (message) over the insecure channel to Bob, who then decrypts the en-
crypted message using his secret key (sk), see Figure 1.1.
Ignoring for the moment the inner workings of the encryption and decryption
algorithms, it is of fundamental importance for the security of the cryptosystem
9
Figure 1.2: A good basis of a lattice is short and somewhat orthogonal, which
allows to round a point nearby a lattice point successfully. A bad basis has long
vectors that are not orthogonal and does not allow for rounding successfully.
that the secret key is known only to Bob and that it cannot be (computationally)
recovered from the information that has been transported over the channel, e.g.,
the public key.
Encryption
The fact that only a good basis allows for efficient and successful rounding
suggests an encryption mechanism. Suppose Alice’s message can be encoded in
a lattice point1 ; then adding a small error to this lattice point hides this original
lattice point, see Figure 1.3.
Decryption
As only a good basis can ‘round’ well, and Bob is the only one that knows the
good basis, he can efficiently and successfully recover the original lattice point
Alice intended to sent, see Figure 1.4.
1 One can, for example, publicly agree beforehand to label some lattice points with letters
10
Figure 1.3: Using the public key, Alice can choose a lattice point to send to
Bob, and adds a small error to hide the lattice point for eavesdroppers.
Figure 1.4: Using the secret key, the good basis, Bob can efficiently round the
disturbed point to its original lattice point, and recovers the message Alice
intended to sent. A bad basis does not allow to round successfully and thus
someone other than Bob cannot recover Alice’s message.
11
Chapter 2
Overview of lattice
terminology and techniques
2.1 Notation
We denote by N, Z, Q, R, C the natural numbers, the integers, the rationals, the
real numbers and the complex numbers respectively. For k ∈ N we will denote
[k] = {1, . . . , k}. We denote a vector space V in uppercase. Vectors v in V
are always considered column-wise and denoted in lowercase bold, and matrices
M = (m1 , . . . , mn ) in uppercase bold with columns mi . We will consistently
denote n for the lattice dimension, r for the module-lattice rank and t for the
number field degree.
We use the standard Landau-notation O(·), Ω(·) and Θ(·) for asymptotic
behavior of functions, and occasionally the ‘soft version’ Õ(·) of the Big O, in
which polylogarithmic factors of the argument are hidden.
2.2 Lattices
2.2.1 Introduction
Intuitively, lattices can be considered as ‘discrete’ analogues of vector spaces1 .
So, as real vector spaces V can be seen as the R-span of certain basis vectors
{bj | j ∈ [n]},
n
X
V = cj bj | cj ∈ R for all j ∈ [n] ,
j=1
lattices L ⊆ V can be considered as the Z-span of such basis vectors:
n
X
L= cj bj | cj ∈ Z for all j ∈ [n] . (2.1)
j=1
1 Throughout this survey, we will only consider finite-dimensional vector spaces.
12
Mostly (especially in cryptography) one is particularly interested in certain geo-
metric properties of the lattice, for example the length of the shortest non-zero
vector in L. For this reason, one requires a well-behaved length notion on the
vector space V , which is then to be inherited by the lattice L. More precisely,
one would like the vector space to have an inner product; such vector spaces of
finite dimension over the real numbers enriched with a inner product are called
Euclidean vector spaces.
of the space V .
3 This follows from the fact that lattices have no torsion: there are no elements v ∈ L or
13
Lemma 1 (Basis). Every lattice L is a free module over Z, and therefore has
a Z-basis B = (b1 , . . . , bn ). In other words,
( n )
X
L= ci bi | ci ∈ Z .
i=1
Covolume of a Lattice
The volume Vol(P(B)) = Vol(span(L)/L) of the fundamental domain P(B)
does not depend on the basis B of L, and is called the covolume Vol L of L.
This is a rough measure of the ‘sparsity’ of the lattice L.
Definition 3 (Covolume). The covolume Vol L of a lattice L is defined as
14
b2
b2 b1
b1
Figure 2.1: In this picture two bases (green, red) of the same lattice is given,
in combination with their respective fundamental domains P(B) (the red and
green parallelepiped).
15
Intuitively, one can think about Minkowski’s inequality in the following way.
A lattice L whose shortest (non-zero) vector is long (i.e., λ1 (L) is large), cannot
have a small covolume (Vol(L)). In other words, the two numbers λ1 (L) and
Vol(L) both give a measure for the sparsity of a lattice. The notion Vol(L) is
more rough and more ‘average’, so that a large covolume can still mean that a
lattice has a small first minimum λ1 (L).
Occasionally, Vol(L) is considered as a measure for ‘global sparsity’ whereas
λ1 (L) is considered as a measure for ‘local sparsity’ of the lattice L. The reason
for these notions is the difference in scale where Vol(L) and λ1 (L) have impact:
For a very large box B inside V , the number of lattice points in B ∩ L ≈
Vol(B)/ Vol(L) depends on the covolume of the lattice. For a small box B
inside V the number of points B ∩ L depends heavily on the smallest vectors in
V and hence on λ1 (L).
16
by the root determinant det(L)1/n , where n is the dimension of the lattice. In
this text, we will use SVP and ‘the shortest vector problem’ for both versions,
where it depends on the context which one we mean.
Problem 2 (Hermite Shortest Vector Problem (SVPγ )). Given as input a basis
B of an n-dimensional lattice L and a γ ∈ R>0 , the γ-Hermite shortest vector
problem is the computational task of finding a non-zero lattice vector x ∈ L that
satisfies ∥x∥ ≤ γ · det(L)1/n .
17
Shortest Vector Problem (SVP) Bounded Distance Decoding (BDD)
v
λ1 (L)
0 v 0
Gram-Schmidt orthogonalization
Let V be a Euclidean vector space and W ⊆ V a linear subspace. We can define
the orthogonal complement W ⊥ of W :
W ⊥ = {v ∈ V | ⟨v, w⟩ = 0 for all w ∈ W }
The projection map πW : V → V is the unique linear map that is equal to the
identity map idW on W and sends W ⊥ to 0. When a basis (w1 , . . . , wk ) of W
18
is given, the space W ⊥ is sometimes written as (w1 , . . . , wk )⊥ .
This map πW : V → V then projects the space V onto W . It is not gen-
erally true that πW (L) ⊆ W is a lattice if L ⊆ V is a lattice. For this, W is
required to be compatible with the lattice in some sense; this will be answered
in Definition 6. To identify what is required from W , we need the notion of
Gram-Schmidt orthogonalization of a basis B.
Example 1. Take the projection map π1 : R2 → R where (x, y) 7→ x. In terms
of the discussion above, this corresponds to taking V = R2 and W = R × {0}.
Note that n √ o
1 2
L = n1 · + n2 · n1 , n2 ∈ Z
1 0
√
is a lattice in R2 , but that π1 (L) = {n1 + n2 2 | n1 , n2 ∈ Z} is not a lattice
√ in
R because it is not (uniformly) discrete; we can get the number n1 + n2 2 to be
arbitrarily close to 0.
Definition 5 (Gram-Schmidt orthogonalization). For a basis B = (b1 , . . . , bn )
of the lattice Λ, we define the Gram-Schmidt orthogonalization B ∗ = (b∗1 , . . . , b∗n )
of B as follows: b∗i = πi (bi ), where πi = π(b1 ,...,bi−1 )⊥ . In other words, the
projection map πi projects to the orthogonal complement of the space generated
by (b1 , . . . , bi−1 ).
A different way of defining the Gram-Schmidt orthogonalization is by means
of matrix decomposition; B is decomposed as a matrix product B ∗ · µ, where
B ∗ is orthogonal and µ is upper triangular with ones on the diagonal. One can
compute µ and B ∗ inductively by the following formulae:
⟨b∗i , bj ⟩
µij = ;
⟨b∗i , b∗i ⟩
i−1
X
b∗i = bi − µji b∗j .
j=1
Projections
It turns out that the only good way to project lattices L = L(B) in such a way
that its projected image is also a lattice, is by projecting it orthogonally to a
vector space spanned by some of the basis vectors4 .
Definition 6 (Projected lattices). Let L be a lattice with basis B. The projected
lattices Li with respect to the basis B are defined as follows.
19
One can see that Li is indeed a lattice because it has (πi (bi ), . . . , πi (bn )) as
a basis. This gives rise to the definition of a projected basis.
Definition 7 (Projected bases). Let B be a basis of a lattice L. We denote by
B[i:j] the projected basis
20
Algorithm 1: The Babai nearest-plane algorithm
Input :
A basis B = (b1 , . . . , bn ) of a lattice L with Gram-Schmidt
orthogonalization B ∗ = (b∗1 , . . . , b∗n ),
a target t ∈ span(L).
b1
b̃0 = b0
b̃1 b1
b̃1
0 b̃0 = b0 0
Figure 2.3: Babai’s fundamental domain for a good (left) and a bad basis (right)
of the same lattice.
21
Basis Quality
Given a target t ∈ span(L) the close vector v that Babai’s nearest plane al-
gorithm returns depends on the basis. Preferably, one would like the error
e = t − v ∈ P(B ∗ ) to be as short as possible, so what properties should
a basis have to minimize
Pn this? For any e ∈ P(B ∗ ) we have the worst-case
2 1 ∗ 2
bound ∥e∥ ≤ 4 i=1 ∥bi ∥ . Furthermore, if the target t is uniform over the
cosets span(L)/L, then in particular e is uniformPn over P(B ∗ ). Its expected
2 1 ∗ 2
squared length E[∥e∥ ] is then given by 12 i=1 ∥bi ∥ . Given the identity
Q n ∗
i=1 ∥bi ∥ = det(L) the worst-case and expected squared length is thus mini-
mized when ∥b∗1 ∥ = . . . = ∥b∗n ∥, i.e., Babai’s nearest plane algorithm finds a
closer vector on average if the basis has a well balanced Gram-Schmidt profile.
Note that a perfect balanced basis with equal Gram-Schmidt norms might not
always exist, but we can still use a basis that have a somewhat balanced profile,
whose Gram-Schmidt norms do not differ too much. Informally we call such a
basis ‘good’, and a basis with a very unbalanced profile ‘bad’.
Secondly, for a bounded distance decoding problem Babai’s nearest plane
algorithm provably returns the unique closest vector if the target t lies at dis-
tance at most 21 mini ∥b∗i ∥ from the lattice. Again this quantity is maximized
when ∥b∗1 ∥ = . . . = ∥b∗n ∥, or, more generally, we expect it to be higher when
the basis profile is more balanced. Summarizing, both problems CVP and BDD
are easier to solve whenever the basis is balanced.
Size reduction
Babai’s nearest-plane algorithm can in principle also be applied to targets t ∈ /
span(L) that do not lie in the span of the lattice L. In that case, t = v + e
is uniquely decomposed into v ∈ L and e ∈ P(B ∗ ) + span(L)⊥ . One can
interpret Babai’s nearest-plane algorithm as an attempt to reduce the target
t optimally using the basis B. If the target t were already reduced, i.e., if
π(b1 ,...,bn ) (t) ∈ P(B ∗ ), we call t size reduced. This notion of size-reducedness
can then be extended to an entire basis.
Definition 9 (Size reduced basis). A basis B = (b1 , . . . , bn ) is said to be size
reduced if for all j ∈ {2, . . . , n},
That is, if each basis element is size-reduced with respect to the previous basis
vectors.
By applying Babai’s nearest plane algorithm progressively on a given basis
B of L, one can always obtain a size-reduced basis of L efficiently.
This notion of size-reducedness is important during computations on bases,
as it avoids a phenomenon called coefficient explosion. During repeated basis
operations on rational bases (i.e., with entries in Q) the numerators and de-
nominators of the rational entries might increase drastically, if no care is taken.
22
These numbers can grow so large that they prevent an algorithm to be effi-
ciently computable. Applying size-reduction sufficiently often in between these
basis operations keeps the rational numbers ‘small’, and avoids this potential
explosive growth of coefficients.
|⟨b1 , b2 ⟩| ≤ 21 ∥b1 ∥2 .
1 ⟨b ,bold ⟩
Since k ∈ Z is the rounded version of ∥b 2
1∥
2 , it follows that |⟨b1 , b2 ⟩| ≤
1 2
2 ∥b1 ∥ .
To show that ∥b1 ∥ = λ1 (L), we pick any vector v ∈ L, and write it as
v = ℓb1 + kb2 with k, ℓ ∈ Z. Then, using |⟨b1 , b2 ⟩| ≤ 21 ∥b1 ∥2 ,
as ℓ2 + k 2 − kℓ ≥ 1 for all k, ℓ ∈ Z.
23
Algorithm 2: Lagrange’s reduction algorithm
Input : A basis (b1 , b2 ) of a lattice L.
Output: A basis (b1 , b2 ) such that ∥b1 ∥ = λ1 (L) and
|⟨b1 , b2 ⟩| ≤ 21 ∥b1 ∥2 , as in Theorem 2.
repeat
swap b1 ↔ b2
k ← ⌈ ⟨b 1 ,b2 ⟩
∥b1 ∥2 ⌋
b2 ← b2 − kb1
until ∥b1 ∥ ≤ ∥b2 ∥
b2
− 12 1
2 b1
x
24
2.6 The LLL algorithm
The LLL-algorithm, invented by Lenstra, Lenstra and Lovász [LLL82], is a
basis reduction algorithm achieving an exponential approximation factor in the
degree, while running in polynomial time. It is one of the most fundamental
basis reduction algorithms.
The LLL-algorithm consists mainly of two ingredients. The first ingredient
consists of locally Lagrange-reducing the basis at every point. In other words,
we want every projected basis pair B[i:i+1] = (πi (bi ), πi (bi+1 )) to be Lagrange
reduced. This has as a consequence that the Gram Schmidt norm sequence
(b∗i )i does not decrease too quickly. The second ingredient consists of keeping
the basis size-reduced in order to avoid coefficient explosion, which is needed
for efficiency.
25
For the decrease of the potential, observe that size reduction does not change
the Gram Schmidt norms, so it remains to concentrate on the Lagrange re-
duction step only. A single Lagrange reduction changes B = (b1 , . . . , bn )
into B ′ = (b1 , . . . , bj0 −1 , b′j0 , b′j0 +1 , . . . , bn ), which only changes the value
det(L(B[1:j0 ] )) among those of the det(L(B[1:j] )) in the definition of the po-
tential PB . This implies
′ ∗
det(L(B[1:j 0]
)) ∥b′ j0 ∥ √
PB ′ = · PB = ∗ · P B < δ · PB .
det(L(B[1:j0 ] )) ∥bj0 ∥
The last inequality follows from the fact that B at j0 was not Lagrange reduced
before the loop, i.e.,
δ∥b∗j0 ∥2 = δ∥πj0 (bj0 )∥ > ∥πj0 (bj0 +1 )∥2 ,
together with the fact that B ′ at j0 is actually Lagrange reduced, which means
that πj0 (b′j0 ) is the shortest vector in L(B)j0 :j0 +1 , i.e.,
∗
∥πj0 (bj0 +1 )∥2 ≥ ∥πj0 (b′j0 )∥2 = ∥b′ j0 ∥2 .
26
Proof. By combining (i) and (ii) of Definition 10, and writing πj (bj+1 ) = b∗j+1 +
cjb∗j , with cj ∈ [−1/2, 1/2) (by size-reducedness), we obtain
27
Algorithm 4: The HKZ algorithm.
Input : A rank n lattice L (represented by any basis B).
Output: An HKZ-reduced basis B
for i = 1, . . . , n do
πi := π(b1 ,...,bi−1 )⊥
w ← a shortest vector in πi (L)
Lift w to a lattice vector bi ∈ L such that πi (bi ) = w
Size-reduce bi with respect to (b1 , . . . , bi−1 )
end
return B = (b1 , . . . , bn )
One sees that the BKZ algorithm is indeed truly a generalization of both the
HKZ and the LLL algorithm, as the parameter instantiation β = 2 recovers the
LLL algorithm (for δ = 1), whereas putting β = n reveals the HKZ algorithm.
In the literature Equation (2.4) is often slightly relaxed by a small constant > 1,
having a similar role as δ in the LLL algorithm (see Algorithm 3).
28
log ||bi ||
log ||bi ||
β
0 20 40 60 80 100
index i
j j+β
Figure 2.5: The BKZ algorithm repeatedly replaces the basis vector bj by a lift
of a shortest vector in the projected sublattice L(B[j:j+β−1] ).
β
0 20 40 60
2.8.1 BKZ algorithm
The BKZ algorithm (Algorithm 5) transforms any given basis into a BKZ-
reduced basis. The algorithm, similarly to the HKZ algorithm, greedily attempts
to satisfy the BKZ condition (Equation (2.4)) at each position i by replacing the
index i
j j+β
basis vector bi by a shortest vector in the block L(B[i:min (i+β−1,n)] ). Though
this has as a consequence that the basis is BKZ-β reduced at position i, it might
also invalidate the BKZ-condition at other positions. This is the reason why just
one loop of i ∈ {1, . . . , n − 1}, which is called a ‘tour’, is usually not enough to
fully BKZ-β reduce a basis. The BKZ algorithm instead repeats such tours until
the basis remains unchanged, which means that this resulting basis is BKZ-β
reduced.
Algorithm 5: The BKZ algorithm.
Data: A lattice basis B, blocksize β.
LLL reduce B;
while B is not BKZ-β reduced do
for i = 1, . . . , n − 1 do // A single
BKZ-β tour
w ← a shortest vector in L B[i:min (i+β−1,n)] ;
Lift w to a vector v ∈ L (B) such that πi (v) = w;
Insert v in B at position i ;
Apply LLL on B to size-reduce and resolve linear dependencies;
end
end
The BKZ-β algorithm outputs a basis that is ‘close to’ BKZ-β reduced after
O(n2 log(n)/β 2 ) tours [HPS11; LN20b]. In practice, after a few dozen tours,
the basis does not improve much in quality anymore. The cost of BKZ is thus
mainly dominated by the exponential (in β) cost of finding a shortest vector in
29
a β-dimensional lattice.
Time
e
exp(Θ(n))
Approx-SVP for
cryptography
generic lattices
B
K
e 1/2 ))
exp(Θ(n
Z
LLL
poly(n) Approximation factor
poly(n) e 1/2 ))
exp(Θ(n e
exp(Θ(n))
Figure 2.6: The BKZ-algorithm allows for a trade-off between basis quality (or
equivalently, shorter vectors) and computation time. Paying more time allows
for shorter vectors; specifically, one can achieve approximations to the shortest
vector within a factor exp(Θ̃(nc )) within time exp(Θ̃(n1−c )), where n is the
lattice dimension.
30
Due to this general computational unfeasability of these algorithms in high-
dimensional lattices it is nearly impossible to conduct real-life timing experi-
ments on lattice reduction algorithms for these lattices. Hence, there is a lack
of experimental evidence on the practical behavior of lattice reduction algo-
rithms in high dimensions, that are so relevant for cryptography. Instead, one
turns to more heuristic models to predict the behavior of the reduction algo-
rithms LLL, BKZ and HKZ. These models are mostly founded on the Gaussian
heuristic and extensive experiments in lower, feasible dimensions.
Vol(L)1/n p
gh(L) := ≈ n/(2πe) · Vol(L)1/n ,
Vol(Bn )1/n
where
p Bn is the n-dimensional unit ball. We also denote gh(n) = Vol(Bn )−1/n ≈
n/(2πe) for the expected first minimum of a rank n lattice with volume 1.
31
HKZ profile
HKZ shape
HKZ shape (adjusted)
log ||bi ||
0 20 40 60 80 100
index i
Figure 2.7: A typical HKZ reduced basis of a rank 100 lattice compared to the
heuristic HKZ shape of Definition 13, with and without adjustments for the tail
part.
32
sumption (GSA). Using the Gaussian heuristic, one can predict this constant
for various instantiations of BKZ (and LLL).
Heuristic 2 (Profile under the Geometric Series Assumption (GSA)). Let B
be a BKZ-β reduced basis, then under the Geometric Series Assumption and the
Gaussian heuristic the profile satisfies
n + 1 − 2i log(det(B))
log(∥b∗i ∥) = · log(αβ ) + ,
2 n
where αβ = gh(β)2/(β−1) .
Justification. The above profile follows if wePassume that ∥b∗i+1 ∥/∥b∗i ∥ = αβ
for all 1 ≤ i < n, and from the invariant log(∥b∗i ∥) = log(det(B)). We
2/(β−1)
now give a justification why αβ = gh(β) by using the Gaussian heuristic.
Because αβ only depends on the blocksize β, we can focus on a single BKZ
block to determine this constant. We thus assume without loss of generality
that our lattice L has dimension β and covolume 1. By the properties of BKZ
we furthermore know that ∥b∗1 ∥ = ∥b1 ∥ = λ1 (L). By the Gaussian heuristic,
we thus have ∥b∗1 ∥ = λ1 (L) = gh(β). Additionally, we have
33
LLL
LLL GSA
BKZ-40
BKZ-40 GSA
log ||bi ||
0 20 40 60 80 100
index i
Figure 2.8: Typical basis profiles of LLL and BKZ compared with the predictions
computed by the Geometric Series Assumption.
2.11 Enumeration
Enumeration algorithms can be seen as a generalization of Babai’s nearest plane
algorithm (Algorithm 1). Instead of making a greedy choice at each iteration
to minimize ⟨e, b∗i ⟩, enumeration algorithms take multiple choices and recurse
on those. A simple enumeration algorithm is presented in Algorithm 6. The
complexity of enumeration heavily depends on how reduced the basis is. For ex-
ample in the initial call there are already about 2R/∥b∗n ∥ choices, each of which
starts a new enumeration call on a lattice of dimension n − 1. For a badly re-
duced basis ∥b∗n ∥−1 can be very large, while for a well-reduced basis it is smaller.
Due to the recursion the other Gram-Schmidt norms ∥b∗n−1 ∥, ∥b∗n−2 ∥, . . . , ∥b∗1 ∥
are just as important, each leading to a multiplicative increase.
For an LLL reduced basis the cost of enumeration for R = λ1 (L) is of order
O(n2 )
2 . For a HKZ-reduced basis the cost decreases to about nO(n) . Enumera-
tion algorithms are trivially parallelizable and use only a polynomial amount of
memory. But their time-complexity is sub-optimal.
2.12 Sieving
Lattice sieving algorithms solve SVP in single-exponential time, making them
asymptotically superior to enumeration techniques running in super-exponential
time, at the cost of also using single-exponential space. The central idea of
sieving algorithms is that given two lattice vectors v, w ∈ L, their difference
v − w ∈ L might be shorter. While in general this is not the case, given enough
lattice vectors we can find enough of such pairs. Lattice sieving algorithms thus
start with a large list of long lattice vectors, and try to find pairs of vectors
34
Algorithm 6: Standard enumeration algorithm.
Input :
A basis B = (b1 , . . . , bn ) of a lattice L with Gram-Schmidt
orthogonalization B ∗ = (b∗1 , . . . , b∗n ),
a target t ∈ span(L) and a radius R > 0.
that are close to each other. For each such pair the short difference vector is
then inserted back into this list, possibly replacing longer vectors. This process
is repeated until the list contains many short vectors, among which are the
shortest ones.
Heuristically we need about N = (4/3)n/2+o(n) vectors to find enough close
pairs. Naively this leads to an algorithm with running time of N 2 = 20.415n+o(n) .
Using ‘nearest-neighbor’ techniques this can be reduced to an asymptotic run-
time of 20.292n+o(n) . Asymptotically the cost of running the BKZ algorithm
with blocksize β is thus 20.292β+o(β) .
The concrete performance of sieving algorithms is still an active field of
research, and in the last years several polynomial and even sub-exponential
speed-ups were discovered. As a result, sieving went from an asymptotic superior
algorithm to a practical superior algorithm to enumeration. Recently, the cross-
over between the best enumeration and sieving algorithms was pushed as low
as dimension 80. In Chapter 6 we will dive deeper into the concrete cost of the
best sieving algorithm.
35
Chapter 3
Structured lattices
3.1 Introduction
3.1.1 Efficiency
In cryptography, one strives for security in the first place, but another property
of a cryptographic protocol is also very important: efficiency. An inefficient
cryptosystem that takes ages to encrypt will be competed away by their more
efficient counterparts based, for example, on other hardness assumptions.
In lattice-based cryptography that uses general (unstructured) lattices, the
largest inefficiency issue is mainly due to the size of the key, which consists
of the basis of the lattice and requires about n2 rather large numbers to store
and transmit (this is not the full story, for a more in-depth explanation, see
Section 4.3.1).
To circumvent this issue, so-called structured lattices were invented, whose
bases have an specific shape so that the entire basis can be reconstructed from
only partial information of this basis. For example, in so-called ideal lattices the
entire basis can be reconstructed by giving just one single vector of the basis.
The main idea of structured lattices is that there is, apart from the additive
lattice structure, another multiplicative ring-like structure. These lattices with
this extra multiplicative structure arise naturally in the field of algebraic number
theory, where they can be constructed out of ideals and modules.
36
Ideal lattices
The line of work of [CGS14; Cra+16; CDW17; Eis+14; PHS19] show that
cryptosystems based on lattices with too much structure, namely ideal lattices,
are potentially weaker than those based on generic lattices. This is because
there exists a quantum algorithm that allows to find mildly√ short vectors in
ideal lattices; those are lattice vectors within the bound 2Õ( t) det(I)1/t of an
ideal lattice I of a t-dimensional number field.
Though no candidates for standardization were based on ideal lattices, this
line of work showed that, in cryptography, too much structure in lattices is to
be avoided. A kind of structured lattice that is generally considered (much)
better for cryptography purposes are module lattices.
Module lattices
Module lattices can be seen as higher-rank generalizations of ideal lattices, in the
same way that matrices can be seen as higher-‘rank’ generalizations of numbers
(the ordinary numbers are then the diagonal matrices).
Ideal lattices are a very special case of module lattices, they namely have rank
one. The line of research described above seems not to generalize to module
lattices of higher rank; it is believed among cryptographers that there is a
computational barrier in between rank-one module lattices (ideal lattices) and
rank-two (and higher) module lattices.
The belief in this computational barrier is partially because of a reduction
for SVP in higher rank modules to SVP in rank 2 modules [Lee+19; MS19].
37
Every number field element α ∈ K has a minimal polynomial, the unique
monic, irreducible polynomial m(X) ∈ Q[X] that satisfies m(α) = 0. If, addi-
tionally, this minimal polynomial of α lies in Z[X] (i.e., has integral coefficients)
we call α an integral element of K. The integral elements in K together form
a ring OK , which is called the ring of integers of K. Subrings of such a ring of
integers of some number field K are called number rings.
The most commonly used number rings in cryptography are of the shape R =
Z[x]/(ψ(x)), where ψ(x) ∈ Z[x] is an irreducible polynomial. A typical example
is the power of two cyclotomic ring, which is obtained by putting ψ(x) = xt + 1
with t = 2k for some k > 0.
For example, by taking t = 256, one obtains the number ring of CRYSTALS-
Kyber; this cryptosystem uses module LWE of rank r = 2, 3 or 4 over this ring
[Bos+18; Alb+18] with m = 2r samples (or equivalently m = r samples and a
short secret). We will see in Chapter 5 that attacks on these cryptosystems can
be seen as BDD instances in module-lattices of rank m = 4, 6, 8.
Ideal lattices
The image of an ideal I ⊆ R under the Minkowski embedding is an example
of an ideal lattice; it has the additive structure of a lattice and the ring-like
38
√
Figure 3.1: The number ring Z[
√ 2] visualized
√ √ on the real plane, using the
Minkowski embedding, sending 2 7→ ( 2, − 2) and 1 7→ (1, 1).
L = b1 · a1 + . . . + bk · ak (3.1)
39
integers. In that case, one can write the module lattice by an ‘ordinary’ basis,
by putting B := (b1 , . . . , bk ), by which we then mean the module lattice
L = b1 · OK + . . . + bk · OK (module lattice).
Note the analogy with ‘ordinary’ lattice bases, where the OK is replaced by Z:
L = b1 · Z + . . . + bk · Z (ordinary lattice).
40
Chapter 4
4.1 Introduction
To do lattice-based cryptography, one needs hardness assumptions for concrete
and computable lattices that can be easily constructed and amended by com-
puters. Additionally, such a hardness assumption must allow for trapdoors, so
that it is usable in a cryptographic context.
For example, the lattices considered must only involve integer arithmetic
and preferably fast operations, whereas the hardness assumptions must have a
tight relation with the ‘natural’ hard problems in lattices, like the Closest and
the Shortest Vector Problem.
The two most famous of such cryptographic hardness assumptions for lat-
tices are Learning With Errors, originating from Regev [Reg09], and NTRU,
originating from Hoffstein, Pipher and Silverman [HPS98].
4.2 LWE
4.2.1 Introduction
In this subsection, we will explain at a high level about Learning With Errors
(LWE), a lattice-based cryptography framework. To keep things simple, pa-
rameters are not yet instantiated and certain distributions are not yet made
explicit.
Later on, whenever we discuss the specific variants of LWE, we will focus
more on the precise instantiations and also focus on what instantiations are used
in the NIST candidates.
41
prime power.
The secret key s in LWE is a vector s ∈ (Z/qZ)n , i.e., si ∈ Z/qZ for i ∈
{1, . . . , n}. This secret vector s is sampled uniformly beforehand.
The public information consists of m slightly perturbed random inner prod-
ucts with s. That is, the public information consists of m pairs of the shape
(a, b) such that b = a · s + e ∈ Z/qZ, where, in each pair (a, b), the vector a
is drawn uniformly random from (Z/qZ)n and e is drawn from a specific dis-
tribution over Z/qZ close to zero. For intuition, it suffices to think of e to be
uniformly drawn from {−2, −1, 0, 1, 2} (mod q) for each pair. The dot in a · s
denotes the inner product of the two vectors in (Z/qZ)n and results in a number
in Z/qZ.
For each of the m public pairs (a, b), the associated errors e are unknown to
the public. Also, this error is sampled again for each pair. Both these facts are
important to understand the hardness of the LWE assumption.
42
In the decision-LWE assumption the public observer is given no such promise.
In fact, deciding whether there exists such secret s (in the LWE setup) or not
(in the uniform setup) is the computational task that is assumed to be hard.
Regev showed that these two assumptions are essentially equivalent, when-
ever q is bounded by a polynomial in n [Reg09; Pei09].
where the cj ∈ Z are all small (say, −1, 0 or 1) and all arithmetic is modulo q.
Indeed, this looks like an LWE sample, as it satisfies
m
X m
X m
X m
X
bnew = cj b(j) = cj (a(j) · s + e(j) ) = cj a(j) ·s + cj e(j) (4.2)
j=1 j=1 j=1 j=1
| {z } | {z }
anew enew
Encryption
Encryption (by the public observer) of a single bit B ∈ {0, 1} now happens
by generating such a new (worse quality) random LWE sample (anew , bnew ) by
taking a random small linear combination of the public LWE samples (a(j) , b(j) ).
By subsequently adding B · ⌊q/2⌉ to bnew , one obtains the encryption1 . That
is, generate random small ci ∈ Z and put
m
X m
X
Enc(B) = ( cj a(j) , cj b(j) + B · ⌊q/2⌉) = (anew , bnew + B · ⌊q/2⌉)
j=1 j=1
1 Here, ⌊q/2⌉ means rounding q/2 to the nearest integer
43
Decryption
As the receiver of the message is in possession of the secret s, it is possible
to compute anew · s and subtract it from bnew + B · ⌊q/2⌉, which yields, by
Equation (4.3),
≈ B · ⌊q/2⌉.
Where the last approximate equation follows from the fact that enew is reason-
ably small with respect to q. Therefore, the receiver is capable to retrieve B;
the receiver simply deduces that B must be equal to zero if enew + B · ⌊q/2⌉ is
small, and equal to one otherwise.
Idea of security
The rough, intuitive idea for the security of this scheme stems from the distinguishing-
LWE assumption. As the pair (anew , bnew ) is an LWE sample, the distinguishing-
LWE assumption implies that this is algorithmically indistinguishable from a
uniform sample in (Z/qZ)m × (Z/qZ).
The reasoning why an attacker is then never able to retrieve the message bit
B (without the secret key), generally happens by a proof by contradiction as
follows. Suppose (as to obtain a contradiction) that an attacker has an algorithm
A that does allow to retrieve the message bit B from the encryption Enc(B).
Then, this algorithm A essentially can distinguish between LWE-samples (a B =
0 encryption) and non-LWE-samples (a B = 1 encryption). This distinguishing
power can then also be used to (at least partially) distinguish between random
samples and LWE samples (in some quantified sense), contradicting the hardness
assumption.
44
outputting
(A, b = A · s + e mod q)
We will call such a pair (A, b = A · s + e mod q) an LWE instance with
parameters (q, n, m, χ).
The number n is called the dimension, the number m the sample size, the
number q is generally referred to as the modulus of the LWE problem, and the
distribution χ over Zm is called the error distribution.
Definition 15 (Search-LWE, Decision-LWE). Search-LWE is the problem of
recovering the secret vector s from a sample (A, b) ← Ln,m,q,χ .
Decision-LWE is the problem of distinguishing between samples from Ln,m,q,χ
and from the uniform distribution Un,m,q over (Z/qZ)n×m × (Z/qZ)m .
Note that we left the distribution of the original secret vector open in
these definitions. Originally, the secret s is sampled uniformly at random from
(Z/qZ)n , and unless otherwise stated we assume that this is the case. For effi-
ciency reasons concrete schemes often deviate from this however, for example,
by sampling small secrets. Often this means that the secret coefficients are sam-
pled from the same distribution as the error coefficients. This does not hurt the
security as the uniform and small secret variant are actually equivalent up to the
number of samples one gets. In particular, a small secret LWE instance with m
samples can be turned into a uniform LWE instance with m′ = m + n samples,
and the reverse reduction also applies [App+09]. The small secret variant can
thus be seen as compressing m + n samples in only m samples, thereby reducing
the amount of information that has to be send. This is precisely what makes
small secrets useful for concrete schemes.
Summary 1 (LWE assumption). The LWE assumption states that, for ad-
equate parameters (q, n, m, χ), ‘noisy’ linear combinations b = A · s + e mod q
are computationally indistinguishable from uniform vectors mod q, for a random
A.
45
what one could call ‘unstructured’, in the sense that its arithmetic is not tied
to a ring other than Z or quotient groups thereof.
Remark 4. Among the early NIST candidates, there are also other variants on
LWE, most notably, Polynomial-LWE (PLWE), Order-LWE (OLWE), Middle-
Product LWE (MPLWE) and Integer (Module) LWE (I(M)LWE). The first three
are more or less equivalent to Ring-LWE [PP19], whereas the situation for In-
teger (Module) LWE’s is less clear. Gu [Gu19] shows that there is a relation
between Ring-LWE and Integer Ring LWE, but the author of ThreeBears [HR17]
suggest that this relation is not tight for their cryptosystem.
Another variant of LWE is called Learning With Rounding (LWR), where
the main difference is the way a ‘disturbance’ e is applied to the linear relations.
In LWE that disturbance happens in a random fashion, whereas LWR intends
to remove this randomness by making such disturbance deterministic by means
of ‘rounding’. This in order to avoid attacks that exploit weaknesses due to the
random sampling, like timing attacks (for which in LWE additional measures
are taken).
46
is of order Ω̃(λ2 ). By applying additional trade-offs these sizes can be balanced
√
to obtain a total size in the order of Ω̃(λ3/2 ). The idea is √
to have roughly O( λ)
secret vectors s hidden in the public key, and roughly O( λ) ciphertexts, which
√ 2
when properly combined can transfer O( λ ) = O(λ) bits of information. This
was for example done in FrodoKEM [Nat17]. Nevertheless, a key and ciphertext
size in the order of Ω̃(λ3/2 ) is still rather large for practical purposes.
So, for future implementation one could state that plain LWE has key sizes
that are too large for everyday use. Even at the current time NIST considers
the key sizes of cryptosystems based on plain LWE too large for (direct) stan-
dardization [Moo+20, §3.6], though they do state for example that the plain
LWE-based FrodoKEM “suitable for use cases where the high confidence in
the security of unstructured lattice-based schemes is much more important that
performance” [Moo+20, §3.6].
Summary 2 (Reason for using ‘structured’ LWE). ‘Plain’ LWE with pa-
rameters q, n, m = Θ(λ) has key and ciphertext sizes Ω̃(λ2 ) or with some im-
provements Ω̃(λ3/2 ), which is generally considered too large for everyday use.
This is the reason why ‘structured’ variants of LWE are considered.
4.3.2 Ring-LWE
NIST finalists
As none of the NIST finalist are based on Ring-LWE (but many candidates are),
we will only briefly treat this variant. Covering Ring-LWE first will ease the
explanation of Module-LWE.
Remark 5. The reason that the NIST finalist lack Ring-LWE based schemes
is mostly due to the preference for low rank Module-LWE based cryptosystems
instead, as the latter are of comparable efficiency but have less algebraic structure
(e.g., [Moo+20, §3.12]).
Ring-LWE
In Ring-LWE, one attempts to lower this public key size by using ring arithmetic.
By using the multiplicative structure of the ring, one can ‘compactify’ the matrix
47
NIST candidates Assumption Security (bits) Public key (bytes)
Table 4.1: The NIST 3rd round lattice-based KEM finalists and alternatives
with their assumptions and key sizes for Category III security [Rav+21], with
the exception of NewHope, which has no category III proposal (instead category
V is listed). Note the large public key sizes in the unstructured LWE-based
cryptosystems; almost ten times larger than those based on structured lattices.
bR = aR · sR + eR mod q.
Here, the subscript R of the element indicates that we are computing in the ring
R, as to make the difference with plain LWE. The secret key sR ∈ R is random
(in most schemes chosen to have small coefficients), aR is uniformly randomly
drawn from R/qR, and eR generally is drawn from a distribution over R/qR
that is concentrated around 0 (think about a discrete Gaussian centered at 0
with a deviation much smaller than q). The multiplication operation is ring
multiplication, not the inner product.
yR · aR and yR · bR + kR mod q.
2 It can range from q = 251 to q = 16900097, e.g. [Alb+18]
48
Note that this are two ring elements from R, and thus take space O(t log q).
yR · bR + kR − yR · aR · sR (4.4)
=yR · (aR · sR + eR ) + kR − yR · aR · sR (4.5)
=yR · eR + kR (4.6)
Now, by using that yR and eR have very small coefficients, and therefore their
product also has very small coefficients, whereas kR has coefficients that are
either ⌊q/2⌉ or zero, one retrieves the i-th bit of the bit message κ0 . . . κt−1 by
observing whether the i-th coefficient of yR · eR + kR is closer to q/2 or to 0.
Remark 6. Something very similar happens in Module-LWE (with a small
loss), which has thus the same efficiency benefits as RingLWE in terms of public
key size and ciphertext size.
49
a0 −a4
a1 −a5
a2 a0
a= a · x2 =
a3 a1
a4 a2
a5 a3
This polynomial can just be represented by the coefficients, which gives a vector
(c0 , . . . , ct−1 ) ∈ (Z/qZ)t , which we will denote c (without the subscript R). This
is how we can see bR , sR and eR ∈ R as vectors b, s, e ∈ (Z/qZ)t . So, we have
an additive group isomorphism between R/qR and (Z/qZ)t . Note that the
standard basis vectors ϵj are just the monomials xj for j ∈ {0, . . . , t − 1}.
The element aR gets a different treatment because that ring element is in-
volved in the multiplication. The action cR 7→ aR · cR maps R/qR to R/qR
in a linear fashion, as aR (cR + dR ) = aR cR + aR dR . By using the additive
isomorphism R/qR ≃ (Z/qZ)t , one can thus see this map ‘multiplying by aR ’
as a linear map. Thus, we can represent it by a matrixP by looking how it acts
t−1
on the standard basis vectors ϵk ↔ xk . Writing aR = j=0 aj xj ∈ R/qR, we
have
t−1
X t−1
X k−1
X Xt−1
aR · x = k aj x j k
·x = aj x j+k
=− j
at−k+j x + aℓ−k xℓ ,
j=0 j=0 j=0 ℓ=k
see also Figure 4.1. So the matrix of multiplication by aR has a special shape,
which is often called anti-circulant (due to the negative sign after the ‘circular’
Pt−1
movement). For the multiplication matrix MaR of aR = j=0 aj xj we can write
MaR = sign(j − k) · aj−k mod t j=0,...,t−1 ,
k=0,...,t−1
50
a0 −a5 −a4 −a3 −a2 −a1
a1 a0 −a5 −a4 −a3 −a2
a2 a1 a0 −a5 −a4 −a3
a3 a2 a1 a0 −a5 −a4
a4 a3 a2 a1 a0 −a5
a5 a4 a3 a2 a1 a0
Note that the matrix of Ring-LWE is fully determined by the first column;
the rest of the column actually follows from the ‘anti-circulant’ rule. Therefore,
to send over this multiplication matrix, we only need to send the first column,
or equivalently, the coefficients of the polynomial aR .
Summary 4 (Ring-LWE as ‘plain’ LWE). In essence one can see Ring-LWE
as a special version of plain LWE in which the matrix A is of such a shape that
it is fully defined by its first column (and where the rest of the columns are
defined by a linear transformation of the first column), see Figure 4.2.
Remark 7. In Section 5.1, we will deduce that we can see (any variant of )
LWE as a BDD instance a very much related lattice whose dimension equals
the number of samples m. Then by embedding this BDD target we can reduce
it to an (unique)SVP-instance in a lattice of dimension m + 1. For the system
to have a unique solution the number of samples is generally at least n + 1
or often even 2n where n is the LWE dimension or rank. In particular, note
that the dimension of the lattice problem is not directly determined by the LWE
dimension, but more by the number of samples.
In a very similar way, one can see Ring-LWE with m ≥ 2 samples as a
BDD instance in a rank m module lattice (hence keeping the structure), or a
(unique)SVP-instance in a rank m + 1 module lattice.
51
For Module-LWE of rank r′ with m ≥ r′ + 1 samples, essentially the same
reduction applies; it can be considered as a (unique)SVP-instance in a rank m+1
module lattice, again by embedding the error in a new rank.
4.3.3 Module-LWE
NIST finalists
All LWE-based NIST finalists are based on Module-LWE of rank 2, 3, 4 or 5.
The module ranks of the earlier NIST candidates based on Module-LWE does
not exceed 5 either. The underlying ring R is, in all MLWE (and MLWR)
cases, a cyclotomic ring of the shape Z[x]/(xt + 1) for t a power of two, or
Z[x]/(xt + xt−1 + . . . + x + 1), for t + 1 a prime number [Alb+18].
Remark 8. The low rank of module-LWE is for efficiency; the lower the rank,
the more ‘compactified’ the public key can be stored and sent, and the more
efficient arithmetic in the underlying ring is. Module-LWE of rank 1 is just
equal to Ring-LWE.
NIST has a slight preference for (low rank but ≥ 2) module-LWE over Ring-
LWE [Moo+20, §3.12], as Module-LWE is generally believed (but yet unproven)
to be a more difficult problem to tackle algorithmically than Ring-LWE (which
is rank 1 Module-LWE).
Module-LWE
Module-LWE is some ‘blend’ between Ring-LWE and plain LWE. It has the ring
multiplication of Ring-LWE, and a kind of (different) inner product from LWE.
We will denote r′ for the rank of the Module-LWE problem. Given a secret
(1) (r ′ ) ′
(sR , . . . , sR ) ∈ Rr consisting of a r′ -tuple of ring elements, a Module-LWE
(1) (r ′ ) ′
sample consists of ((aR , . . . , aR ), bR ) ∈ Rr × R where
(1) (1) (r ′ ) (r ′ )
bR = aR · sR + ... + aR · sR + eR mod q (rank r′ module-LWE),
52
The subscript ‘R’ in the matrix AR indicates that this matrix has entries in
R/qR, as opposed to A in plain LWE, which has entries in Z/qZ.
Definition 16 (Module-LWE, e.g. [PP19]). Let n, m and q be positive integers,
let R be a ring whose additive group is isomorphic with Zn , let χ be a probability
′
distribution on Rm and let s ∈ Rr be a ‘secret vector’.
′
We denote Lm,q,χ,R,r′ for the distribution on (R/qR)m×r × (R/qR)m given
′ (1) (m)
by choosing A ∈ (R/qR)m×r uniformly at random, (eR , . . . , eR ) ← χ (from
Rm ), and outputting
(1) (m)
(AR , (bR , . . . , bR ))
(1) (m)
where AR and (bR , . . . , bR ) are as in Equation (4.10).
Similar to plain LWE, we then have the following two problems.
of samples is generally twice the dimension to avoid the linear system to be underdetermined,
and the underlying number ring has a larger degree (e.g., CRYSTALS-Kyber uses a degree
256 number field).
53
satisfying
(1) (1,1) (1) (2,1) (2) (1)
bR = aR · sR + aR · sR + eR mod q
(2) (1,2) (1) (2,2) (2) (2)
bR = aR · sR + aR · sR + eR mod q,
or, equivalently,
" # " # " # " #
(1) (1,1) (1,2) (1) (1)
bR aR aR sR eR
(2) = (2,1) (2,2) · (2) + (2) mod q.
bR aR aR sR eR
| {z }
AR
(1,1) (1,2)
The action of the left part of the matrix aR , aR only acts on the upper
(1)
component of the secret sR , and, similarly, the right part of the matrix on the
lower component of the secret vector). Therefore, one can see the multiplication
(1) (2)
matrix of AR , denoted MAR , acting on the coefficients of the secret (sR , sR ) ∈
(R/qR)2 as a block matrix consisting of the respective multiplication matrices.
" #
Ma(1,1) Ma(1,2)
MAR = R R
∈ (Z/qZ)2n×2n (Module-LWE, r′ = 2, m = 2)
Ma(2,1) Ma(2,2)
R R
54
a0 −a5 −a4 −a3 −a2 −a1 a′0 −a′5 −a′4 −a′3 −a′2 −a′1
a1 a0 −a5 −a4 −a3 −a2 a′1 a′0 −a′5 −a′4 −a′3 −a′2
a2 a1 a0 −a5 −a4 −a3 a′2 a′1 a′0 −a′5 −a′4 −a′3
a3 a2 a1 a0 −a5 −a4 a′3 a′2 a′1 a′0 −a′5 −a′4
a4 a3 a2 a1 a0 −a5 a′4 a′3 a′2 a′1 a′0 −a′5
a5 a4 a3 a2 a1 a0 a′5 a′4 a′3 a′2 a′1 a′0
a′′0 −a′′5 −a′′4 −a′′3 −a′′2 −a′′1 a′′′
0 −a′′′ ′′′ ′′′ ′′′ ′′′
5 −a4 −a3 −a2 −a1
Figure 4.3:
An example of the multiplication matrix in (Z/qZ)12×12 of
′
aR aR
∈ R2×2 where R = Z[x]/(x6 + 1). This type of matrices occur
a′′R a′′′
R
in rank 2 module-LWE cryptosystems with a number of Module-LWE samples
of m = 2. Note that the entire matrix is dictated by the first and the seventh
column. The columns 2 to 6 are defined as a linear transformation of the first
column, whereas the columns 8 to 12 as a transformation of the seventh column.
55
Summary 6 (Structured vs. unstructured LWE). Among the three vari-
ants of LWE treated in this survey, RingLWE is the most structured one, and
‘plain’ LWE is the least structured one. ModuleLWE lies in between, and the
rank parameter r′ of ModuleLWE exactly indicates the similarity with plain
LWE (and the dissimilarity with RingLWE): the larger r′ , the more ModuleLWE
‘looks like’ plain LWE.
4.4 NTRU
4.4.1 Introduction
The NTRU cryptosystem originates from Hoffstein, Pipher and Silverman [HPS98]
and uses arithmetic in the ring4 R = Z[x]/(xt + 1) modulo two different primes
p and q; where t = 2k is a power of two.
The underlying hard problem could be informally named the ‘short modular
fraction problem’. Given a h ∈ R/qR, write it as a ‘short’ fraction
g
h= mod q = f −1 g mod q,
f
provided that it exists; where ‘short’ means that we want g, f ∈ R to have (very)
small polynomial coefficients.
56
fq , fp ∈ R such that
c = r · h + m (mod q),
57
Decryption
The decrypter is in possession of the secret key f (and its inverses modulo p and
q), and can therefore compute
d = f · c = f · (r · h + m) (mod q)
g
=f · r·p· +m (mod q)
f
= p · r · g + f · m (mod q)
d̂ = p · r · g + f · m
Note the absence of ‘modulo q’ ; this is an equality in the ring R = Z[x]/(xt + 1).
Indeed, since r, f , g and m are small, there is no ‘overflow’ over the (rather large)
modulus q. Taking d̂ modulo the small prime p removes the p · r · g part:
d̂ = f · m mod p.
fp · d̂ = fp · f · m = m mod p.
Idea of security
A rough idea for the proof sketch for the security of NTRU is very analogous
to that of the security of the LWE-based cryptosystem. In fact, for the above
encryption scheme the security is related to that of small secret RLWE. For this
we assume that the message m is small and random (one can add an additional
small error pe otherwise in the scheme).
Now recall the distinguishing-NTRU assumption, i.e., that it is algorithmi-
cally hard to distinguish ‘small modular fractions’ h = g/f mod q in R/qR
from uniform samples hu in R/qR; where ‘small’ means that g, f have small
coefficients. So under the distinguishing-NTRU assumption we can assume that
h is in fact uniform in R/qR. But if we now look at the ciphertext
c = r · h + m mod q,
we see that it is in fact a small secret RLWE sample, where r is the small secret,
h is uniform and public, and m is the secret small error. Under the (small
secret) RLWE assumption it is thus hard recover the message.
58
4.4.5 Formal definition of NTRU
Though there are slight differences between candidates, almost all NTRU-based
cryptosystems rely on the hardness of the following problem.
Definition 18 (search-NTRU [HPS98]). Let t, q be positive integers and ψ(x) ∈
Z[x] be a monic irreducible polynomial of degree t and put R = Z[x]/(ψ(x)).
Let f , g ∈ R have small coefficients (following some specific distributions χf
and χg respectively), provided that f is invertible mod q. Given h = g/f mod q,
the Search-NTRU is the computational problem of recovering g, f ∈ R.
We call h (= g/f ) an NTRU instance with parameters (q, n, χf , χg , ψ(x)).
Remark 10. The variants of NTRU mostly differ in the way the defining poly-
nomial ψ(x) ∈ Z[x] is chosen, or the way the invertible key f ∈ R is chosen.
For example, ψ(x) is often chosen to be a cyclotomic polynomial with degree
p − 1 or degree a power of 2 (e.g., xt + 1 with t a power of 2). Alternatively the
polynomials xt − 1 and xt − x − 1 are used.
The way f ∈ R is chosen falls roughly in a few large classes. Sometimes f
is of the shape p · f ′ or p−1 · f ′ mod q for some f ′ ∈ R with small coefficients.
In other cases, to make f trivial to invert modulo p, it is set to f = 1 + pf ′ with
small coefficient ring element f ′ ∈ R.
In the concluding sections, we will not consider all these variants, for lack of
space.
Remark 11. A recent work of Felderhoff, Pellet-Mary and Stehlé [PS21; FPS22]
shows that NTRU is as least as hard as unique Module-SVP in rank 2 (by show-
ing a reduction from the latter to the former). Additionally, it is shown that
NTRU can be reduced to RingLWE.
NTRU and RingLWE are both at least as hard as IdealSVP, as there is a
reduction from IdealSVP to those two problems.
59
Rank-2
IdealSVP NTRU
Module uSVP
RingLWE
H = p · F −1 · G mod q,
c = Hr + m mod q
h = f −1 · g mod q
60
into one of matrices (with H, F , G ∈ Zn×n )
H = F −1 · G mod q.
can then be seen as an invertible linear map, described by a matrix, which are
then respectively coined F , G, H.
As in the Ring-LWE case, these matrices will then have a specific shape,
depending on the structure of the ring R. For example, for the ring R =
Z[x]/(xt + 1), it will be of the anti-circulant form, as in Figure 4.2.
61
Part II
62
Chapter 5
Attacks on Unstructured
Lattices
In this chapter we discuss attacks on (variants of) LWE and NTRU assumptions
by interpreting them as generic lattice problems. The security estimates for
all lattice-based NIST candidates is mainly based on these attacks. For usual
parameters, the best known attacks are based on BKZ and SVP calls in lower
dimensions. In this chapter we will mostly consider the block-size β of BKZ or
the dimension β of these SVP calls, as the main cost metric. In the next chapter
we will go deeper into the concrete costs of running BKZ or solving SVP with
such parameters.
b = A · s + e mod q (5.1)
63
LWE as a BDD instance
One could consider the lattice
If the small error vector e in Equation (5.1) did not exist, the vector b would
be in this lattice Lq (A). But, we know, because of this small error e, that
the vector b does not lie in this lattice, although it must be very close to the
lattice! Namely, due to the modular equation there exists some z ∈ Zm such
that b = A · s + qz + e. Since A · s + qz ∈ Lq (A), the distance of b to the lattice
Lq (A) is bounded by ∥e∥.
Solving a BDD instance can be done by a so-called dual attack, which tries
to find short dual lattice vectors in the dual lattice of Lq (A), in order to solve
BDD in the original (primal) lattice. We discuss this attack in Section 5.2.2.
64
columns linearly independent.
A b
0 c
Here, 0 is a n-dimensional row vector consisting of zeros, and c ∈ R>0 is chosen
in an appropriate way (namely, close to ∥e∥ for a proven reduction, or just a
small constant in practice). Then the following lattice,
m+1 A b n+1
Lq (A, b) := y ∈ Z y= · x mod q for some x ∈ Z
0 c
of dimension m + 1 has the unusually short vector
A b s As − b e
· = =
0 c −1 −c −c
Finding such a unusually short vector in a lattice is done by a so-called
primal attack, in which short vectors in the original (called ‘primal’, as opposed
to ‘dual’) lattice solve the problem at hand. This is the subject of Section 5.2.1.
H = G · F −1 mod q, (5.2)
Concluding, we see that the lattice L(BH ) contains n unusually short vectors
consisting of the columns of BGF . So, one can see a search-NTRU problem as
65
Dual attack Primal attack
search/decision
NTRU
Figure 5.1: Overview of reductions from LWE and NTRU to the general lattice
problems BDD or uSVP.
66
we summarized the influence of increasing LWE or NTRU parameters on the
hardness of the underlying problem.
Estimates.
Initially the focus of the primal attack was on the unique-SVP problem, where
there is a large gap between λ1 (L) and λ2 (L). That the BKZ algorithm recovers
such a unique shortest vector much earlier than expected was already observed
experimentally in [GN08]. By extrapolating the experimental results the au-
thors came to the following rough estimate: BKZ-β recovers a unique shortest
d/2
vector with high probability whenever λ2 (L)/λ1 (L) ≥ τβ · αβ , where τβ < 1
is a experimentally determined constant that depends on the algorithm, lattice
1 One can always ignore some samples and therefore assume a lower m′ < m. For certain
67
family, and blocksize used. This estimate [GN08] is often referred to as ‘the
2008 estimate’.
Later, in [AFG13], the 2008 estimate was applied to (embedded) LWE in-
stances. Experiment with small blocksizes where showed to match the 2008
estimate with a constant τβ between 0.3 and 0.4. While the 2008 estimate gives
quite reasonable predictions, it does not explain how a unique shortest vector
is recovered, and therefore also lacks a heuristic explanation.
The first heuristically motivated estimate came in 2016 and became known
as the 2016 estimate [Alk+16]. It turns out that the uniqueness does not really
matter, it is more about the gap between λ1 (L) and gh(L). The general idea
is that if v is unusually short, then so is the projection πd−β+1 (v) to the last
BKZ block L[d−β+1:d] . In case the length ∥πd−β+1 (v)∥ is less than the expected
minimum gh(L[d−β+1:d] ), it is likely that the SVP call in this last BKZ block
will recover the projection πd−β+1 (v). For large enough β, it is generally easy
to then recover the full vector v from its projection. This reasoning leads to the
following estimate.
where αβ = gh(β)2/(β−1) .
Justification. The left hand side of the inequality is an estimate for ∥πd−β+1 (v)∥,
while the right hand size is the expected norm of b∗d−β+1 under the GSA. When
the inequality is satisfied we expect that the shortest vector in L[d−β+1:d] is in
fact (a projection of) the unusually shortest vector, and thus it is inserted by
BKZ at position d − β + 1. See Figure 5.2 for an illustration.
Except for very small blocksizes β, the unusually short vector v is recovered
from its projection πd−β (v) with high probability, either directly by Babai’s
nearest plane algorithm, or by later BKZ tours on the blocks L[d−2β+2:d−β+1] ,
L[d−3β+3:d−2β+2] , . . . ; lifting the vector block by block. The 2016 estimate has
been verified extensively [Dac+20; PV21] with experiments in feasible dimen-
sions. In hindsight this implies that the 2008 estimate, in case λ2 (L) ≈ gh(L),
is true for a constant τβ ≈ gh(β)−1 .
Asymptotics.
Consider a lattice L of dimension d and with gap gh(L)/λ1 (L) = dg+o(1) for some
constant g ≥ 0. Let β = B · d for some constant B. Estimate 1 asymptotically
boils down to the inequality
1
B> + o(1).
2g + 1
68
log || ||
√
For example, with a gap of gh(L)/λ1 (L) = d we obtain B = 21 and thus the
primal attack only requires a blocksize of about 12 d+o(d) to recover an unusually
short vector. This is the typical regime for current cryptographic schemes, such
as Falcon and Dilithium.
Refinements.
The 2016 Estimate gives a clear explanation on how and where the secret vector
is recovered, namely its projection is found in the last BKZ block. This also
allows to further refine the estimate and give concrete predictions. For example
by using a BKZ-simulator instead of the GSA, and by accounting for the prob-
ability that after the projection ∥πd−β (v)∥ has been found, it is successfully
lifted to the full vector v. Also instead of working with the expected length
of the projection, we can directly model the probability distribution under the
assumption that v is distributed as a Gaussian vector. Such refinements were
applied in [Dac+20; PV21], and the resulting concrete predictions match with
experiments to recover an unusually short vector. Sometimes there is not just
a single unusually short vector, but there are more of them, which makes it
more likely that at least one of them is recovered. Because the refined concrete
estimators already works with a probability distribution, we can easily take
multiple vectors into account.
69
Summary 11 (Primal attack for uSVP). The primal attack solves the uSVP
instance by running the BKZ lattice reduction algorithm on a (primal) lattice
basis. Given an estimate for the length of the unusually short vector(s), there
exist accurate (probabilistic) models and estimates for the BKZ blocksize that
is required to recover such a vector.
70
Estimate 2. Let L be a lattice of dimension d, and let D ⊂ L∗ be a finite list
of distinct dual vectors of length at most α · gh(L∗ ). If we assume the samples
behave independently, then the dual attack correctly decides a δ-dBDD instance
(L, t) with high probability if
#D · ϵ2 ≥ Ω(1),
2 2
·δ ·d
where ϵ = exp − α 2e 2 .
Justification. The left hand side represents the number of short dual vec-
tors log(#D) = β/2 · ln(4/3) + o(β) obtained from a sieving call on a β-
dimensional sublattice. After BKZ reduction with blocksize β on the dual
√
lattice, we obtain a basis [d1 , . . . , dd ], where ∥d1 ∥ = αβ d−1 · det(L∗ )1/d .
Given that ∥d1 ∥ ≈ gh([d1 , . . . , dβ ]) a full sieve on p
the sublattice generated by
√
d1 , . . . , dβ gives vectors of length bounded by ℓ∗ = 4/3 · αβ d−1 · det(L∗ )1/d ,
and thus
d−1
ℓ∗ 4 αβ
α2 := = · .
gh(L∗ ) 3 d/2πe
We then obtain
α2 · δ 2 · d 8π
ln(1/ϵ2 ) = = · αβd−1 · δ 2 ,
e2 3e
which forms the right-hand side of the estimate.
While the distinguishing advantage of a dual vector can be some ϵ > 0, and
we need about O(1/ϵ2 ) of such vectors, we still need a concrete distinguishing
algorithm that manages to extract this advantage into a correct decision. We
know that such an algorithm should be periodic with respect to the primal
71
lattice L. For a list D = {w1 , . . . , wK } ⊂ L∗ of dual vectors, one naturally
obtains the periodic function
K
X
FD (t) := exp(2πi · ⟨wj , t⟩).
j=1
If the inner products ⟨wj , t⟩ mod 1 are uniformly distributed, then FD (t) ≈ 0,
whereas if |⟨wj , t⟩| mod 1 is biased towards 0 then (the real part of) FD (t) is
expected to be large. By choosing an appropriate threshold value T we obtain
a decision algorithm. If all dual vectors are of about the same length, then the
above strategy is close to optimal (see e.g. [GMW21]). If the dual vectors are
not of the same length, one can introduce some weights in the summation that
depends on their norm, giving more importance to shorter vectors.
Asymptotics.
Consider a lattice L of dimension d and a δ-dBDD instance with δ = d−g+o(1) ·
gh(L) for some constant g ≥ 0. Let β = B · d for some constant B. Estimate 3
asymptotically boils down to the inequality
1
B> + o(1).
2g + 1
√
For example, with g = d we obtain B = 12 and thus the dual attack only
requires a blocksize of about 12 d + o(d). Note that asymptotically the dual
attack coincides perfectly with the primal attack (after converting the BDD
instance to an unusual SVP instance).
The cost of the basic dual attack is mainly dominated by the cost of obtaining
the short dual vectors. The best sieving algorithms run in time (3/2)d/2 , while
the distinguishing part only requires on the order of #D = (4/3)d/2 ≪ (3/2)d/2
computations. We can improve this balance by creating multiple BDD instances
on the same lattice, such that we can reuse the short dual vectors.
72
S ⊂ R. Suppose ⟨e, w⟩ = c, then we know that
and the right-hand side is known. This describes some hyperplane H in which
the solution v lies, e.g. v ∈ L ∩ H. Let x ∈ L ∩ H, then L′ := (L ∩ H) − x
is again a lattice, of dimension d − 1 and determinant det(L′ ) = ∥w∥ · det(L).
Furthermore the original BDD instance can be adapted to (L′ , πH (t) − x) with
solution v − x. So by solving the new BDD instance in L′ we obtain a solution
to the original BDD instance.
One lattice
Figure 5.3: Diagram of hybrid attack. Here L′ is some lower rank section of the
original lattice.
73
FFT speed-up for hybrid dual attack
The hybrid attack reduces a single search BDD instance to many decisional BDD
instances in the same lattice. This implies that if we instantiate the decision
oracle by the dual attack, we only have to pre-compute the short dual vectors
once. In contrast, for the primal attack, we would need, at the very least, to
solve a large SVP instance, for each decisional BDD instance. The hybrid attack
is thus mostly useful in combination with the dual attack.
Precompute short
vectors D ⊂ (L′ )∗
Guesses
Search BDD Decision BDD Dual Attack
L, δ L′ ⊂ L, δ ′ < δ on L′
FFT speed-up
Figure 5.4: Overview of full hybrid dual attack from search BDD.
for each guess g. If we have T guesses, and K dual vectors, then this would
require about O(T · K) inner product computations. Given that usually both
T and K are (exponentially) large, this can be a limiting factor for the hybrid
dual attack.
If these guesses have some particular structure however, we can speed up
this computation to about Õ(max T, K) inner products. Note that every guess
g corresponds to some coset g+L′ w.r.t. the lower rank lattice L′ . Now suppose
the set G of guesses is closed under addition modulo L′ , i.e. the guessed cosets
form an additive group, then FFT techniques are applicable.
To see this let L′′ = G + L′ be the superlattice of finite index. The idea is
that in that case the value of the inner product ⟨wj , g⟩ only depends on the
coset of wj ∈ (L′ )∗ /(L′′ )∗ = (L′′ /L′ )∗ ∼
= Ĝ. We can rewrite
K
X
FD (t − g) := f (ŵ) exp(−2πi · ⟨ŵ, g⟩),
ŵ∈Ĝ
74
where X
f (ŵ) := exp(2πi · ⟨wj , t⟩).
wj ∈D|ŵ
Computing (f (ŵ)ŵ∈Ĝ has a total cost of |D| = K inner products. From these
values we can then compute (FD (t − g))g∈G by an FFT in time O(|G| log(|G|).
In theory, the FFT can reduce the running time by a square root. Unfor-
tunately, if we guess only the small errors, the cosets do not form an additive
group. When applying such an attack to e.g. LWE this could be resolved by
guessing all possible errors modulo q, resulting in an FFT with cost in the order
of Õ(q t ) when guessing t coordinates. Given that q is generally quite large, the
cost of this grows extremely fast, limiting t to small values. Recent works [GJ21;
MAT22] have resolved this limitation. Either by only guessing the error coef-
ficients modulo some smaller value γ (say γ = 2), or, similarly, by modulus
switching techniques to translate the problem to some lower modulus γ. The
FFT cost is then reduced to only Õ(γ t ) when (partially) guessing t coordinates,
allowing for much larger guessing dimensions t. Both techniques do introduce
some additional round-off errors, which can be compensated by more short dual
vectors. Overall, these techniques can improve the hybrid dual attack by half a
dozen of bits.
Summary 14 (Hybrid dual attack). When we use the dual attack as a
distinguisher, we can pre-compute the short dual vectors once, and an FFT can
be used to speed-up the handling of all BDD instances at once.
75
primal attack should perform better than expected. In fact, this dense sublat-
tice attack is better than the original algebraic ones. Recently, the concrete
complexity of the dense dual attack was thoroughly studied [DW21], leading
to a precise concrete estimator for the blocksize that BKZ needs to recover the
dense sublattice, extensively verified by experiments. This work showed that
the dense sublattice attack is already applicable for reasonably low moduli. I.e.,
for uniform ternary secrets and NTRU parameter n, the cross-over is around
q = 0.004 · n2.484 . Asymptotically, this is above the usual NTRU parameters
for encryption and signature schemes (for which q = O(n)), but due to the low
constant one still needs to take care when choosing concrete parameters.
Remark 13. In theory one can also construct a lattice with a dense sublat-
tice from structured LWE instances. I.e. by adding not a single target, but all
(rotations of ) the target, one can again obtain a dense rank n sublattice. How-
ever in these cases the dimension of the full lattice also grows significantly, and
therefore the dense sublattice attack does not seem to improve upon the original
primal attack for LWE.
76
O(nk ) distinct monomials, and can thus be solved by linearization techniques if
m ≥ O(nk ) equations (samples) are available.
For binary LWE, i.e. for which the errors take values in {0, 1} the Arora-Ge
attack runs in polynomial time if m ≥ Θ(n2 ) samples are available. However,
given that there are at most 2n errors available such an attack does not apply,
even in the extreme case of binary errors (both asymptotically and concretely).
Another option is to solve the polynomial system of equations using Gröbner
basis techniques [Alb+14]. This allows for a trade-off between the number of
available equations (samples) and the run-time. Again looking at the binary
error case this leads to a sub-exponential attack whenever m = Θ(n log log n).
Moreover, such an attack improves on e.g. the primal attack only when m ≥
7.98n samples are available. For larger error sets the number of required samples
quickly grows.
The BKW attack was initially developed for the LPN problem (similar to
LWE, but with q = 2). Consider the LWE secret s = (s1 |s2 ) where s1 ∈
(Z/qZ)k and s2 ∈ (Z/qZ)n−k . The idea is to find many pairs of LWE samples
(bi , ai ), (bj , aj ) such that say the first k coefficients of ai − aj are 0. For such
a pair we obtain a new LWE sample (bi − bj , ai − aj ). Because the first k
coefficients of ai − aj are 0, we can remove those to obtain an LWE sample
for the secret s2 of dimension n − k. We have thus reduced the dimension of
the LWE problem. We can repeat this process until the LWE problem becomes
feasible. Such an attack has two problems, firstly the error of the new p LWE
sample is larger than the original one, and secondly, we need about m = Θ( q k )
samples to find even a single pair that collides on the first k coefficients. To use
this technique recursively we would constantly need about m = Θ(q k ) samples.
The parameters k cannot be too small as otherwise the error would increase
too much. All in all, for typical parameters, the BKW algorithm requires and
exponential number of samples to function. With only m = 2n available samples
the BKW attack is not applicable.
Summary 16 (Arora-Ge, Gröbner bases and BKW). The Arora-Ge and
Gröbner bases attacks are only applicable when many LWE samples are available
and when the error support is very small. Only for binary errors the required
number of samples is close to the 2n available ones (but still larger). The BKW
attack requires significantly more samples.
77
standard deviation σ. Following Section 5.1 we turn the LWE instance with m
samples into a uSVP instance with the lattice spanned by Lq (A) ⊕ 0 and the
embedded BDD instance (b, 1). This lattice has dimension d = m + 1, volume
q m−n and contains (for common parameters) an unusually
√ short vector (e, 1).
The expected norm of the shortest vector is close to mσ 2 + 1. Following Esti-
mate 1 running BKZ on this lattice recovers the secret short vector (e, 1) when
the blocksize β satisfies
p p √
β/(m + 1) · mσ 2 + 1 < αβ 2β−m−2 · q (m−n)/(m+1) ,
where αβ = gh(β)2/(β−1) .
For example for concrete parameters n = 640, m = 2 · 640, q = 215 and
σ = 2.8 we obtain the above whenever β ≥ 485.72. This, however, might not
be the best primal attack. Using less samples might be beneficial, so one has
to find the lowest blocksize β along with some m ≤ 2 · 640, that satisfies the
above inequality. For this example reducing the number of samples increases
the blocksize β, and thus it is best to use all the samples.
78
Chapter 6
Cost estimates for cryptographic attacks generally have three traits that distan-
tiate them from their real-life costs. The first trait is that they mostly consider
asymptotic run-times, which generally omits multiplicative constants that are
very relevant non-asymptotically. The second trait is that these cost estimates
generally necessarily involve simplifications regarding the computations. For
example, one can assume that memory usage is ‘free’ or that an attack can be
totally parallelized. In reality, working on real machines, these simplifications
are far from true. Thirdly, the behavior of the attack algorithms is usually sim-
plified and analyzed using heuristics, and these heuristics can differ from the
actual more complex behavior.
A relevant example of these differences between theoretically estimated costs
and real-life costs is that of the comparison between sieving and enumeration in
lattices in order to find short vectors. While asymptotically, sieving has a lower
overall cost than enumeration, enumeration algorithms were for a long time more
efficient in practice. Only quite recently, sieving has beaten enumeration in real-
life costs, as can be seen by the recent solutions to the Darmstadt challenges by
the lattice sieving framework G6K [SG10; Alb+19].
In this chapter we will discuss both the asymptotic, as well as the lower
order improvements to the enumeration and sieving algorithms. Overall, these
improvements, over the last decade, have lead to significant decreases to the
concrete cost of the attacks discussed in Chapter 5. We will end with a discus-
sion on how to compute concrete cost estimates for solving LWE and NTRU
instances.
6.1 Enumeration
Recall that the enumeration algorithms find short (or close) vectors in a lat-
tice L recursively by first enumerating short (or close) vectors in the projected
79
lattices πi (L). The complexity of this enumeration process heavily depends
on the reduction quality of the basis. Assuming the current basis is close to
HKZ reduced, the time complexity of the standard enumeration algorithm is
β log β
asymptotically given by 2 2e +O(β) for a rank β lattice. This is roughly the
case when using enumeration within progressive BKZ, and also in practice this
leading term is achieved.
Super-exponential speed-ups
The time complexity of enumeration within BKZ was recently improved from
β log β β log β
2 2e +O(β) to 2 8 +O(β) [Alb+20b]. This potential improvement was al-
ready indicated in [HS10], and given as a heuristic lower bound in [Ngu09].
This improved constant was therefore already used in some pessimistic security
estimates.
The idea is that enumeration is much faster on bases that follow the Geo-
metric Series Assumption (see Heuristic 2), i.e. that have a straight log-profile.
In theory, this would lead to a leading constant of 18 . However, for the reduc-
tion quality that is needed, the basis attains a more concave HKZ shape (see
1
Definition 13). The concavity is what makes the constant increase to 2e . For
the general SVP problem there seems to be no way to circumvent this problem.
However, when using enumeration as an SVP oracle within BKZ, there is
more freedom to pre-reduce the lattice basis. The trick in [Alb+20b] is to pre-
reduce a slightly larger block around the BKZ block in which the enumeration
is ran. Because the reduction is relatively weaker to the larger pre-processing
dimension, the basis does actually attain the GSA shape in BKZ block. Some
care has to be taken at the first and last few BKZ blocks, but this can be resolved.
This strategy heuristically works as long as the BKZ blocksize β is sufficiently
small compared to the total dimension d. In practice however it seems sufficient
to have d ≥ 1.15β, which makes it applicable for all NIST candidates for which
usually β ≤ d/2 + o(d).
Exponential speed-ups
When looking for a vector v ∈ L of length at most R > 0, the naive enumeration
algorithm enumerates all vectors of at most length R in the projected lattices
πi (L). However, assuming v is pointed in a random direction relative to the
basis, one can expect that ∥πi (v)∥2 ≈ n−i 2 n−i 2
n · ∥v∥ ≤ n · R . It would therefore
be sufficient to enumerate all vectors of squared length at most Ri2 := n−in ·
R2 + ϵ in the projected lattice πi (L), while√still finding a short vector with
high probability. For example, R⌊n/2⌉ ≈ R/ 2, which following the Gaussian
√ n/2
Heuristic would result in a factor 2 = 2n/4 less vectors to enumerate in
π⌊n/2⌉ (L), giving an exponential speed-up.
We call this pruned enumeration and the radii R = R0 ≥ R1 ≥ . . . ≥ Rn
the pruning parameters [SH95]. By adjusting the pruning parameters there is a
trade-off between the size of the enumeration tree, and the success probability
80
of finding a short vector. It turns out that the best trade-off is achieved by
decreasing the pruning parameters such that the success probability is expo-
nentially small, but such that the search tree decreases even more [GNR10].
This regime is called extreme pruning. By re-randomizing and repeating the
enumeration (an exponential number of times), the success probability can be
boosted to find a short vector with high probability. This also leads to another
large exponential speed-up over naive pruning. Concretely, the extreme enu-
meration cost when used inside BKZ with blocksize β was determined to be
around 20.184β log2 (β)−0.995β+16.25 .
Another line of works tried to make the enumeration inside BKZ more effi-
cient by allowing it to find not exactly the shortest vector, but some approximate
short vector. The loss of shortness is then compensated by running the enu-
meration in a slightly larger BKZ block. For reasonably small approximation
factors α > 1 the trade-off seems beneficial [Aon+16; Agg+20; LN20a]. In a
later work [Alb+21] the approximate strategy was combined with the earlier
discussed super-exponential speed-up by extended pre-processing. Concretely,
this lead to the most efficient enumeration procedure within BKZ known so far,
with a time complexity of 20.125β log(β)−0.654β+25.84 for BKZ with blocksize β.
81
6.2 Sieving
We will now discuss improvements to the lattice sieving algorithms. These are
currently the most efficient algorithms to solve SVP, both asymptotically as in
practice. Recall from Section 2.12 that heuristic sieving algorithms take a list
of N = (4/3)d/2+o(d) vectors, and repeatedly tries to find pairs of close vectors
x, y in this list. The short(er) vector x − y is then inserted back into the list,
possibly replacing a longer one. This process is repeated until the list contains a
short enough vector. The naive algorithm by Nguyen and Vidick [NV08], which
checks all pairs in the list runs in time N 2+o(1) = 20.415d+o(d) .
Exponential speed-ups.
To reduce the time complexity below 20.415d+o(d) we need a more efficient way
to find pairs of close vectors in the list. In a line of works [Laa15; BGJ15; BL16;
Bec+16] the time complexity was improved to 20.292d+o(d) by nearest neighbor
searching techniques. Instead of checking all pairs, the idea is to first apply
some bucketing technique in which close vectors are more likely to fall into the
same bucket. By only considering the somewhat-close pairs inside each bucket,
the total number of checked pairs can be decreased.
We shortly highlight two of such bucketing variants, the practically efficient
bgj1 sieve with a time complexity of 20.349d+o(d) [BGJ15], and the asymptot-
ically best bdgl sieve with a time complexity of 20.292d+o(d) [Bec+16]. The
bgj1 sieve creates buckets by first picking some random directions v1 , . . . , vm ∈
S n−1 = {x ∈ Rn | ∥x∥ = 1}. Then a vector w from the list is put in a bucket vi
if ⟨vi , w/∥w∥⟩ ≥ α for some fixed constant α > 0. The geometric interpretation
of this is that the vector w lies in the spherical cone that points in the direc-
tion of vi . Two vectors that lie inside the same spherical cone have a higher
probability to be close that two uniformly random vectors. By tweaking the
number of buckets and the constant α the trade-off between the bucketing and
then finding the pairs inside√each bucket can be optimized. In this case leading
to buckets of size about O( N ), and a time complexity of 20.349n+o(n) .
The bdgl sieve improves the bucketing part by using structured buckets.
In particular the dimension d is split unto multiple parts d = d1 + . . . + dk ,
and the total set of bucket is a product of random local buckets. By sorting
and cleverly enumerating the inner product of a vector w with the (few) local
buckets on can quickly enumerate all buckets that the vector w should be part
of. In addition, for say k = O(log(d)) the bucket directions are still close to
uniformly distributed (more about this later). Due to this structure one can
have many more buckets, while keeping the bucketing cost low. This leads to a
different trade-off, with much smaller optimal bucket sizes of around N 1/(k+1) ,
and for slowly growing k a time complexity of 20.292d+o(d) .
To lower the space cost below N = 20.2075+o(d) one has to look beyond sums
and differences of pairs, and consider triples u ± v ± w or more generally k-
tuples [BLS16; HK17; HKL18]. The current best triple sieve [HKL18] has a
space complexity of 20.1887d+o(d) , but comes with a higher time complexity of
82
20.3588d+o(d) . Given that current estimates mostly ignore the cost of memory,
we do not consider these memory saving variants further.
Quantumly, there is good news from the perspective of security. The speed-
up obtained from Grover search techniques applied to sieving algorithms has
so far only given minor improvements, far from the possible quadratic speed-
up. A line of works [LMV15; Laa16a; CL21; Hei21] improved the classical time
complexity of 20.292d+o(d) down to 20.2570d+o(d) . Even though the improvement
is far from quadratic, it might still be of importance for the security of schemes.
However, even in unit cost quantum memory models, the concrete speed-up of
quantum sieving algorithms is tenuous at best [Alb+20a]. With all the expected
overhead of quantum computations, quantum sieving is so far not a threat. Note
that all sieving algorithms based on pairs have a fundamental lower bound of
20.2075d+o(d) on the number of vectors that need to be stored. As a result, any
quantum improvements to the search procedures will also be limited to that
lower bound.
Summary 18 (SVP by sieving). The best sieving algorithm solves the short-
est vector problem in dimension β in time 20.292β+o(β) , and 20.2075β+o(β) mem-
ory. Quantum computers only improve the run-time to 20.2570β+o(β) , while
keeping the same exponential (quantum) memory usage.
Subexponential speed-ups.
Asymptotically the single exponential time complexity of sieving algorithms is
much lower than the super-exponential time complexity of enumeration algo-
rithms. However, naive sieving implementations can have large subexponential
overheads. Enumerations algorithms are therefore faster in low dimensions, and
for a long time sieving algorithms were not viewed as practical. This status-quo
changed due to many subexponential and polynomial improvements, and cur-
rently sieving algorithms are already faster than enumeration in dimensions as
low as 70.
One improvement, already discussed in Section 2.12, is progressive sieving.
Instead of immediately sieving in the full dimension, we first sieve in a projected
sublattice, and slowly undo the projection (while sieving) until we are sieving
in the full dimension. Due to the exponential time complexity sieving in the
lower dimensional projected sublattices is often much more efficient than in the
full dimension. Once we reach the full dimension the vectors are already quite
short, which implies that we only need to do a bit of sieving there.
Another large improvement, which works well in conjunction with progres-
sive sieving, is the ‘dimensions for free’ technique [Duc18]. The key observation
is that lattice sieving algorithms do not just find a single shortest vector, but
a large list of short vectors. Heuristically, the list contains (a large fraction of)
the N shortest vectors of the lattice. Now suppose we sieve in some projected
sublattice πf (L) for some not too large f > 1. Suppose v ∈ L is a shortest
vector in the full lattice. If f is not too large, and if the basis is already quite a
bit reduced, then we can expect that πf (v) is present in the sieving list. Thus
83
by lifting all vectors obtained from the sieving process to the full lattice we ex-
pected to recover a shortest vector of the full lattice. A heuristic analysis shows
ln(4/3)d
that this can be expected if f ≤ ln(d/2πe) . We can thus solve exact SVP in
dimension d by sieving only in dimension d − f , essentially getting f dimensions
for free. Given that f is sublinear this leads to a subexponential speed-up. For
BKZ for schemes of security level 1 this can reduce the sieving dimension by
more than 40 dimensions, making it an important technique to take account of
when making estimates.
Lastly, we discuss some small polynomial (or even constant) speed-up. Lat-
tice sieving involves a lot of floating point inner product computations. The
latest record computations (and their analysis) showed that a low floating point
precision, such as 16-bit, is more than enough for the most computing-intensive
task. Given that the gate footprint of such multiplications often grows like p2 for
a precision of p bits, this leads to some important constant speed-ups. This also
enables usage on extremely efficient hardware such as Tensor cores on NVIDIA
GPUs [DSW21], or even more efficient dedicated hardware.
An even more extreme technique is the so-called popcount hash trick. Here
the idea is to create a small hash of each vector that captures some information
about its direction. One approach is for example to take some direction vectors
h1 , . . . , hh , and to record if the inner product ⟨hi , v⟩ is positive or negative.
This information can be pre-computed and stored as a bit string of length h
(say h = 2n). Now if two vectors v, w are close, then one can expected that
their corresponding bit strings share many directions. By a simple binary XOR
operations combined with a population count (counting the number of ones),
we can thus quickly compute if two vectors are close or not. Commonly this is
used as an initial filter, and only for those pairs passing the filter a full inner
product is computed. In practice this can leads to a factor 10× speed-up.
Estimates
The heuristic nature, and the many involved vectors, makes estimating the cost
of sieving algorithms very complex. The so-called core SVP estimate ignores all
subexponential factors and just computes the main complexity term. E.g. for
the bdgl in dimension β this would result in a bit estimate of 0.292β. However,
such estimates are overly optimistic, given that the overheads in terms of gates
can be extremely large. The more precise estimates have tried to estimate the
precise cost of the most computationally intensive tasks (bucketing and finding
pairs), sometimes by explicitly setting up circuits [Alb+18; Alb+20a]. Still some
overheads are ignored, but these estimates are getting closer to the truth. The
most precise concrete estimate from [Alb+20a] gives a gate complexity summa-
rized as 20.356d+o(d)+23.08 for bgj1 and 20.299d+26.01 for bdgl, for dimensions up
to about β ≤ 1024. The estimate for bdgl has been updated after [MAT22]
found a mistake in the estimation scripts of [Alb+20a]. These estimates are for
a single sieving iteration in dimension β. This is somewhat realistic in the case
of progressive sieving given that a single iteration (or less) might already be
enough in each dimension. In that case we should also add the (constant factor)
84
progressive overhead of sieving in the lower dimensions.
Ignored overheads
These estimates, certainly the one for bdgl, should be viewed as optimistic
(or pessimistic from a cryptanalysis point of view). For example, the negative
overhead of using structured buckets that are not uniformly random can be
as large as subexponential. This overhead is completely ignored in the above
estimate. In a recent work a more precise estimate was made that does include
these overheads [Duc22]. Around security level 1 this leads to a run-time increase
by a factor of about 26 . This factor can in theory be decreased at the cost of a
significant memory increase.
Another reason why these estimates might be optimistic is because the us-
age of memory is ignored (or counted at unit cost). The best attacks around
security level 1 require at least 295 memory. Achieving such a memory capac-
ity might be much harder than achieving the say 2140 needed bit operations.
Secondly, random access would require at least log2 (295 ) = 95 traversal gates
(and in practice much more), adding another overhead that is currently ignored.
Physically, the memory would also be spread out, leading to latency and band-
width constraints. Memory bandwidth was already a problem in current record
computations on a single machine when using GPUs, and is expected to only
increase when moving to a multi node setup.
Possible improvements
We shortly discuss a few areas where we might expect improvements to the
current best lattice sieving algorithms.
At the moment there are no signs for more exponential speed-ups. The near-
est neighbor line of improvements has culminated in the 20.292d+o(d) algorithm,
and from a nearest neighbor perspective this is optimal [KL21]. Still there might
be improvements in the lower order terms. For example, the 26 overhead from
the structure in the bdgl sieve is not inherent, but originates from the choice of
using a product of locally random buckets. Currently, this is the best approach
known, but progress on the area of spherical decodable codes might remove the
overhead. Note that this overhead was already ignored in the latest estimates.
Moving to sub-exponential speed-ups the dimensions for free technique might
be stretched a bit further. Already in practice we attain more dimensions for
free than expected, by lifting many vectors, that are encountered during sieving,
on the fly. It is unclear how these practical observations scale to cryptographic
dimensions. Another interesting trade-off might be to combine dimensions for
free with the approximate BKZ techniques recently used in enumeration. Al-
lowing a small SVP approximation factor instead of aiming for exact SVP can
increase the dimensions for free significantly. Although this does not give expo-
nential speed-ups as in the enumeration case, it might still lead to a significant
sub-exponential speed-ups. Lastly, the current dimensions for free techniques
are strongly related to the primal attack. In case it turns out that the dual
85
attack is actually better, it might also be possible to increase the number of
dimensions for free by using techniques from there. Possibly combined with
hybrid methods.
There are still some simplifications made in the current estimates that are
slightly pessimistic. For example, all vectors in the sieving list are assumed to be
of about the same norm, i.e., they are assumed to be uniform over some sphere.
Secondly, all vectors in some spherical bucket are also assumed to be uniform
over the edge of this bucket. While asymptotically these assumptions are fine,
they do not hold up when looking at lower order terms. It is easier to find a
reduction between a short and a long vector than it is to find one between two
long vectors. This is not as simple as replacing uniformity of spheres to that of
balls, as sieving algorithms do not output vectors that are uniform over a ball,
in fact they are slightly biased to vectors of small norm.
The current estimates compute the cost of finding (almost) all close pairs in
a list of vectors. Which is the main operation in lattice sieving. If we actually
require to find all pairs depends on multiple factors such as the saturation we
want to achieve, the number of vectors in our list, and the length (and exact
distribution) of them at the start of sieving. When sieving directly in the full
dimension we might have to repeat this operation many times. Conversely, for
progressive sieving, and not too harsh saturation constraints, it might be enough
to find a fraction of all pairs, thus obtaining a speed-up over the estimates (at
the cost of the progressive overhead).
86
Record runs Gate estimates
k k
Sieving dimension Cost (2 FLOP) Cost (2 gates) BGJ1 BDGL
143 67.5 75.5 76.4 65.2
146 68.6 76.6 77.5 66.1
150 69.9 77.9 78.9 67.3
Table 6.1: Comparing TU Darmstadt record sieving runs from [DSW21], with
the sieving cost estimates. A FLOP represents a 16-bit floating point oper-
ation (mostly addition or multiplication). The estimate only counts the op-
erations from the reduction phase and is thus an underestimate. The gate
cost is an optimistic extrapolation by adding log2 (162 ) (naive cost of 16-bit
multiplication), ignoring any gates needed for memory or other operations.
The estimates correspond to the most precise estimates for the BGJ1 sieve
(random buckets-classical), and BDGL sieve (list decoding-classical)
from [MAT22; Alb+20a]. The last estimate is currently used for security esti-
mates.
estimates for the bgj1 sieve match very closely with the concrete record com-
putations. Indeed, the sieve used in these computations was asymptotically
equivalent to the bgj1 sieve. The same work also implemented a CPU and
GPU version of the bdgl sieve. For CPUs the bdgl sieve already improved
upon the bgj1 sieve in dimensions as low as 90, as expected by the estimates.
However, when moving to GPUs, the trade-off seems to be in dimensions above
150. This is due to memory bandwidth constraints, for which the bdgl sieve
is much more susceptible than the bgj1 sieve. At the same time the estimates
for the bdgl sieve are significantly lower, giving an improvement of more than
10 bits around a sieving dimension of 150. In practice, the bgj1 sieve is faster.
This gives an indication that the lower order overheads of the bdgl sieve are
much higher in practice than what the current estimates give. This can partially
be attributed to the structural overhead indicated by [Duc22], and partially by
memory bandwidth constraints. This indicates that scaling the bdgl sieve to a
multi-node system is expected to result in significant overheads.
Summary 20 (Lattice sieving in cryptographic dimensions). Scaling lat-
tice sieving algorithms to cryptographic dimensions is non-trivial. In particular,
the current asymptotic best sieving algorithm, is prone to memory bottlenecks
in practice. Current cost estimates, that ignore the cost of memory, are therefore
significantly lower than what we can (currently) achieve in practice.
6.3 BKZ
Cost estimate
In theory running the BKZ algorithm with a blocksize of β on a lattice of
dimension d requires a polynomial number (in d) calls to an SVP oracle. More
87
precisely, a single tour costs around d SVP oracle calls (most in dimension β),
and up to O(d2 log(d)/β 2 ) tours might be needed.
In practice, when using sieving, each block can often be HKZ reduced after
a single SVP call (using the many short vectors found). So one only needs to
consider about d − β + 1 blocks in a single tour. Secondly, instead of running
many tours with blocksize β, it is better to progressively increase the blocksize
and only run maybe a single tour per blocksize. When using the asymptotically
fastest sieving algorithm as the SVP oracle the cost of running all tours up to
dimension β is in theory only a factor about C = 1/(1 − 2−0.292 ) ≈ 5.46 more
costly than running a single tour with blocksize β.
Running progressive BKZ with only a single tour per blocksize introduces
some loss of quality. The precise loss can be modeled using simulators. As a
result one might have to increase the blocksize a bit to obtain the same profile
as the Geometric Series Assumption indicates. Often this trade-off improves the
overall run-time.
Simulator
While the Geometric Series Assumption gives a good first order estimate of the
basis profile after BKZ-reduction, it is known to be inaccurate in small dimen-
sions or when the dimension is only a small multiple of the blocksize due to the
head and tail behavior. Additionally it does not account for the slower conver-
gence when running progressive BKZ with only a few tours. To resolve these
problems [CN11] introduced a BKZ simulator based on the Gaussian Heuristic.
This simulator keeps track of the basis profile ℓ = (∥b∗1 ∥, . . . , ∥b∗d ∥), and runs
BKZ tours where instead of computing a shortest vector it just updates
!1/b
κ+b−1
Y
ℓκ = min ℓκ , gh(b) · ℓi ,
i=κ
for b = min{β, n−κ} (or experimental values of gh(b) for b < 50), and adjusts the
remaining norms ℓκ , . . . , ℓκ+b−1 accordingly. Such a simulator predicts correctly
both the center (body) and tail part of the profile. This simulator was later
refined by a probabilistic variant of the Gaussian Heuristic that can return
slightly short vectors with a small probability [YD17; BSW18]. Due to this
addition the head behavior is also captured. In short, these simulators allow for
accurate and efficient predictions of the profile shape for random lattices, even
for progressive BKZ with a limited number of tours.
88
logq Before Reduction
log ||bi || After Reduction
1 logq
2
0
0 50 100 150 200 250
index i
Figure 6.1: Typical Z-shape of the basis profile of q-ary lattices such as those
arising from LWE or NTRU.
Remark 14. The current lowest estimates for NIST candidates, such as [GJ21;
MAT22], often use the GSA to estimate the basis profile, while using a progres-
sive BKZ model for the cost. Accounting for this would increase the estimates
by a few bits.
Influence of Z-shape
Current BKZ simulators predict very well the profile of a random basis after
BKZ reduction. However, sometimes the input basis is not so random. For
example, in the common case of LWE and NTRU, the lattice is q-ary, and as
a result the input bases often start with many orthogonal vectors of length q.
These vectors can be much shorter than what one could get after e.g. LLL
reduction, and they influence the shape of the basis profile, for example to a
typical Z-shape as in Fig. 6.1. The GSA heuristic can be adapted to a Z-shape
GSA heuristic, that is quite accurate as a first order approximation [Alb+21].
This special shape already enabled the dense sublattice attack for NTRU in
the case the modulus q is large [ABD16; KF17; DW21]. For other attacks,
such as the primal attack, it is generally assumed that the Z-shape structure
has (mostly) disappeared around the successful blocksize. Because of this the
Z-shape is ignored in current estimates.
When looking at the more refined simulators and cost models, there are still
many open questions regarding the effect and cost of running BKZ on q-ary
lattices. For example, experimentally (progressive) BKZ seems to improve the
basis quicker, because essentially it only has to do much work on the smaller
middle part. Secondly, current estimators fail to catch the precise shape of the
reduced basis profile, with relatively large deviations in the last (non-flat) part
of the profile. We expect the influence of these refinements to be minor, but
89
they should still be modeled correctly to obtain precise estimates.
1 Available at https://github.com/malb/lattice-estimator/.
90
Part III
Structured attacks
91
Chapter 7
7.1 Introduction
Ideal lattices are specific structured lattices that arise from ideals in number
fields. Though ideal lattices have only been sparsely used as the basis of a
cryptographic system (e.g. [Gen09]), they are deemed interesting due to the
apparent computational gap they show for classical computers versus quantum
computers. Indeed, there seems to be a discrepancy between classical and quan-
tum computers in how well they can find a short vector in these ideal lattices,
especially those stemming from cyclotomic fields. Where classical computers
can efficiently achieve an approximation factor of only 2n using
√ LLL-reduction,
quantum computers efficiently achieve a much smaller 2O( n) for ideal lattices
in these cyclotomic fields [Cra+16; CDW17; DPW19; CDW21].
As said, this quantum attack applies also to general number fields [PHS19],
though it has several drawbacks compared to cyclotomic fields. It is heuristic
(i.e., not fully proven); it requires a pre-computation of worst-case 2O(n) for a de-
gree n number field (though this only needs to be computed once per field); and
the approximation factor is expressed in slightly more complicated quantities,
mainly involving the discriminant. Depending on the value this complicated
quantity, the gain in shortness quality might be less impressive compared to the
approximation factor of 2n achieved by (classical) LLL-reduction.
This attack on ideal lattices heavily relies on the computation of the (S-)unit
group and the class group of the number field considered. Without the knowl-
edge and means of efficient computation within these groups, the attack would
not proceed (as far as we know now). In the computation of these two groups
is exactly where quantum computers play its key role: classically, no efficient
algorithms are known computing these groups, whereas quantum computers can
compute unit groups and class groups efficiently [Eis+14; BS15; BDF20]. Using
a so-called continuous hidden subgroup framework, a quantum computer allows
for efficiently computing class groups and (S-)unit groups, in the same fashion
as quantum computers can factor large numbers into prime factors.
92
For rank > 1 module lattices, no such or similar attack is known (recall
that ideal lattices can be considered as rank 1 module lattices). Though there
are reductions known: one reduction1 of the shortest vector problem in rank
r > 1 module lattices to the same problem in a lower rank r′ > 1 module lattice
(where r′ < r); and another reduction that reduces the shortest vector problem
in rank 2 module lattices to a closest vector problem in a specific lattice that is
related to the underlying number field [Lee+19; MS19]. These reductions are
the subject of Chapter 8.
Road map
In this chapter, we postpone the quantum algorithm to the last section, for
sake of clarity. In the first few sections we just assume that we can efficiently
compute the (S-)unit group and class group of a number field and compute
generators of principal ideals. In the last section, Section 7.5, we then show
how this is done using a quantum computer. That way, the attack techniques
for the shortest vector problem in ideal lattices are not clouded by the rather
technical details of the quantum algorithm.
Section 7.2 introduces notions which are required for the ideal lattice at-
tack, such as the definitions of the unit group and the class group. The next
section, Section 7.3, explains how to find a mildly short vector in ideal lattices
in cyclotomic fields. In Section 7.4 is shown how this attack is then general-
ized to general number fields. The last section, Section 7.5, treats the quantum
computation of the class group and the (S-)unit group.
7.2 Preliminaries
In this chapter we will consider a number field K with a ring of integers OK .
Recall from Section 3.2 that the Minkowski map K → KR , α 7→ (σ(α))σ makes
ideals I ⊆ OK into lattices of the R-vector space KR . The length of an element
α ∈ K is then
P defined as the length of the vector in the Minkowski space,
i.e., ∥α∥ := σ |σ(α)|2 . We define the following logarithmic map Log : KR →
Log(KR ), which is defined component-wise. For (xσ )σ ∈ KR , we define
Note that via the Minkowski embedding this map is also defined on K, by
Log(α) := (log |σ(α)|)σ ∈ KR . This map has the nice property that it translates
multiplication into addition: Log(αβ) = Log(α) + Log(β). Hence, it maps
multiplicative structures into additive structures, which is very useful in the
multiplicative structure of the unit group.
1 Here with ‘reduction’ is meant a computational reduction; a translation of one problem
into another problem. Famous reductions in complexity theory are the one from SAT to 3SAT
and from 3SAT to the clique problem in graphs.
93
Class groups and (S-)unit groups
Three groups play an important role in the attacks of this chapter: the unit
group, the class group and the S-unit group (which can be considered a gener-
×
alization of the first unit group). The unit group OK is defined by the following
rule
×
OK := {u ∈ OK | there exists v ∈ OK such that uv = 1}.
× ×
The unit group is a multiplicative group: if u, v ∈ OK , then uv ∈ OK . Hence,
under the Log map, this multiplicative group changes into a discrete additive
× ×
group inside the real vector space KR . Hence, Log(OK ), the image of OK under
the map Log, is a lattice, which we call the logarithmic unit lattice.
To define the class group we first need the notion of fractional ideal. A
fractional ideal is an ideal of the shape α · I, where I ⊆ OK is an ideal and
where α ∈ K\{0}. This notion is needed to make ideals invertible, such that
one can speak of the group of all fractional ideals, which we call IK . So, the
fractional ideal group is defined as follows.
Inside this commutative group lives the subgroup of principal fractional ideals,
which are the fractional ideals generated by a single element, i.e., are of the
shape α · OK . Formally,
PrincK := {α · OK | α ∈ K\{0}}.
The class group can then be defined as the quotient group of these two: ClK :=
IK /PrincK . The class group is a finite group [Neu13] and somehow measures
how many ideals can be written as a principal ideal. Most number fields have
a
plarge class group; as a general rule people expect it to be of the order of the
|∆K |, where ∆K is the discriminant of K, due to the Brauer-Siegel theorem.
Before we define the S-unit group, the notion of prime ideals of OK is
required. An ideal p ⊆ OK is called a prime ideal if for all α, β ∈ OK holds
that if αβ ∈ p then α ∈ p or β ∈ p. Prime ideals are a generalization of prime
numbers in Q. The fundamental theorem of arithmetic generalizes to number
fields, with the difference that it involves fractional ideals rather than numbers:
any fractional ideal can be uniquely decomposed (up to order) into a product
of prime ideals. I.e., any fractional ideal αI can be written as
k
Y n
αI = pj p ,
j=1
94
Example 2. The {2}-units in Q are precisely the elements ±2k for k ∈ Z.
√ ×
Example 3. Consider√ k the number field K = Q( 2). √ The units in OK are of
the shape ±(3 + 2√ 2) for some√ k ∈ Z. That 3 + 2 2 is a unit can be seen by
evaluating (3 + 2 2)(−3 + 2 2) = 1. That all units are of that specific shape
follows by Dirichlet’s unit theorem. √ √
Consider the prime ideal√ p7 = (7, 3 + 2) = (3 + √2) of norm
√ 7. Taking S =
×
{p7 }, the S-units of K = Q( 2) are OK,S = {±(3+2 2)k ·(3+ 2)j | k, j ∈ Z}.
In other√words, these S-units consists of products of ordinary units and powers
of (3 + 2), the prime ideal p7 .
Ideal-SVP
We finish the preliminaries with the definition of the Ideal-SVP computational
problem.
Problem 5 (Ideal-SVP). Given an ideal I ⊆ OK of a degree t number field K,
find a non-zero element α ∈ I such that
where γ(t) is some function of the degree t, measuring the shortness of the
vector.
√
One generally considers γ(t) = t to be short and γ(t) = poly(t) to be inter-
esting for (ideal-lattice based2 ) cryptography, whereas γ(t) = 2t is considered
trivial as solutions can then be found by means of LLL-reduction.
95
Reducing the generator, i.e., make the generator α0 of I · J smaller by
×
replacing it by α = η · α0 for a suitable unit η ∈ OK . Also here, due to the
special cyclotomic units, this can be done efficiently. This is explained in
Section 7.3.4
This element α ∈ I · J ⊆ I is then a possible solution for the Ideal-SVP problem
on input I.
Result
√
We will see that this approach yields an approximation factor γ(t) = exp(O( t))
(in the context of Problem 5) within polynomial time
√ using quantum computa-
tion power. I.e., this α ∈ I satisfies ∥α∥ ≤ exp(O( t)) · Vol(I)1/t .
√
Figure 7.1: In arbitrary lattices, using
√ BKZ, it takes time exp(Θ( t)) to get a
‘mildly’ short vector of length exp(Θ( t)) (left image). In the case of cyclotomic
ideal lattices, such ‘mildly’ short vectors can be found in quantum polynomial
time (right image). Picture from [CDW21].
ClK = IK /PrincK .
This is a finite group, and we denote the ideal class of an ideal I by [I] ∈ ClK .
The close principal multiple problem then translates into: find an ideal J ⊆ OK
96
that is small (i.e., has a small norm) and satisfies [J] = [I]−1 . Indeed, then
[IJ] = [I][J] = [I][I]−1 = 1, which means that IJ ∈ PrincK is principal.
A reasonable guess would be that this small J consists of small multiples
of relatively small prime ideals. So, to tackle this problem, one then often
considers a set of (small) prime ideals S = {p1 , . . . , pk }, and defines the following
surjective4 group homomorphism on the free commutative group ZS to ClK .
Yk
n
ϕ : ZS → ClK , (n1 , . . . , nk ) 7→ pj j .
j=1
Then, as [I]−1 ∈ ClK , one uses a quantum algorithm, namely the class group
discrete logarithm algorithm (see Section 7.5), to find a (not necessarily small)
inverse image of [I]−1 under ϕ, i.e., (n1 , . . . , nk ) ∈ ZS such that
k
Y n
ϕ(n1 , . . . , nk ) = pj = [I]−1 .
j
j=1
Qk n
So, then we could put J = j=1 pj j , but there are two problems: (1) The
exponents nj could be large, so that J itself is large as well and (2) the exponents
nj could be negative, which makes J not an integral ideal.
The trick is to circumvent this by shifting (n1 , . . . , nk ) by elements of the
kernel lattice of ϕ, i.e.,
k
Y
m
Λ0 = (m1 , . . . , mk ) ∈ ZS [ pj j ] = 1 = ker ϕ.
j=1
In the case of cyclotomic fields, this kernel lattice has small so-called Stickel-
berger relations [CDW17; CDW21], to efficiently diminish the sizes of (n1 , . . . , nk )
Qk n
and make them positive, in order to get a small J = j=1 pj j that satisfies I · J
being principal.
is surjective whenever S consists of the prime ideals with norm up to 12 log(|∆K |)2 .
97
7.3.4 Reducing the generator
The generator α0 of the principal ideal I · J found by the quantum algorithm is
generally not short. In order to find a short generator of I · J, we attempt to
×
multiply α0 by a suitable unit η ∈ OK . It is a fact that α = η · α0 generates
I · J if and only if α0 does.
⋆
So, the remaining task is: Find η ∈ OK such that ∥η · α0 ∥ is minimal. In
the literature (e.g., [Cra+16]), one now resorts to taking logarithms to translate
this multiplicative problem into an additive problem. This compound logarithm,
denoted Log, happens component-wise after the Minkowski embedding.
98
7.4 A Quantum Attack on Ideal Lattices in Gen-
eral Number Fields
7.4.1 Introduction
A natural question about the quantum attack on ideal lattices in cyclotomic
fields would be: Generalizes this attack to other number fields?. The answer
turns out to be yes heuristically [PHS19], but at the expense of a heavy pre-
computation, that requires time and space exponential in the number field de-
gree. Though, this pre-computation only needs to be done once for a fixed
number field. In other words, with this pre-computed data associated with the
number field K you can attack all ideal lattices associated with the field K.
As the underlying number field in a standardized cryptographic protocol is
mostly assumed to be fixed, this ‘single pre-computation per field’ scenario is
relevant indeed. Fortunately, the third round lattice-based NIST candidates are
based on (rank > 1) module lattices rather than ideal lattices, so this attack
seems not to apply to these candidates (as far as we know now). A possible
generalization of this attack to (rank > 1) module lattices or even any attack on
module lattices that is strictly better than a ‘generic attack’ (as in Chapter 5)
is not found yet (see Chapter 8).
99
and cyclotomic unit properties that the cyclotomic fields have. These structures
in the class group and unit group of cyclotomic fields allow to make the close
principal multiple step and the generator
√ reduction step efficient (and successful
up to the approximation factor exp( n)).
Start with defining S = {p1 , . . . , pk } to be the set of all prime ideals with
norm up to the bound6 B = 12 log(|∆K |)2 .
Q
Use a quantum computer to find an α0 ∈ I such that (α0 ) = I · p∈S pnp ,
that is, solve the discrete logarithm in the class group.
×
Attempt to minimize ∥α0 · η∥ over η ∈ OK,S (the S-units),Qgiven the
constraint that all mp ≥ 0 in the decomposition (α0 · η) = I · p∈S pmp .
This is done with the pre-computed data on the Log-S-unit lattice.
Output α = α0 · η.
× Q
Example
Q 4. Suppose η ∈ OK,S has decomposition (η) = p∈S pkp , and (α0 ) =
np
I · p∈S p , then
Y
(α0 · η) = I · pnp +kp .
p∈S
100
×
So, essentially, the task is to find Log(η) ∈ Log(OK,S ) that is the closest to
Log(α0 ). But, in the S-units we have the additional constraint that α0 · η is
required to be an element of the input ideal I, i.e., the decomposition
Y
(α0 · η) = I · pmp
p∈S
×
Properties of a β-close vector Suppose we found a η ∈ OK,S that solves
×
this β-Closest Vector problem; i.e., η ∈ OK,S satisfies
∥ Log(S) (α0 )−(0, (β)p )+Log(S) (η)∥∞ = ∥(−c Log(α0 η)|H , (np −β+vp (η))p )∥∞ ≤ β.
Then surely, for all p ∈ S, |np − β + vp (η)| ≤ β, i.e., 0 ≤ np + vp (η) ≤ 2β, i.e.,
the decomposition of Y
(α0 · η) = I · pnp +vp (η) (7.1)
p∈S
101
only has positive exponents np + vp (η) in the primes. So, phrasing the problem
as a ‘drifted’ CVP problem indeed yields sound solutions.
since 0 ≤ np + vp (η) ≤ 2β, and the norm of the largest prime in S is around
poly(log(|∆K |)).
Continuing with the left expression, we have ∥c Log(α0 η)|H ∥∞ ≤ β, where
3/2
c = t|S| is the ‘correction factor’. Therefore,
√ √
∥ Log(α0 η)|H ∥2 ≤ t∥ Log(α0 η)|H ∥∞ ≤ t · β/c = β · |S|/t.
Using quantum computation power, one can diminish the size of |S| to
log |∆K | [PHS19, Lemma 2.7]; writing β = (log |∆K |)α , we get the following
result. Here Õ is similar to the O-notation, except that in the Õ, polylogarith-
mic factors are suppressed.
102
7.4.6 Complexity and quality of the output
CVP with pre-processing
Laarhoven [Laa16b, Corollaries 2 and 3] proved the following statement heuris-
tically. Given α ∈ [0, 1/2] and given t ∈ span(L) where L is a d-dimensional
lattice, there exists an algorithm that computes a vector v ∈ L with
if we are able to solve log |∆K |α = tα -CVP∞ in the log-S-unit lattice7 . The
same holds of course for number field families that have log |∆K | ≤ O(t).
Combining this with Laarhoven’s result, yields
√
Summary 26 (Quantum computers solve exp( n)-idealSVP in gen-
eral small-discriminatn fields, assuming precomputation). Assuming
quantum computation power, with a pre-processing stage of time and mem-
ory exp(O(t)), one can solve exp(Õ(tα ))-approximate IdealSVP in time
exp(Õ(n1−2α )) in degree t number fields K satisfying log |∆K | = O(t), see
Figure 7.2.
103
Figure 7.2: Left: The usual, unstructured time/approximation-factor trade-offs
for Approximated SVP in number fields of degree n. On the right the trade-
offs of PHS for number fields with log |∆K | = Õ(n), taking into account a
pre-processing of exp(O(n)). Image from [PHS19].
Figure 7.3: On the left, the time/approximation-factor trade-offs for the first
structured attack on prime power cyclotomic fields of degree n, described in
Section 7.3 (see also Figure 7.1). On the right, the trade-offs of the PHS attack
with the same fields. Image from [PHS19].
104
7.5.2 The Hidden Subgroup Problem
The core of the quantum algorithms needed for the attacks in this chapter is a
hidden subgroup algorithm which solves the so-called hidden subgroup problem,
that can be superficially described as follows.
Definition 19 (Hidden subgroup problem). Given a group of the shape Zk ×Rn
and a function8 f : Zk × Rn → CN that satisfies f (x + t) = f (x) for all t ∈ T
and x ∈ Zk × Rn , where T ⊆ Zk × Rn is a ‘hidden’ subgroup of G. Additionally,
the function f is required to be smooth and not too constant9 .
The task is to find (approximated) generators and relations of the group T .
In this survey we assume that a quantum computer, given such adequate
function f , is able to find the subgroup T ⊆ Zk × Rn . This function f is
referred to as an oracle function, which essentially captures information about
the subgroup T .
Ideal lattices
For this oracle function we need the space of (fractional) ideals to be more
‘continuous’, which we call the group of ideal lattices of K, denoted IdLatK .
Such a (continuous) ideal lattice is of the shape x · I, where I ⊆ OK is an ideal
and where x = (xσ )σ ∈ KR . With x · I we mean the following lattice:
{(xσ σ(α))σ ∈ KR | α ∈ I}.
We can see that IdLatK forms a group and the unit ideal lattice is OK . The
representation x · I of the ideal lattice is not unique, there are many other y · J
such that x · I = y · J. This will play a role for the later oracle function.
Another important part of the oracle function is the exponential function
that maps H to KR . We already defined the Logarithmic map Log : KR →
Log(KR ) ⊇ H in Section 7.2, where
X
H = {(hσ )σ ∈ Log(KR ) | hσ = 0}.
σ
105
The lattice quantum superposition
The most important part of the oracle function f will be the encoding of an ideal
lattice x · I ⊆ KR (with x ∈ KR , and where the inclusion is via the Minkowski
embedding) into a quantum state. This is done by a Gaussian superposition,
which sends the ideal lattice x · I ⊆ KR to the quantum state10
X 2
|xI⟩ := e−s∥v∥ · |v⟩, (7.4)
v∈x·I
in the front as to make the total state having norm 1. In this survey, for sake of clarity and
conciseness, we omit these constants.
106
Let us write a = (α) for some element α ∈ a. Such an α necessarily exists, we
just do not know this element yet. We have, by Equation (7.6) and the fact that
the lattice quantum superposition is the same, that the following ideal lattices
are the same.
j
(hσ )σ = − · log |N (α)| − Log(αj · η)
t
So, the hidden subgroup T ⊆ Z × H of f must consists of (j, h) with h ∈ H of
above shape, i.e.,
j ×
T = j, − · log |N (α)| − Log(αj · η) j ∈ Z, η ∈ OK
t
If we just know two elements (j, h), (j ′ , h′ ) ∈ T for which j and j ′ are coprime,
one can find (by the extended euclidean algorithm), a, a′ ∈ Z such that aj +
a′ j ′ = 1. In that case one necessarily obtains an element in T of the shape
1
(1, − · log |N (α)| − Log(α · η),
t
×
for some η ∈ OK . Since we can compute log |N (α)| = log(N (a)), one can then
recover (an approximation of) Log(α · η). From this logarithmic image, one is
(with a good enough approximation) able to recover α · η, which is a generator
of a.
Remark 17. Note that no guarantee is given on the length of this generator;
the output of the quantum algorithm is even given in logarithmic coordinates,
which might yield generator α · η which is even too large to write down.
So, the next step of the total algorithm (namely, to reduce this element mod-
ulo the logarithmic unit lattice) is of importance to actually obtain a mildly short
generator of a.
107
Again, we construct an oracle function, now defined on Z × Zk × H, where
H is again the hyperplane where the Logarithmic units live in.
The oracle function is defined as follows
Qk n
from which you can conclude that a · j=1 pj j is principal and that [a]−1 =
Qk n
[ j=1 pj j ]. Moreover, by computing N 1/t · Exp(h) ∈ KR sufficiently precise,
one can then obtain an element α ∈ K such that α = N 1/t · Exp(h). By these
means we then found
Yk
n
a· pj j = (α),
j=1
Qk n
i.e.m α is a generator of the ideal a · j=1 pj j .
108
Chapter 8
8.1 Introduction
8.1.1 Attacks
Module lattices arise in ModuleLWE, RingLWE and NTRU, and are mostly
of rank 2 or higher. There are no attacks known on module lattices that are
better than the attacks on generic lattices. In other words, module lattices, from
a current-time algorithmic perspective, seem to be as hard as generic lattices
for the time being. This is the main reason why lattice-based cryptography is
mostly based on these lattices: using them is more efficient, and (as far as we
know) there is no increase in security risks.
As far as we know, the quantum attack on ideal lattices (rank 1 module
lattices) described in the previous sections does not generalize to higher rank
module lattices.
Summary 28 (Attacks on Module lattices). There are no attacks known
for (rank > 1) module lattices that are better than the ‘generic attacks’ that
apply to general lattices. In other words, as far as we know now, there is no
algorithm (better than generic ones) that exploits the structure of these module
lattices.
8.1.2 Reductions
There are no known module-lattice specific attack, but there is a certain reduc-
tion, independently found by Lee–Pellet-Mary–Stehlé–Wallet and Mukherjee–
Stephens-Davidowitz [Lee+19; MS19]. In this reduction, SVP in module lattices
of higher rank r′ are reduced to SVP in module lattices of rank 2, which is highly
inspired on the LLL-algorithm and does in essence generalize it for number fields.
For this reduction there is only a ‘small’ blow up (dominantly depending expo-
nentially on the module rank r′ ) in the approximation factor. As the rank for
module-lattice based cryptography are generally quite small (most of them not
109
larger than 5), this suggests that the hardness of these cryptographic schemes
relies on the hardness of finding short vectors in rank 2 module lattices.
As far as we know now, no reduction is known from rank 2 module lattices to
rank 1 module lattices (also known as ideal lattices), so it is believed that there
is a significant hardness gap between rank 1 module lattices (ideal lattices) and
rank > 1 module lattices.
Though there is no reduction for SVP on rank 2 module lattices to rank 1
module lattices, in the work [Lee+19] there is a (quantum) reduction from SVP
on rank 2 module lattices (of a fixed number field) to (exact) CVP in a specific
log-S-unit alike lattice; this reduction has similarities to the reduction in the
quantum attack on ideal lattices in general number fields.
110
The left column of B · U is then
√ √ √ √ √
21 + 10√ 2 √ 2+3 2 21 + 10√ 2 6 √2 + 18 3 + 4 √2
−3 2 √ = − = .
8 + 12 2 1+ 2 8 + 12 2 3 2+6 2+9 2
Remark 19. Module lattices with bases B ∈ Rn×n are called free modules. To
simplify matters, we will focus on these particular module lattices. It is sufficient
for grasping the idea of the reduction of [Lee+19].
There are also module lattices that are not free modules – they have a pseudo-
basis instead of an ordinary basis, as explained in Section 3.4; these module
lattices are omitted in this discussion for now. See for example [Coh12] for
more information on pseudo-bases.
8.2.3 LLL-revisited
In Sections 2.4 to 2.6, the LLL algorithm and its ingredients were explained.
This LLL algorithm is a basis reduction algorithm for bases2 in Zn×n ; almost
all such basis reduction algorithms rely on an exact-SVP oracle in a lower di-
mension. For LLL, this exact-SVP oracle is called many times in the dimension
two projected lattice of the lattice of the input basis3 .
The efficiency of LLL is partially due to the fact that we have a polynomial
algorithm to solve exact-SVP in rank-two lattices in R2×2 ; this algorithm is
known as Lagrange reduction and is in essence nothing else than the extended
Euclidean division algorithm.
The full reason why LLL is efficient is also due to another important proce-
dure in the LLL algorithm, known as size reduction. This is to avoid so-called
‘coefficient explosion’; in other words, size reduction keeps the coefficients man-
ageably small during the LLL reduction computation.
2 We assume Z as a base ring, as bases with coefficients in Q can always be scaled up to be
in Z.
3 For BKZ of block size β, the reduction algorithm relies instead of solving exact-SVP in
111
Summary 29 (Ingredients of the LLL algorithm). The LLL algorithm
consists of three main components, with their own purpose.
(i) A rank 2 exact-SVP oracle. In the ‘ordinary’ Z-case, this can be done
efficiently by Lagrange reduction.
(ii) Size reduction. This keeps the coefficient manageably small during the
computation.
(iii) Projection. This allows to project the lattice onto a two-dimensional lattice
and use the rank 2 exact SVP oracle.
The ‘outer loop’ of LLL searches for projected 2-dimensional blocks of the ba-
sis that are not Lagrange reduced; and Lagrange-reduces them; this is always
followed by a ‘size reduction’ step.
(ii) Size reduction and (iii) projection The notion of size reduction and
projection uses the fact that we can Gram-Schmidt orthogonalize a basis, which
needs an adequate norm notion on the column vectors of a module basis.
So, suppose B = (b1 , . . . , br′ ) is a module lattice basis. In other words,
′
each bj ∈ Rr is a column vectors consisting of r′ entries from the number ring
R. Then are essentially two ‘size notions’ on a vector; one is the (Minkowski)
geometric norm, the other is the algebraic norm.
112
of such an element α ∈ R is then defined as the geometric norm of the vector
(σ(α))σ . Concretely, X
∥α∥2 = |σ(α)|2 ,
σ:K→C
′
The Minkowski geometric norm on a R-vector b = (β1 , . . . , βr′ )T ∈ Rr is
then defined by the following rule
′ ′
r
X X r
X
∥b∥2K = 2
|σ(βj )| = ∥βj ∥2 .
j=1 σ:K→C j=1
which again defines an inner product in the following sense, for c = (γ1 , . . . , γr′ )T ∈
′
Rr :
Xr′
⟨b, c⟩K := σ(βj )σ(γj ).
j=1
Algebraic norm Apart from the geometric norm there is also an algebraic
norm defined on elements α ∈ R as follows:
N (α) = |R/(α)|,
where |R/(α)| is the number of elements in the quotient ring R/(α). This
′
algebraic norm can then be generalized for R-vectors b = (β1 , . . . , βr′ )T ∈ Rr
by taking the algebraic norm of the norm ∥b∥K ∈ KR .
N (b) = N (∥b∥K ).
One can show that this norm, in some way, has a reasonably interplay with the
inner product ⟨·, ·⟩K .
113
The ‘loop’ part In the loop part, the LLL algorithm projects parts of the
module basis to a rank-2 basis, and checks whether this rank 2 basis is well-
reduced enough. In the ‘ordinary’ LLL algorithm this check is carried out by
checking the Lovász condition. For the module case this not fundamentally
different.
Summary 30 (LLL over modules). The Minkowski geometric norm in com-
bination with the algebraic norm allows to define LLL reduction of module bases
in a sound way.
We have [Lee+19, Theorem 3.9]: γ-SVP in rank 2 modules (over K) allows to
′
solve (2γ|∆K |1/t )2r −1 -SVP in rank r′ modules, where t = [K : Q] and ∆K is
the discriminant of K.
This logarithmic map is then an ‘extension’ of the map Log(S) , used for the
logarithmic S-units (where S is a set of prime ideals). Recall that Log(S) :
×
OK,S → H × ZS sends α 7−→ ((log |σ(α)|)σ , (vp (α))p∈S ), where σ ranges over
the embeddings σ : K → C. In this extended Logarithm, the log |σ(α)| is
replaced by the logarithm of σ(α) without the absolute values, i.e., the complex
logarithm, which lands into (R + iR)/(2πiZ). This yields the map
×
Log : OK,S → H × ZS ,
Q P
where H := {(xσ )σ ∈ σ (R + iR)/(2πiZ) | σ xσ = 0}.
×
Essentially, this rephrases into a CVP-problem where the lattice is Log(OK,S )⊆
S
H ×Z , and where the target is some adequate definition of Log(β/α). This def-
inition will only consists of a H-part, namely, (log(σ(β/α)))σ ∈ H; the ZS -part
will be zero.
By heuristic reasoning and technical arguments, one can show that solving
CVP in this sort-of log-S-unit lattice allows to solve exact SVP in rank 2 module
lattices. Note however, that translating the Logarithm back into the original
114
space requires taking exponents. So, in order to have a good SVP result, the
CVP-distance in the log space needs to be extremely small, essentially optimal.
The quantum part of the reduction essentially comes down to computing class
groups and unit groups and logarithms therein.
For now, there is no algorithm yet that allows for computing Closest Vectors
in this Logarithmic S-unit like lattices efficiently; which makes this reduction
essentially a theoretical one. The running time for our current CVP algorithms
are too large for this reduction to be useful in terms of finding short vectors in
module-lattices.
Summary 31 (Rank 2 Module-SVP reduces to CVP in a K-specific
lattice). By defining an adequate logarithmic function Log on the S-units, one
can translate SVP in rank 2 module lattices over K into a CVP instance (with
very small approximation factor) in a logarithmic S-unit like lattice, fixed for
K. No algorithm exists yet that allows to solve such CVP instances in an
efficient enough way in order for this module reduction to beat the generic
lattice algorithms for SVP.
8.3 Discussion
Computational gap between rank 2 and rank 1 module lat-
tices
For about a decade, the general consensus among lattice-based cryptographers
is that there is a computational barrier between SVP in rank 1 module lattices
(ideal lattices) and rank ≥ 2 module lattices. The belief in this computational
gap is partially caused by the works described in this chapter: Ideal lattices
are somehow ‘weaker’ than generic lattices4 due to the quantum attack, but for
module lattices no such attack is known. The reduction described in this section
from high-rank module lattices to rank 2 module lattices suggests that there is
indeed ‘something happening’ in between rank 1 and rank 2.
4 But, for small crypto-relevant approximation factors, we still have no algorithm better
115
Bibliography
[ABD16] Martin Albrecht, Shi Bai, and Léo Ducas. “A subfield lattice at-
tack on overstretched NTRU assumptions”. In: Annual Interna-
tional Cryptology Conference. Springer. 2016, pp. 153–178 (cit. on
pp. 75, 89).
[AFG13] Martin R Albrecht, Robert Fitzpatrick, and Florian Göpfert. “On
the efficacy of solving LWE by reduction to unique-SVP”. In: In-
ternational Conference on Information Security and Cryptology.
Springer. 2013, pp. 293–310 (cit. on p. 68).
[AG11] Sanjeev Arora and Rong Ge. “New algorithms for learning in pres-
ence of errors”. In: International Colloquium on Automata, Lan-
guages, and Programming. Springer. 2011, pp. 403–415 (cit. on
p. 76).
[Agg+20] Divesh Aggarwal et al. “Slide reduction, revisited—filling the gaps
in SVP approximation”. In: Annual International Cryptology Con-
ference. Springer. 2020, pp. 274–295 (cit. on p. 81).
[Alb+14] Martin Albrecht et al. “Algebraic algorithms for LWE problems”.
In: (2014) (cit. on p. 77).
[Alb+18] Martin R. Albrecht et al. “Estimate All the {LWE, NTRU} Schemes!”
In: Security and Cryptography for Networks. Ed. by Dario Catalano
and Roberto De Prisco. Cham: Springer International Publishing,
2018, pp. 351–367. isbn: 978-3-319-98113-0 (cit. on pp. 38, 48, 52,
84, 90).
[Alb+19] Martin R Albrecht et al. “The general sieve kernel and new records
in lattice reduction”. In: Annual International Conference on the
Theory and Applications of Cryptographic Techniques. Springer.
2019, pp. 717–746 (cit. on p. 79).
[Alb+20a] Martin R Albrecht et al. “Estimating quantum speedups for lattice
sieves”. In: International Conference on the Theory and Application
of Cryptology and Information Security. Springer. 2020, pp. 583–
613 (cit. on pp. 83, 84, 86, 87, 90).
116
[Alb+20b] Martin R Albrecht et al. “Faster Enumeration-based Lattice Reduc-
tion: Root Hermite Factor k 1/(2k) in Time k k/8+o(k) ”. In: Annual
International Cryptology Conference. Springer. 2020, pp. 186–212
(cit. on p. 80).
[Alb+21] Martin R Albrecht et al. “Lattice reduction with approximate enu-
meration oracles”. In: Annual International Cryptology Conference.
Springer. 2021, pp. 732–759 (cit. on pp. 81, 89).
[Alb17] Martin R Albrecht. “On dual lattice attacks against small-secret
LWE and parameter choices in HElib and SEAL”. In: Annual In-
ternational Conference on the Theory and Applications of Crypto-
graphic Techniques. Springer. 2017, pp. 103–129 (cit. on p. 70).
[Alk+16] Erdem Alkim et al. “Post-quantum Key {Exchange—A} New Hope”.
In: 25th USENIX Security Symposium (USENIX Security 16). 2016,
pp. 327–343 (cit. on pp. 68, 70).
[Aon+16] Yoshinori Aono et al. “Improved progressive BKZ algorithms and
their precise cost estimation by sharp simulator”. In: Annual In-
ternational Conference on the Theory and Applications of Crypto-
graphic Techniques. Springer. 2016, pp. 789–819 (cit. on p. 81).
[App+09] Benny Applebaum et al. “Fast Cryptographic Primitives and Circular-
Secure Encryption Based on Hard Learning Problems”. In: CRYPTO.
2009, pp. 595–618 (cit. on p. 45).
[APS15] Martin R Albrecht, Rachel Player, and Sam Scott. “On the con-
crete hardness of learning with errors”. In: Journal of Mathematical
Cryptology 9.3 (2015), pp. 169–203 (cit. on p. 90).
[BDF20] Koen de Boer, Léo Ducas, and Serge Fehr. “On the Quantum
Complexity of the Continuous Hidden Subgroup Problem”. In: EU-
ROCRYPT. Springer International Publishing, 2020, pp. 341–370.
isbn: 978-3-030-45724-2 (cit. on pp. 92, 105).
[Bec+16] Anja Becker et al. “New directions in nearest neighbor search-
ing with applications to lattice sieving”. In: Proceedings of the
twenty-seventh annual ACM-SIAM symposium on Discrete algo-
rithms. SIAM. 2016, pp. 10–24 (cit. on p. 82).
[Ber+18] Daniel J. Bernstein et al. “NTRU Prime: Reducing Attack Surface
at Low Cost”. In: Selected Areas in Cryptography – SAC 2017. Ed.
by Carlisle Adams and Jan Camenisch. Cham: Springer Interna-
tional Publishing, 2018, pp. 235–260. isbn: 978-3-319-72565-9 (cit.
on p. 56).
[BGJ15] Anja Becker, Nicolas Gama, and Antoine Joux. “Speeding-up lat-
tice sieving without increasing the memory, using sub-quadratic
nearest neighbor search.” In: IACR Cryptol. ePrint Arch. 2015
(2015), p. 522 (cit. on p. 82).
117
[BL16] Anja Becker and Thijs Laarhoven. “Efficient (ideal) lattice sieving
using cross-polytope LSH”. In: International Conference on Cryp-
tology in Africa. Springer. 2016, pp. 3–23 (cit. on p. 82).
[BLS16] Shi Bai, Thijs Laarhoven, and Damien Stehlé. “Tuple lattice siev-
ing”. In: LMS Journal of Computation and Mathematics 19.A (2016),
pp. 146–162 (cit. on p. 82).
[Bos+18] Joppe Bos et al. “CRYSTALS - Kyber: A CCA-Secure Module-
Lattice-Based KEM”. In: 2018 IEEE European Symposium on Se-
curity and Privacy (EuroS & P). 2018, pp. 353–367. doi: 10.1109/
EuroSP.2018.00032 (cit. on p. 38).
[BS15] J.-F. Biasse and F. Song. A note on the quantum attacks against
schemes relying on the hardness of finding a short generator of an
ideal in Q(ζ2n ). Tech. rep. 2015-12. Revision of September 28th
2015. The University of Waterloo, 2015 (cit. on p. 92).
[BSW18] Shi Bai, Damien Stehlé, and Weiqiang Wen. “Measuring, simulat-
ing and exploiting the head concavity phenomenon in BKZ”. In:
Springer, 2018, pp. 369–404 (cit. on p. 88).
[CDW17] Ronald Cramer, Léo Ducas, and Benjamin Wesolowski. “Short Stick-
elberger class relations and application to Ideal-SVP”. In: EURO-
CRYPT. Springer. 2017, pp. 324–348 (cit. on pp. 37, 92, 97, 99).
[CDW21] Ronald Cramer, Léo Ducas, and Benjamin Wesolowski. “Mildly
Short Vectors in Cyclotomic Ideal Lattices in Quantum Polynomial
Time”. In: J. ACM 68.2 (Jan. 2021). issn: 0004-5411. doi: 10 .
1145/3431725. url: https://doi.org/10.1145/3431725 (cit. on
pp. 92, 96–98, 100).
[CGS14] Peter Campbell, Michael Groves, and Dan Shepherd. Soliloquy: A
Cautionary Tale. ETSI 2nd Quantum-Safe Crypto Workshop. 2014
(cit. on p. 37).
[CJL16] Jung Hee Cheon, Jinhyuck Jeong, and Changmin Lee. “An algo-
rithm for NTRU problems and cryptanalysis of the GGH multilin-
ear map without a low-level encoding of zero”. In: LMS Journal of
Computation and Mathematics 19.A (2016), pp. 255–266 (cit. on
p. 75).
[CL21] André Chailloux and Johanna Loyer. “Lattice sieving via quantum
random walks”. In: International Conference on the Theory and
Application of Cryptology and Information Security. Springer. 2021,
pp. 63–91 (cit. on p. 83).
[CN11] Yuanmi Chen and Phong Q. Nguyen. “BKZ 2.0: Better Lattice Se-
curity Estimates”. In: ASIACRYPT. 2011, pp. 1–20 (cit. on p. 88).
[Coh12] Henri Cohen. Advanced topics in computational number theory.
Vol. 193. Springer Science & Business Media, 2012 (cit. on pp. 39,
111).
118
[Cra+16] Ronald Cramer et al. “Recovering short generators of principal ide-
als in cyclotomic rings”. In: EUROCRYPT. Springer. 2016, pp. 559–
585 (cit. on pp. 37, 92, 98–100).
[Dac+20] Dana Dachman-Soled et al. “LWE with side information: attacks
and concrete security estimation”. In: Annual International Cryp-
tology Conference. Springer. 2020, pp. 329–358 (cit. on pp. 68, 69).
[DP23a] Léo Ducas and Ludo N Pulles. “Accurate score prediction for dual-
sieve attacks”. In: Cryptology ePrint Archive (2023) (cit. on p. 71).
[DP23b] Léo Ducas and Ludo N Pulles. “Does the dual-sieve attack on learn-
ing with errors even work?” In: Annual International Cryptology
Conference. Springer. 2023, pp. 37–69 (cit. on p. 71).
[DPW19] Léo Ducas, Maxime Plançon, and Benjamin Wesolowski. “On the
Shortness of Vectors to be found by the Ideal-SVP Quantum Algo-
rithm”. In: CRYPTO. Springer. 2019, pp. 322–351 (cit. on p. 92).
[DSW21] Léo Ducas, Marc Stevens, and Wessel van Woerden. “Advanced
lattice sieving on GPUs, with tensor cores”. In: Annual Interna-
tional Conference on the Theory and Applications of Cryptographic
Techniques. Springer. 2021, pp. 249–279 (cit. on pp. 84, 86, 87).
[Duc18] Léo Ducas. “Shortest vector from lattice sieving: a few dimensions
for free”. In: Annual International Conference on the Theory and
Applications of Cryptographic Techniques. Springer. 2018, pp. 125–
145 (cit. on p. 83).
[Duc22] Léo Ducas. “Estimating the Hidden Overheads in the BDGL Lat-
tice Sieving Algorithm”. In: International Conference on Post-Quantum
Cryptography. Springer. 2022, pp. 480–497 (cit. on pp. 85, 87).
[DW21] Léo Ducas and Wessel van Woerden. “NTRU Fatigue: How Stretched
is Overstretched?” In: International Conference on the Theory and
Application of Cryptology and Information Security. Springer. 2021,
pp. 3–32 (cit. on pp. 76, 89).
[Eis+14] Kirsten Eisenträger et al. “A quantum algorithm for computing the
unit group of an arbitrary degree number field”. In: Proceedings of
the 46th Annual ACM Symposium on Theory of Computing. ACM.
2014, pp. 293–302 (cit. on pp. 37, 92, 99, 105).
[EJK20] Thomas Espitau, Antoine Joux, and Natalia Kharchenko. “On a
dual/hybrid approach to small secret LWE”. In: International Con-
ference on Cryptology in India. Springer. 2020, pp. 440–462 (cit. on
p. 70).
[FPS22] Joël Felderhoff, Alice Pellet-Mary, and Damien Stehlé. “On Module
Unique-SVP and NTRU”. In: Springer-Verlag, 2022 (cit. on pp. 37,
59).
[Gen09] Craig Gentry. “A fully homomorphic encryption scheme”. crypto.
stanford.edu/craig. PhD thesis. Stanford University, 2009 (cit.
on p. 92).
119
[GJ21] Qian Guo and Thomas Johansson. “Faster dual lattice attacks for
solving LWE with applications to CRYSTALS”. In: International
Conference on the Theory and Application of Cryptology and In-
formation Security. Springer. 2021, pp. 33–62 (cit. on pp. 70, 75,
89).
[GMW21] Qian Guo, Erik Mårtensson, and Paul Stankovski Wagner. “On the
sample complexity of solving LWE using BKW-style algorithms”.
In: 2021 IEEE International Symposium on Information Theory
(ISIT). IEEE. 2021, pp. 2405–2410 (cit. on p. 72).
[GN08] Nicolas Gama and Phong Q Nguyen. “Predicting lattice reduction”.
In: Annual International Conference on the Theory and Applica-
tions of Cryptographic Techniques. Springer. 2008, pp. 31–51 (cit.
on pp. 67, 68).
[GNR10] Nicolas Gama, Phong Q. Nguyen, and Oded Regev. “Lattice Enu-
meration Using Extreme Pruning”. In: EUROCRYPT. 2010, pp. 257–
278 (cit. on p. 81).
[Gu19] Chunsheng Gu. “Integer Version of Ring-LWE and Its Applica-
tions”. In: Security and Privacy in Social Networks and Big Data.
Ed. by Weizhi Meng and Steven Furnell. Singapore: Springer Sin-
gapore, 2019, pp. 110–122. isbn: 978-981-15-0758-8 (cit. on p. 46).
[Hei21] Max Heiser. “Improved Quantum Hypercone Locality Sensitive Fil-
tering in Lattice Sieving”. In: Cryptology ePrint Archive (2021) (cit.
on p. 83).
[HK17] Gottfried Herold and Elena Kirshanova. “Improved algorithms for
the approximate k-list problem in Euclidean norm”. In: IACR In-
ternational Workshop on Public Key Cryptography. Springer. 2017,
pp. 16–40 (cit. on p. 82).
[HKL18] Gottfried Herold, Elena Kirshanova, and Thijs Laarhoven. “Speed-
ups and time–memory trade-offs for tuple lattice sieving”. In: IACR
International Workshop on Public Key Cryptography. Springer. 2018,
pp. 407–436 (cit. on p. 82).
[HPS11] Guillaume Hanrot, Xavier Pujol, and Damien Stehlé. “Analyzing
blockwise lattice algorithms using dynamical systems”. In: Springer,
2011, pp. 447–464 (cit. on p. 29).
[HPS98] Jeffrey Hoffstein, Jill Pipher, and Joseph H. Silverman. “NTRU:
A Ring-Based Public Key Cryptosystem”. In: ANTS. Ed. by Joe
Buhler. Vol. 1423. Lecture Notes in Computer Science. Springer,
1998, pp. 267–288. isbn: 3-540-64657-4 (cit. on pp. 41, 56, 59).
[HR17] Michael Hamburg and Arnab Roy. “Integer Module LWE key ex-
change and encryption: The three bears (draft)”. In: 2017 (cit. on
p. 46).
120
[HS07] Guillaume Hanrot and Damien Stehlé. “Improved analysis of Kan-
nan’s shortest lattice vector algorithm”. In: Annual international
cryptology conference. Springer. 2007, pp. 170–186 (cit. on p. 121).
[HS08] Guillaume Hanrot and Damien Stehlé. “Worst-case Hermite-Korkine-
Zolotarev reduced lattice bases”. In: arXiv preprint arXiv:0801.3331
(2008) (cit. on p. 121).
[HS10] Guillaume Hanrot and Damien Stehlé. “A complete worst-case anal-
ysis of Kannan’s shortest lattice vector algorithm”. In: Manuscript
(2010). Full version of [HS07; HS08], pp. 1–34 (cit. on p. 80).
[KF17] Paul Kirchner and Pierre-Alain Fouque. “Revisiting lattice attacks
on overstretched NTRU parameters”. In: Annual International Con-
ference on the Theory and Applications of Cryptographic Tech-
niques. Springer. 2017, pp. 3–26 (cit. on p. 89).
[KL21] Elena Kirshanova and Thijs Laarhoven. “Lower bounds on lattice
sieving and information set decoding”. In: Annual International
Cryptology Conference. Springer. 2021, pp. 791–820 (cit. on p. 85).
[Laa15] Thijs Laarhoven. “Sieving for shortest vectors in lattices using an-
gular locality-sensitive hashing”. In: Annual Cryptology Conference.
Springer. 2015, pp. 3–22 (cit. on p. 82).
[Laa16a] Thijs Laarhoven. “Search problems in cryptography: from finger-
printing to lattice sieving”. English. PhD Thesis. PhD thesis. Math-
ematics and Computer Science, Feb. 2016. isbn: 978-90-386-4021-1
(cit. on p. 83).
[Laa16b] Thijs Laarhoven. “Sieving for closest lattice vectors (with prepro-
cessing)”. In: CoRR abs/1607.04789 (2016). url: http://arxiv.
org/abs/1607.04789 (cit. on pp. 99, 103).
[Lee+19] Changmin Lee et al. “An LLL algorithm for module lattices”. In:
ASIACRYPT. Springer. 2019, pp. 59–90 (cit. on pp. 37, 93, 109–
111, 113, 114).
[LLL82] Arjen K. Lenstra, Hendrik W. Lenstra Jr., and László Lovász. “Fac-
toring polynomials with rational coefficients”. In: Mathematische
Annalen 261.4 (Dec. 1982), pp. 515–534 (cit. on p. 25).
[LMV15] Thijs Laarhoven, Michele Mosca, and Joop Van De Pol. “Finding
shortest lattice vectors faster using quantum search”. In: Designs,
Codes and Cryptography 77.2 (2015), pp. 375–400 (cit. on p. 83).
[LN20a] Jianwei Li and Phong Q Nguyen. “A complete analysis of the BKZ
lattice reduction algorithm”. In: Cryptology ePrint Archive (2020)
(cit. on p. 81).
[LN20b] Jianwei Li and Phong Q. Nguyen. “A complete analysis of the BKZ
lattice reduction algorithm”. In: Cryptology ePrint Archive (2020)
(cit. on p. 29).
121
[LS15] Adeline Langlois and Damien Stehlé. “Worst-Case to Average-Case
Reductions for Module Lattices”. In: Des. Codes Cryptography 75.3
(June 2015), pp. 565–599. issn: 0925-1022. doi: 10.1007/s10623-
014 - 9938 - 4. url: https : / / doi . org / 10 . 1007 / s10623 - 014 -
9938-4 (cit. on p. 37).
[MAT22] MATZOV. Report on the Security of LWE: Improved Dual Lattice
Attack. Tech. rep. 2022. doi: https://doi.org/10.5281/zenodo.
6493704 (cit. on pp. 70, 71, 75, 84, 86, 87, 89).
[Moo+20] Dustin Moody et al. Status Report on the Second Round of the
NIST Post-Quantum Cryptography Standardization Process. en. July
2020. doi: https://doi.org/10.6028/NIST.IR.8309 (cit. on
pp. 47, 52).
[MR09] Daniele Micciancio and Oded Regev. “Lattice-based cryptography”.
In: Post-quantum cryptography. Springer, 2009, pp. 147–191 (cit. on
p. 70).
[MS19] Tamalika Mukherjee and Noah Stephens-Davidowitz. “Lattice Re-
duction for Modules, or How to Reduce ModuleSVP to ModuleSVP”.
In: IACR Cryptol. ePrint Arch. 2019 (2019), p. 1142 (cit. on pp. 37,
39, 93, 109, 110, 113).
[Nat17] National Institute of Standards and Technology. Post-Quantum
Cryptography Standardization. 2017. url: https://csrc.nist.
gov / Projects / Post - Quantum - Cryptography / Post - Quantum -
Cryptography-Standardization (cit. on p. 47).
[Neu13] Jürgen Neukirch. Algebraic number theory. Vol. 322. Springer Sci-
ence & Business Media, 2013 (cit. on p. 94).
[Ngu09] Phong Q Nguyen. “Hermite’s constant and lattice algorithms”. In:
The LLL Algorithm. Springer, 2009, pp. 19–69 (cit. on p. 80).
[NS13] J. Neukirch and N. Schappacher. Algebraic Number Theory. Grund-
lehren der mathematischen Wissenschaften. Springer Berlin Heidel-
berg, 2013. isbn: 9783662039830. url: https://books.google.
nl/books?id=hS3qCAAAQBAJ (cit. on pp. 37, 38).
[NV08] Phong Q. Nguyen and Thomas Vidick. “Sieve Algorithms for the
Shortest Vector Problem Are Practical”. In: Journal of Mathemat-
ical Cryptology (2008). To appear. (cit. on p. 82).
[Pei09] Chris Peikert. “Public-Key Cryptosystems from the Worst-Case
Shortest Vector Problem: Extended Abstract”. In: Proceedings of
the Forty-First Annual ACM Symposium on Theory of Computing.
STOC ’09. Bethesda, MD, USA: Association for Computing Ma-
chinery, 2009, pp. 333–342. isbn: 9781605585062. doi: 10.1145/
1536414.1536461. url: https://doi.org/10.1145/1536414.
1536461 (cit. on p. 43).
122
[PHS19] Alice Pellet-Mary, Guillaume Hanrot, and Damien Stehlé. “Approx-
SVP in ideal lattices with pre-processing”. In: EUROCRYPT. Springer.
2019, pp. 685–716 (cit. on pp. 37, 92, 99, 102, 104).
[PP19] Chris Peikert and Zachary Pepin. “Algebraically Structured LWE,
Revisited”. In: Theory of Cryptography. Ed. by Dennis Hofheinz
and Alon Rosen. Cham: Springer International Publishing, 2019,
pp. 1–23. isbn: 978-3-030-36030-6 (cit. on pp. 45, 46, 53).
[PS21] Alice Pellet-Mary and Damien Stehlé. “On the hardness of the
NTRU problem”. In: Springer-Verlag, 2021. doi: 10.1007/978-
3-030-92062-3_1 (cit. on pp. 37, 59).
[PV21] Eamonn W Postlethwaite and Fernando Virdia. “On the success
probability of solving unique SVP via BKZ”. In: IACR Interna-
tional Conference on Public-Key Cryptography. Springer. 2021, pp. 68–
98 (cit. on pp. 68, 69).
[Rav+21] Prasanna Ravi et al. “Lattice-Based Key-Sharing Schemes: A Sur-
vey”. In: ACM Comput. Surv. 54.1 (Jan. 2021). issn: 0360-0300.
doi: 10.1145/3422178. url: https://doi.org/10.1145/3422178
(cit. on p. 48).
[Reg09] Oded Regev. “On Lattices, Learning with Errors, Random Linear
Codes, and Cryptography”. In: J. ACM 56.6 (Sept. 2009). issn:
0004-5411. doi: 10.1145/1568318.1568324. url: https://doi.
org/10.1145/1568318.1568324 (cit. on pp. 41, 43, 44).
[Sch87] Claus-Peter Schnorr. “A Hierarchy of Polynomial Time Lattice
Basis Reduction Algorithms”. In: Theor. Comput. Sci. 53 (1987),
pp. 201–224 (cit. on p. 28).
[SG10] Michael Schneider and Nicolas Gama. Darmstadt SVP Challenges.
https://www.latticechallenge.org/svp- challenge/index.
php. Accessed: 16-02-2022. 2010 (cit. on p. 79).
[SH95] Claus-Peter Schnorr and Horst Helmut Hörner. “Attacking the Chor-
Rivest cryptosystem by improved lattice reduction”. In: Interna-
tional Conference on the Theory and Applications of Cryptographic
Techniques. Springer. 1995, pp. 1–12 (cit. on p. 80).
[WEB23] Andreas Wiemers, Stephan Ehlen, and Kaveh Bashiri. “A remark
on the Independence Heuristic in the Dual Attack”. In: Cryptology
ePrint Archive (2023) (cit. on p. 71).
[YD17] Yang Yu and Léo Ducas. “Second order statistical behavior of LLL
and BKZ”. In: Springer, 2017, pp. 3–22 (cit. on p. 88).
123
Part IV
Appendix
124
How to use estimation scripts
2 Obtaining estimates
The security estimate of schemes is based on the attack with the lowest (time) complexity. This
means that it can be hard to obtain a single formula for the hardness of a certain LWE instance.
The estimation scripts for each attack can be complex, as they often have to optimize over many
parameters involved in the attack.
Overall we see that the lowest time complexity is achieved by the primal attack that uses a final
large SVP call. Here ‘rop’ represents an estimate for the needed gate count.
'Initial estimate:'
rop: 2ˆ171.2, mem: 2ˆ167.0, m: 656, β: 499, d: 1285, : 1, ζ: 11, tag: dual_hybrid
Decreasing the length n of the secret makes the problem easier:
[7]: display("Smaller secret dimension",
LWE.dual_hybrid(Frodo640.updated(n=500)))
'Smaller error/secret'
rop: 2ˆ147.6, mem: 2ˆ141.2, m: 656, β: 414, d: 1285, : 1, ζ: 11, tag: dual_hybrid
One can also use many other distributions for the secret and error. We do recommend to keep
them identical. For example we can consider a ternary distribution. Due to the small entropy per
coefficient the hybrid part of the attack becomes more important.
[9]: display("Ternary error/secret (no hybrid)",
LWE.dual(Frodo640.updated(Xs=ND.Uniform(-1,1), Xe=ND.Uniform(-1,1))))
display("Ternary error/secret (hybrid)",
LWE.dual_hybrid(Frodo640.updated(Xs=ND.Uniform(-1,1), Xe=ND.
,→Uniform(-1,1))))
'More samples'
rop: 2ˆ170.4, mem: 2ˆ167.0, m: 754, β: 495, d: 1383, : 1, ζ: 11, tag: dual_hybrid
However, adding more samples, while making the secret/error small, might make the Arora-Ge and
BKW attacks better.
[11]: display("Grobner bases, many samples",
LWE.arora_gb(Frodo640.updated(Xs=ND.Uniform(-1,1), Xe=ND.Uniform(-1,1),␣
,→m=2**24)))
4 All estimates
To finalize, there exists a command to obtain many of the estimates in one go. This is however
slow, includes some less useful attacks, and does not consider all the flags (e.g. fft=True).
[13]: display(LWE.estimate(Frodo640))
'usvp': rop: 2ˆ166.5, red: 2ˆ166.5, δ: 1.003473, β: 486, d: 1285, tag: usvp,
'bdd': rop: 2ˆ163.0, red: 2ˆ162.1, svp: 2ˆ161.9, β: 470, η: 504, d: 1293, tag:␣
,→bdd,
'bdd_hybrid': rop: 2ˆ163.0, red: 2ˆ162.1, svp: 2ˆ161.9, β: 470, η: 504, ζ: 0, |S|:
,→ 1, d: 1297, prob: 1, : 1, tag: hybrid,
'dual': rop: 2ˆ173.1, mem: 2ˆ104.0, m: 656, β: 506, d: 1296, : 1, tag: dual,
'dual_hybrid': rop: 2ˆ171.2, mem: 2ˆ167.0, m: 656, β: 499, d: 1285, : 1, ζ: 11,␣
,→tag: dual_hybrid,
5 MATZOV estimate
For the MATZOV dual attack estimate one use the code attached to
https://arxiv.org/pdf/2205.13983.pdf. For slightly less optimal estimates one can just use
LWE.dual_hybrid.