In this chapter we will study some specific types of lattices that appear in cryptography. These will help us understand how certain problems we base our algorithms on reduce to other hard problems. They will also give insight about the geometry of lattices.
Intuitively, if we have a problem (1) in some lattice space we can reduce it to a hard problem (2) in another related lattice space. Then if we can prove that if solving problem (1) implies solving problem (2) then we can conclude that problem (1) is as hard as problem (2)
Understanding this chapter will strengthen the intuition for the fututre when we will study what breaking a lattice problem means and how to link it to another hard lattice problem.
Dual lattice
Let L⊂Rnbe a lattice. We define the dual of a lattice as the set of all vectors y∈span(L) such that y⋅x∈Zfor all vectors x∈L:
L∨={y∈span(L):y⋅x∈Z∀x∈L}
Note that the vectors in the dual lattice L∨ are not necessarily in the initial lattice L. They are spanned by the basis vectors of the lattice L.
Examples:
(Zn)∨=Zn because the dot product of all vectors in Znstays in Zn
Scaling: (k⋅L)∨=k1⋅LProof:
If y∈(kL)∨⇒y⋅kx=k(x⋅y)∈Z∀x∈L⇒y∈k1L∨
If y∈(k1L)∨⇒yv∈L∨⇒ky⋅x=k(x⋅y)=y⋅kx∈Z∀x∈L⇒y∈(kL)∨
Plot: 2Z2 - green, 21Z2 - red
Intuition: We can think of the dual lattice L∨ as some kind of inverse of the initial lattice L
Basis of the dual lattice
We will now focus on the problem of finding the basis B∨ of the dual lattice L∨given the lattice L and its basis B.
Reminder: We can think of the lattice L as a transformation given by its basis B∈GLn(R)on Zn.
We have the following equivalences:
y∈L∨⟺y⋅x∈Z∀x∈L⟺BTy∈Zn⟺y∈(B−1)T⋅Zn
Therefore L∨=(B−1)T⋅Znso we have found a base for our dual lattice:
B∨=(B−1)T∈GLn(R)
n =5# lattice dimensionB = sage.crypto.gen_lattice(m=n, q=11, seed=42)B_dual = sage.crypto.gen_lattice(m=n, q=11, seed=42, dual=True)B_dual_ = (B.inverse().T *11).change_ring(ZZ)# Scale up to integersB_dual_.hermite_form()== B_dual.hermite_form()# Reduce form to compare# True
Let's look at some plots. With green I will denote the original lattice and with red the dual. The scripts for the plots can be found in in the interactive fun section
Properties
L1⊆L2⟺L2∨⊆L1∨
(L∨)∨=L=The dual of the dual is the initial lattice (to prove think of the basis of L∨)
det(L∨)=det(L)−1 (to prove think of the basis of L∨)
For x∈L,y∈L∨consider the vector dot product and addition
- x⋅y∈Z
- x+y has no geometric meaning, they are in different spaces
Successive minima
We've seen that we can find the basis of the dual lattice given the basis of the original lattice. Let's look at another interesting quantity: the successive minima of a lattice L and its dual L∨. Let's see what can we uncover about them.
We recommend to try and think about the problem for a few minutes before reading the conclusions.
What is λ1(2Z2)? What about λ1((2Z2)∨)? Can you see some patterns?
Reminder: We defined the successive minima of a lattice Las such:
λi(L)=min(1≤j≤imax(∥vj∥):vj∈L are linearly independent)
Claim 1:
λ1(L)⋅λ1(L∨)≤n
Proof:
By Minkowski's bound we know:
λ1(L)≤n⋅det(L)1/n and λ1(L∨)≤n⋅det(L∨)1/n=det(L)1/nn. By multiplying them we get the desired result.
From this result we can deduce that the minima of the L and L∨have an inverse proportional relationship (If one is big, the other is small).
Letx∈L be such that ∥x∥=λ1(L). Then take any set (y1,...,yn) of n linearly independent vectors in L∨.
Not all of them are orthogonal to x. Hence, there exists an i such that yi⋅x=0 .
By the definition of the dual lattice, we have yi⋅x∈Z and hence 1≤yi⋅x≤∥yi∥⋅∥x∥≤λ1⋅λn∨
n =5# lattice dimensionB = sage.crypto.gen_lattice(m=n, q=11, seed=42)B_dual = sage.crypto.gen_lattice(m = n, q=11, seed=42, dual=True)l1 =IntegerLattice(B).shortest_vector().norm().n()B_dual_lll = B_dual.LLL()lnd =0for v in B_dual_lll: lv = v.norm()if lv > lnd: lnd = lvlnd = lnd.n()/11print(lnd * l1 >1)# True
Geometry + Partitioning
// TODO
Q-ary lattices
We've seen that in cryptography we don't like to work with infinite sets (like Z) and we limit them to some finite set using the mod operation (Z→Z/qZ). We will apply the same principle to the lattices so let us define the concept of a q-ary lattice.
Definition:
For a number q∈Z,q≥3we call a lattice q-ary if
qZn⊆L⊆Zn
Intuition:
qZn⊆L is periodic modq
We use arithmetic modq
We will now look at 2 more types of lattices that are q-ary. Let A∈(Z/qZ)n×m be a matrix with m>n. Consider the following lattices:
Lq(A)={y∈Zm:y=ATxmodq∈ for some x∈Zn}⊂ZmLq⊥(A)={y∈Zm:Ay=0modq}⊂Zm
Intuition:
Think of Lq(A) as the image of the matrix A, the matrix spanned by the rows of A
Think of Lq⊥(A) as the kernel of A modulo q. The set of solutions Ax=0
Remark: If the same matrix A is used (A is fixed ) then Lq(A)=Lq⊥(A)
Claim:
Lq(A) and Lq⊥(A) are the dual of each other (up to scaling): Lq(A)=q1Lq⊥(A)
Proof:
Firstly we will show Lq⊥(A)⊆q(Lq(A))∨
Let y∈Lq⊥(A)⇒Ay≡0modq⟺Ay=qzfor some z∈Zm
Let y′∈Lq(A)⇒y′≡ATxmodq⟺y′=ATx+qz′ for some x∈Zn,z′∈Zm
Then we have:y⋅y′=y⋅(ATx+qz′)=y⋅ATx+q(y⋅z′)=qzAy⋅x+q(y⋅z′)=qz⋅x+q(y⋅z′)
⇒q1y⋅y′∈Z⇒q1y∈Lq(A)∨
The second part is left as an exercise to the reader :D. Show Lq⊥(A)⊇q(Lq(A))∨