math/lattices.tex
lattices.texRaw
1\documentclass{article}
2\usepackage[utf8]{inputenc}
3\usepackage{amsfonts}
4\usepackage{amsthm}
5\usepackage{amsmath}
6\usepackage{enumerate}
7\usepackage{hyperref}
8\usepackage{amssymb}
9\usepackage{tikz} % diagram
10\usepackage{changepage} % for adjustwidth
11
12\begin{filecontents}[overwrite]{lattices.bib}
13@misc{chris-peikert,
14 author = {Chris Peikert},
15 title = {{A decade of lattice cryptography}},
16 year = {2016}
17}
18@misc{matan,
19 author = {Matan Prasma},
20 title = {{Lattices, an elementary and rigurous account}},
21 year = {2024}
22}
23@misc{slides-micciano,
24 author = {Daniele Micciancio},
25 title = {{Introduction to Lattices}},
26 year = {2024}
27}
28@misc{micciano-regev,
29 author = {Daniele Micciancio and Oded Regev},
30 title = {{Lattice-based Cryptography}},
31 year = {2008}
32}
33@misc{menezes,
34 author = {Alfred Menezes},
35 title = {{A Gentle Introduction to Lattice-Based Cryptography}},
36 year = {2026}
37}
38@misc{cynthia-dwork,
39 author = {Cynthia Dwork},
40 title = {{Lattices and Their Application to Cryptography}},
41 year = {1998}
42}
43\end{filecontents}
44\nocite{*}
45
46
47\theoremstyle{definition}
48
49\newtheorem{thm}{Theorem}[section]
50\newtheorem{lemma}[thm]{Lemma}
51\newtheorem{prop}[thm]{Proposition}
52\newtheorem{cor}[thm]{Corollary}
53\newtheorem{defn}[thm]{Definition}
54\newtheorem{remark}[thm]{Remark}
55\newtheorem{ex}[thm]{Example}
56
57\newcommand{\Rr}{\mathbb{R}}
58\newcommand{\Zz}{\mathbb{Z}}
59\newcommand{\Ll}{\mathcal{L}}
60
61\title{Notes on Lattices}
62\author{arnaucube}
63\date{2026}
64
65\begin{document}
66
67\maketitle
68
69\begin{abstract}
70 Notes taken while studying lattice-based cryptography.
71
72 Usually while reading books and papers I take handwritten notes in paper notebooks, this document contains some of them re-written to $LaTeX$.
73\end{abstract}
74
75\tableofcontents
76
77\section{Lattices}
78\subsection{Hard problems}
79
80\begin{defn}[SVP (Shortest Vector Problem)]
81find a shortest non-zero vector $x \in \Ll$, ie. that minimizes the Euclidean norm $||x||$, that is $\lambda_1(\Ll)=||x||$.
82\end{defn}
83
84\begin{defn}[CVP (Closest Vector Problem)]
85given a vector $y \in \Rr^n$ with $y \not\in \Ll$, find a nonzero vector $x \in \Ll$ that is closest to $y$, ie. that minimizes the Euclidean norm $||y-x||$.
86\end{defn}
87
88\begin{defn}[NTRU key recovery problem]
89Given $h(x)$, find ternary polynomials $f, g \in \mathcal{T}$ satisfying
90$$f(x) \cdot h(x) = g(x) \pmod q \in R_q$$
91Where $R_q = \Zz_q[X]/(X^n-1)$.
92\end{defn}
93
94\begin{defn}[SIS (Short Integer Solution)]
95Given $q \in \Zz$ and matrix $A \in \Zz_q^{m \times n}$, find a non-zero short $z \in \Zz^n$ s.th.
96$$A \cdot z = 0 \pmod q$$
97
98\small{"short": $z \in \{B, B\}^n$ for some bound $B$, often $z \in \{-1, 0, 1 \}^n$.}
99\end{defn}
100
101The set of all solutions to the SIS problem forms the (q-ary) lattice
102$$\Lambda^{\perp}_q(A) = \{ z \in \Zz^n ~|~ A z = 0 \in \Zz_q^m \} \supseteq \Zz_q^n$$
103where the SIS problem becomes the SVP for $\Lambda_q^{\perp}(A)$
104
105\begin{itemize}
106\item LLL algorithm is used to solve SVP and CVP.
107
108 \item Both SVP and CVP become computationally difficult (NP hard) as the lattice dimension $n$ grows.
109\end{itemize}
110
111
112\begin{defn}[Ring SIS (Ring Short Integer Solution)]
113given a uniformly random matrix $A \in^R R_q^n$, with elements $a_i \in R_q$, find a non-zero integer vector $z \in R^n$ of norm $||z|| \leq \beta$ such that
114
115$$A z = \sum_i a_i \cdot z_i = 0 \in R_q$$
116\end{defn}
117
118\begin{defn}[MSIS (Module Short Integer Solution)]
119given a uniformly random matrix $A \in^R R_q^{m \times n}$, with columns $a_i \in R_q^m$, find a non-zero integer vector $z \in R^n$ of norm $||z|| \leq \beta$ such that
120
121$$A z = 0 \in R_q^m$$
122$$ie.~ \sum_i a_{ij} \cdot z_j = 0 \in R_q, ~~for~ i=1, \ldots, m$$
123\end{defn}
124
125Notice that Module-SIS is a Ring-SIS with $rank=1$ ($m=1$).
126
127
128
129\subsection{Dual lattices}
130
131From previous section, we have LWE-Lattice and SIS-Lattice:
132\begin{defn}[LWE Lattice] \label{lwe-lattice}
133 A LWE-Lattice $\Ll$ is defined
134 \begin{align*}
135 \Ll &= \{ A^T s ~|~ s \in \Zz_q^n \} + q \Zz^m\\
136 &= \{ A^T s + qz ~|~ s \in \Zz_q^n, z \in \Zz^m \}
137 \end{align*}
138\end{defn}
139
140\begin{defn}[SIS-Lattice] \label{sis-lattice}
141 A SIS-Lattice $\Ll$ is defined
142$$\Ll^\perp = \{ z \in \Zz^m ~|~ Az=0 \in \Zz_q^n \} \supseteq q \Zz^m$$
143\end{defn}
144
145
146\begin{defn}[Dual of a lattice] \label{dual-lattice}
147 For a lattice $\Ll$, its dual is
148 $$\Ll^* = \{ y \in \Rr^m ~|~ \langle y, x \rangle \in \Zz ~\forall~ x \in \Ll \}$$
149\end{defn}
150
151\begin{lemma}
152 $$\Ll = q \Ll^{\perp *} ~\text{ie.}~ \frac{1}{q} \Ll = \Ll^{\perp *}$$
153\end{lemma}
154\begin{proof}
155 \begin{enumerate}[i.]
156 \item
157 Take $y \in \frac{1}{q} \Ll$, then by \ref{lwe-lattice}, $\exists~ s \in \Zz^n, z \in \Zz^m$ such that
158 $$y = \frac{1}{q} (A^Ts + qz) = \frac{1}{q} A^T s +z$$
159
160 Let $x \in \Ll^\perp$. By definition (\ref{sis-lattice}) $Ax=0 \pmod q$, therefore $\exists~ k \in \Zz^n$ such that $Ax = qk$.
161
162 Compute
163 \begin{align*}
164 \langle y, x \rangle &= \langle \frac{1}{q} A^T s + z, x \rangle\\
165 &= \frac{1}{q} \langle A^T s, x \rangle + \langle z, x \rangle\\
166 &= \frac{1}{q} \langle s, Ax \rangle + \langle z, x \rangle\\
167 &= \frac{1}{q} \langle s, qk \rangle + \langle z, x \rangle\\
168 &= \langle s, k \rangle + \langle z, x \rangle
169 \end{align*}
170 and $\langle s, k \rangle + \langle z, x \rangle \in \Zz$, since each of $s, k, z, x \in \Zz$ separately.
171
172 Thus $\langle y, x \rangle \in \Zz$, hence by \ref{dual-lattice}, $y \in \Ll^{\perp *}$.
173
174 We started from $y \in \frac{1}{q}\Ll$, so, now we have
175 $$y \in \Ll^{\perp *} ~\forall~ y \in \frac{1}{q} \Ll$$
176 therefore
177 $$\Ll^{\perp *} \supseteq \frac{1}{q} \Ll$$
178
179 \item
180 Now we prove the reverse inclusion. Take $y \in \Ll^{\perp *}$.
181
182 Observe that $q \Zz^m \subseteq \Ll^\perp$, because
183 $$\forall z \in \Zz^m,~ A(qz) = qAz = q 0 = 0 \pmod q$$
184
185 Since $y \in \Ll^{\perp *}$, we must have $\langle y, qz \rangle \in \Zz ~\forall~ z \in \Zz^m$.
186
187 Let $e_i \in \Zz^m$ be the $i-th$ standard basis vector, ie. $e_i=(0, \ldots, 0, 1, 0, \ldots, 0)$ (where one is at the i-th position).
188
189 We know that $\langle y, qz \rangle \in \Zz ~\forall z \in \Zz^m$ (including $z=e_i$), thus, for
190 $q e_i = (0, \ldots, 0, q, 0, \ldots, 0)$,
191 $$\langle y, q e_i \rangle = q \langle y, e_i \rangle = q \cdot y_i$$
192 since $\langle y, e_i \rangle = y_i$ (extracts the i-th position from $y$).
193
194 So, since $\langle y, qz \rangle \in \Zz ~\forall z \in \Zz^m$, and $\langle y, q e_i \rangle = q y_i$, then $q y_i \in \Zz$
195
196 This argument works $\forall i \in [m]$, that is, $q y_1, \ldots, q y_m \in \Zz$. Therefore
197 $$qy \in \Zz^m ~\forall~ y \in \Ll^{\perp *}$$
198
199 For $\overline{x} \in ker(A) \subseteq \Zz_q^m$, since $A \overline{x}=0$, then $Ax =0 \pmod q$, thus $x \in \Ll^\perp$ (by its definition \ref{sis-lattice}).
200
201 Since $y \in \Ll^{\perp *}$, by the definition of $\Ll^{\perp *}$ (\ref{dual-lattice}), $\langle y, x \rangle \in \Zz$. Multiply it by $q$,
202 $$ q \langle y, x \rangle = \langle qy, x \rangle \in q \Zz$$
203 hence $\langle qy, x \rangle = 0 \pmod q$, thus $qy \pmod q \in ker(A)^\perp$.
204
205 \begin{adjustwidth}{4em}{0pt}
206 We'll now prove the following identity, valid for every integer $q\geq 2$, which we will use later:
207 $$(\ker A)^\perp=im(A^T)$$
208 where $A:\Zz_q^m \to \Zz_q^n$.
209
210 Let $y \in im(A^T)$. Then $\exists~ s \in \Zz_q^n$ such that $y=A^Ts$.
211
212 Then, $\forall~ x \in \ker(A)$, by definition of the kernel, $Ax=0$. Want to prove that $y$ is orthogonal to every $x \in \ker(A)$:
213 $$\langle y,x\rangle = \langle A^Ts,x\rangle = \langle s,Ax\rangle = 0$$
214
215 thus, $\langle y,x\rangle =0 ~\forall~ x \in \ker(A)$, hence $y$ is orthogonal to every $x$, that is, $y \in (\ker(A))^\perp$.
216
217 Therefore,
218 $$im(A^T) \subseteq (\ker(A))^\perp$$
219
220 For the reverse inclusion, it suffices to show that both sets have the same number of elements:
221
222 By the First Isomorphism Theorem,
223 $$|im(A)| = \frac{ |\Zz_q^m|}{|\ker(A)|} = \frac{q^m}{|\ker(A)|}$$
224
225 Notice that for every subgroup $K \subseteq \Zz_q^m$, the dot product on $\Zz_q^m$ is nondegenerate, therefore
226 $$|K^\perp| = \frac{q^m}{|K|}$$
227
228 so, applied to $\ker(A)$,
229 $$|\ker(A)^\perp| = \frac{q^m}{|\ker(A)|}= |im(A)|$$
230
231 which, by transposition properties, $|im(A)|=|im(A^T)|$, thus
232 $$|\ker(A)^\perp| = |im(A^T)|$$
233
234 hence,
235 $$(\ker(A)^\perp) = im(A^T)$$
236 \end{adjustwidth}
237
238 Continuing from $qy \pmod q \in (ker(A))^\perp$, we've just seen that $(ker(A))^\perp = im(A^T)$, thus
239 $$\exists s \in \Zz^n ~\text{s.th.}~ qy=A^Ts \pmod q$$
240
241 Therefore, for some
242 $$z \in \Zz^m, ~ qy=A^Ts +qz$$
243 which means that $qy \in \Ll$, by definition of $\Ll$ (\ref{lwe-lattice}). Divide that by $q$, obtaining
244 $$y \in \frac{1}{q} \Ll$$
245
246 Thus, $\forall y \in \Ll^{\perp *}$, we have $y \in \frac{1}{q} \Ll$.
247
248 Hence $\Ll^{\perp *} \subseteq \frac{1}{q} \Ll$.
249 \end{enumerate}
250
251 \vspace{0.6cm}
252 Putting together $(i).~ \Ll^{\perp *} \supseteq \frac{1}{q} \Ll$, and $(ii).~ \Ll^{\perp *} \subseteq \frac{1}{q} \Ll$, we have
253 $$\Ll^{\perp *} = \frac{1}{q} \Ll$$
254\end{proof}
255
256
257\bibliographystyle{unsrt}
258\bibliography{lattices.bib}
259
260\end{document}