arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Lattices of interest

triangle-exclamation

Needs review.

hashtag
Introduction

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.

hashtag
Dual lattice

Let be a lattice. We define the dual of a lattice as the set of all vectors such that for all vectors :

circle-info

Note that the vectors in the dual lattice are not necessarily in the initial lattice . They are spanned by the basis vectors of the lattice .

Examples:

  1. because the dot product of all vectors in stays in

  2. Scaling: Proof: If If

Plot: - green, - red

Intuition: We can think of the dual lattice as some kind of inverse of the initial lattice

hashtag
Basis of the dual lattice

We will now focus on the problem of finding the basis of the dual lattice given the lattice and its basis .

circle-check

Reminder: We can think of the lattice as a transformation given by its basis on .

We have the following equivalences:

Therefore so we have found a base for our dual lattice:

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

hashtag
Properties

  1. The dual of the dual is the initial lattice (to prove think of the basis of )

  2. (to prove think of the basis of )

hashtag
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 and its dual . Let's see what can we uncover about them.

circle-info

We recommend to try and think about the problem for a few minutes before reading the conclusions.

What is ? What about ? Can you see some patterns?

circle-check

Reminder: We defined the successive minima of a lattice as such:

Claim 1:

Proof: By Minkowski's bound we know:

and . By multiplying them we get the desired result.

From this result we can deduce that the minima of the and have an inverse proportional relationship (If one is big, the other is small).

Claim 2:

Proof:

Let be such that . Then take any set of linearly independent vectors in . Not all of them are orthogonal to . Hence, there exists an such that . By the definition of the dual lattice, we have and hence

hashtag
Geometry + Partitioning

// TODO

hashtag
Q-ary lattices

We've seen that in cryptography we don't like to work with infinite sets (like ) and we limit them to some finite set using the operation (). We will apply the same principle to the lattices so let us define the concept of a q-ary lattice.

Definition:

For a number we call a lattice q-ary if

Intuition:

  • is periodic

  • We use arithmetic

We will now look at 2 more types of lattices that are q-ary. Let be a matrix with . Consider the following lattices:

Intuition:

  • Think of as the image of the matrix , the matrix spanned by the rows of

  • Think of as the kernel of modulo . The set of solutions

circle-info

Remark: If the same matrix is used ( is fixed ) then

Claim:

and are the dual of each other (up to scaling):

Proof:

Firstly we will show

  • Let for some

  • Let for some

Then we have:

The second part is left as an exercise to the reader :D. Show

hashtag
Resources

For x∈L,y∈L∨x \in {L}, y \in {L}^\veex∈L,y∈L∨consider the vector dot product and addition - xβ‹…y∈Zx \cdot y \in \mathbb{Z}xβ‹…y∈Z - x+yx + yx+y has no geometric meaning, they are in different spaces

https://cseweb.ucsd.edu/~daniele/papers/FOSAD11.pdfarrow-up-right
LβŠ‚RnL \subset \mathbb R^nLβŠ‚Rn
y∈span(L)y \in span(L)y∈span(L)
yβ‹…x∈ZΒ y \cdot x \in \mathbb Z \ yβ‹…x∈ZΒ 
x∈Lx \in Lx∈L
L∨={y∈span(L):yβ‹…x∈ZΒ βˆ€Β x∈L}L^\vee = \{y \in span(L) : y \cdot x \in \mathbb{Z} \ \forall \ x \in L\}L∨={y∈span(L):yβ‹…x∈ZΒ βˆ€Β x∈L}
L∨L^\veeL∨
LLL
LLL
(Zn)∨=Zn(\mathbb Z^n) ^ \vee = \mathbb Z^n(Zn)∨=Zn
Zn\mathbb Z^nZn
Zn\mathbb Z^nZn
(kβ‹…L)∨=1kβ‹…L(k \cdot L)^\vee = \dfrac 1 k \cdot L(kβ‹…L)∨=k1​⋅L
y∈(kL)βˆ¨β‡’yβ‹…kx=k(xβ‹…y)∈ZΒ βˆ€Β x∈Lβ‡’y∈1kL∨y \in (kL)^\vee \Rightarrow y \cdot kx = k(x \cdot y) \in \mathbb{Z} \ \forall \ x \in L \Rightarrow y \in \dfrac 1 k L^\veey∈(kL)βˆ¨β‡’yβ‹…kx=k(xβ‹…y)∈ZΒ βˆ€Β x∈Lβ‡’y∈k1​L∨
y∈(1kL)βˆ¨β‡’yv∈Lβˆ¨β‡’kyβ‹…x=k(xβ‹…y)=yβ‹…kx∈ZΒ βˆ€Β x ∈Lβ‡’y∈(kL)∨y \in \left (\dfrac 1 kL\right )^\vee \Rightarrow yv \in L^\vee \Rightarrow ky\cdot x = k(x \cdot y) = y \cdot kx \in \mathbb{Z} \ \forall \ x \ \in L \Rightarrow y \in (kL)^\veey∈(k1​L)βˆ¨β‡’yv∈Lβˆ¨β‡’kyβ‹…x=k(xβ‹…y)=yβ‹…kx∈ZΒ βˆ€Β x ∈Lβ‡’y∈(kL)∨
2Z22\mathbb Z ^22Z2
12Z2\dfrac 1 2 \mathbb Z ^ 221​Z2
L∨L^\veeL∨
LLL
B∨B^\veeB∨
L∨L^\veeL∨
LLL
BBB
LLL
B∈GLn(R)B \in GL_n(\mathbb R)B∈GLn​(R)
Zn\mathbb Z^nZn
y∈Lβˆ¨β€…β€ŠβŸΊβ€…β€Šyβ‹…x∈ZΒ βˆ€Β x∈Lβ€…β€ŠβŸΊβ€…β€ŠBTy∈Znβ€…β€ŠβŸΊβ€…β€Šy∈(Bβˆ’1)Tβ‹…Zn\begin{align*} y \in L^\vee & \iff y \cdot x \in \mathbb Z \ \forall\ x \in L \\ & \iff B^Ty \in \mathbb{Z}^n \\ & \iff y \in (B^{-1})^T \cdot \mathbb Z^n \end{align*}y∈Lβˆ¨β€‹βŸΊyβ‹…x∈ZΒ βˆ€Β x∈L⟺BTy∈Zn⟺y∈(Bβˆ’1)Tβ‹…Zn​
L∨=(Bβˆ’1)Tβ‹…ZnL^\vee = (B^{-1})^T \cdot \mathbb Z^nL∨=(Bβˆ’1)Tβ‹…Zn
B∨=(Bβˆ’1)T∈GLn(R)B^\vee = (B^{-1})^T \in GL_n(\mathbb{R})B∨=(Bβˆ’1)T∈GLn​(R)
L1βŠ†L2β€…β€ŠβŸΊβ€…β€ŠL2βˆ¨βŠ†L1∨{L}_1 \subseteq {L}_2 \iff {L}^\vee_2 \subseteq {L}^\vee_1L1β€‹βŠ†L2β€‹βŸΊL2βˆ¨β€‹βŠ†L1βˆ¨β€‹
(L∨)∨=L=({L}^\vee)^\vee ={L} = (L∨)∨=L=
L∨L^\veeL∨
det⁑(L∨)=det⁑(L)βˆ’1\det(L^\vee) = \det(L) ^{-1}det(L∨)=det(L)βˆ’1
L∨L^\veeL∨
LLL
L∨L^\veeL∨
Ξ»1(2Z2)\lambda_1(2\mathbb Z^2)Ξ»1​(2Z2)
Ξ»1((2Z2)∨)\lambda_1((2\mathbb Z^2)^\vee)Ξ»1​((2Z2)∨)
LLL
Ξ»i(L)=min⁑(max⁑1≀j≀i(βˆ₯vjβˆ₯):vj∈LΒ areΒ linearlyΒ independent)\lambda_i(L)=\min\left(\max_{1\leq j\leq i}\left(\left\lVert v_j\right\rVert\right):v_j\in L\text{ are linearly independent}\right)Ξ»i​(L)=min(1≀j≀imax​(βˆ₯vj​βˆ₯):vjβ€‹βˆˆLΒ areΒ linearlyΒ independent)
Ξ»1(L)β‹…Ξ»1(L∨)≀n\lambda_1(L) \cdot \lambda_1(L^\vee) \leq nΞ»1​(L)β‹…Ξ»1​(L∨)≀n
Ξ»1(L)≀nβ‹…det⁑(L)1/n\lambda_1(L) \leq \sqrt{n} \cdot \det(L)^{1 / n}Ξ»1​(L)≀n​⋅det(L)1/n
Ξ»1(L∨)≀nβ‹…det(L∨)1/n=ndet⁑(L)1/n\lambda_1(L^\vee) \leq \sqrt{n} \cdot det(L^\vee)^{1 / n} = \dfrac {\sqrt{n}} {\det(L)^{1/n}}Ξ»1​(L∨)≀n​⋅det(L∨)1/n=det(L)1/nn​​
LLL
L∨L^\veeL∨
Ξ»1(L)β‹…Ξ»n(L∨)β‰₯1\lambda_1(L) \cdot \lambda_n(L^\vee) \geq 1Ξ»1​(L)β‹…Ξ»n​(L∨)β‰₯1
x∈Lx∈Lx∈L
βˆ₯xβˆ₯=Ξ»1(L)\|x\|=Ξ»_1(L)βˆ₯xβˆ₯=Ξ»1​(L)
(y1,...,yn)(y_1, . . . , y_n)(y1​,...,yn​)
nnn
L∨L^\veeL∨
xxx
iii
yiβ‹…xβ‰ 0y_i \cdot x \neq 0yi​⋅xξ€ =0
yiβ‹…x∈Zy_i \cdot x \in \mathbb Zyi​⋅x∈Z
1≀yiβ‹…x≀βˆ₯yiβˆ₯β‹…βˆ₯xβˆ₯≀λ1β‹…Ξ»n∨1 \leq y_i \cdot x \leq \|y_i\| \cdot \|x\| \leq \lambda_1 \cdot \lambda_n^\vee1≀yi​⋅x≀βˆ₯yi​βˆ₯β‹…βˆ₯xβˆ₯≀λ1​⋅λnβˆ¨β€‹
Z\mathbb ZZ
β€Šmodβ€Š\bmodmod
Z→Z/qZ\mathbb Z \to \mathbb Z/ q\mathbb{Z}Z→Z/qZ
q∈Z,Β qβ‰₯3q \in \mathbb{Z},\ q \geq 3q∈Z,Β qβ‰₯3
qZnβŠ†LβŠ†Znq\mathbb{Z}^n \subseteq {L} \subseteq \mathbb{Z}^nqZnβŠ†LβŠ†Zn
qZnβŠ†Lq\mathbb{Z^n} \subseteq \mathcal{L}qZnβŠ†L
β€Šmodβ€ŠΒ q\bmod \ qmodΒ q
β€Šmodβ€ŠΒ q\bmod \ qmodΒ q
A∈(Z/qZ)nΓ—mA \in (\mathbb{Z}/q\mathbb Z)^{n \times m}A∈(Z/qZ)nΓ—m
m>nm > nm>n
Lq(A)={y∈Zm:y=ATxβ€Šmodβ€Šq∈ forΒ someΒ x∈Zn}βŠ‚ZmL_q(A) = \{y \in \mathbb Z^m : y = A^Tx \bmod q \in \text{ for some } x \in \mathbb{Z}^n \} \subset \mathbb{Z^m}Lq​(A)={y∈Zm:y=ATxmodq∈ forΒ someΒ x∈Zn}βŠ‚Zm
LqβŠ₯(A)={y∈Zm:Ay=0β€Šmodβ€Šq}βŠ‚ZmL^\perp_q(A) = \{y \in \mathbb Z^m : Ay = 0 \bmod q \} \subset \mathbb{Z^m}LqβŠ₯​(A)={y∈Zm:Ay=0modq}βŠ‚Zm
Lq(A)L_q(A)Lq​(A)
AAA
AAA
LqβŠ₯(A)L_q^\perp(A)LqβŠ₯​(A)
AAA
qqq
Ax=0Ax = 0Ax=0
AAA
AAA
Lq(A)β‰ LqβŠ₯(A)L_q(A) \neq L_q^\perp(A)Lq​(A)ξ€ =LqβŠ₯​(A)
Lq(A)L_q(A)Lq​(A)
LqβŠ₯(A)L_q^\perp(A)LqβŠ₯​(A)
Lq(A)=1qLqβŠ₯(A)L_q(A) = \dfrac 1 q L_q^\perp(A)Lq​(A)=q1​LqβŠ₯​(A)
LqβŠ₯(A)βŠ†q(Lq(A))∨L_q^\perp(A) \subseteq q(L_q(A))^\veeLqβŠ₯​(A)βŠ†q(Lq​(A))∨
y∈LqβŠ₯(A)β‡’Ay≑0β€Šmodβ€Šqβ€…β€ŠβŸΊβ€…β€ŠAy=qzy \in L_q^\perp(A) \Rightarrow Ay \equiv 0 \bmod q \iff Ay = qzy∈LqβŠ₯​(A)β‡’Ay≑0modq⟺Ay=qz
z∈Zmz \in \mathbb{Z}^mz∈Zm
yβ€²βˆˆLq(A)β‡’y′≑ATxβ€Šmodβ€Šqβ€…β€ŠβŸΊβ€…β€Šyβ€²=ATx+qzβ€²y' \in L_q(A)\Rightarrow y' \equiv A^Tx \bmod q \iff y' = A^Tx + qz'yβ€²βˆˆLq​(A)β‡’y′≑ATxmodq⟺yβ€²=ATx+qzβ€²
x∈Zn,Β zβ€²βˆˆZmx \in \mathbb Z^n, \ z' \in \mathbb Z^mx∈Zn,Β zβ€²βˆˆZm
yβ‹…yβ€²=yβ‹…(ATx+qzβ€²)=yβ‹…ATx+q(yβ‹…zβ€²)=Ay⏟qzβ‹…x+q(yβ‹…zβ€²)=qzβ‹…x+q(yβ‹…zβ€²)y \cdot y' = y \cdot (A^Tx + qz') = y\cdot A^Tx + q (y \cdot z') = \underbrace{Ay}_{qz} \cdot x + q(y \cdot z') = qz \cdot x + q(y \cdot z')yβ‹…yβ€²=yβ‹…(ATx+qzβ€²)=yβ‹…ATx+q(yβ‹…zβ€²)=qzAy​​⋅x+q(yβ‹…zβ€²)=qzβ‹…x+q(yβ‹…zβ€²)
β‡’1qyβ‹…yβ€²βˆˆZβ‡’1qy∈Lq(A)∨\Rightarrow \dfrac 1 q y \cdot y' \in \mathbb{Z} \Rightarrow \dfrac 1 q y\in L_q(A)^\veeβ‡’q1​yβ‹…yβ€²βˆˆZβ‡’q1​y∈Lq​(A)∨
LqβŠ₯(A)βŠ‡q(Lq(A))∨L_q^\perp(A) \supseteq q(L_q(A))^\veeLqβŠ₯​(A)βŠ‡q(Lq​(A))∨
https://en.wikipedia.org/wiki/Hermite_normal_formarrow-up-right
https://cims.nyu.edu/~regev/teaching/lattices_fall_2004/ln/DualLattice.pdfarrow-up-right
https://sp2.uni.lu/wp-content/uploads/sites/66/2019/06/DualLattice-Luca-Notarnicola.pdfarrow-up-right
https://simons.berkeley.edu/sites/default/files/docs/14953/intro.pdfarrow-up-right
n = 5 # lattice dimension

B = 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 integers
B_dual_.hermite_form() == B_dual.hermite_form() # Reduce form to compare
# True
n = 5 # lattice dimension

B = 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() 
l2 = IntegerLattice(B_dual).shortest_vector().norm().n() / 11

print(l1 * l2 < n)
# True
n = 5 # lattice dimension

B = 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 = 0
for v in B_dual_lll:
    lv = v.norm()
    if lv > lnd:
        lnd = lv
lnd = lnd.n() / 11

print(lnd * l1 > 1) 
# True