arnaucube
arnaucube/mathPublic Self-hosted repository
Lattices notes - proof of L^{\perp *} = 1/q L (#25)

* add notes on dual lattices (L=q L^{\perp *})

* polish proof on dual lattices

* complete dual lattices proof

* Hermite Normal Form, add remark on dual basis of lattice

* fix typos
arnaucube git@arnaucube.com
Wed, 12 Aug 2026 21:24:25 +0200
commit

f1f7c459556930d3a831a8c2ef36a041596385a2

parent

b0a7353c49546b1c1e0fd5c2e5f8b01f85d50000

4 files changed, 305 insertions(+), 0 deletions(-)

jump to
M .github/workflows/typos.toml → .github/workflows/typos.toml

@@ -13,6 +13,7 @@ extenaion = "extension"

# strings that are not a typo: thm = "thm" +MSIS = "MSIS" # equations stuff ba = "ba"
M .gitignore → .gitignore

@@ -15,3 +15,4 @@ galois-theory-notes.bib

commutative-algebra-notes.bib algebraic-coding-theory-notes.bib pinocchio-groth16.bib +lattices.bib
A lattices.tex

@@ -0,0 +1,303 @@

+\documentclass{article} +\usepackage[utf8]{inputenc} +\usepackage{amsfonts} +\usepackage{amsthm} +\usepackage{amsmath} +\usepackage{enumerate} +\usepackage{hyperref} +\usepackage{amssymb} +\usepackage{tikz} % diagram +\usepackage{changepage} % for adjustwidth + +\begin{filecontents}[overwrite]{lattices.bib} +@misc{chris-peikert, + author = {Chris Peikert}, + title = {{A decade of lattice cryptography}}, + year = {2016} +} +@misc{matan, + author = {Matan Prasma}, + title = {{Lattices, an elementary and rigorous account}}, + year = {2024} +} +@misc{slides-micciano, + author = {Daniele Micciancio}, + title = {{Introduction to Lattices}}, + year = {2024} +} +@misc{micciano-regev, + author = {Daniele Micciancio and Oded Regev}, + title = {{Lattice-based Cryptography}}, + year = {2008} +} +@misc{menezes, + author = {Alfred Menezes}, + title = {{A Gentle Introduction to Lattice-Based Cryptography}}, + year = {2026} +} +@misc{cynthia-dwork, + author = {Cynthia Dwork}, + title = {{Lattices and Their Application to Cryptography}}, + year = {1998} +} +\end{filecontents} +\nocite{*} + + +\theoremstyle{definition} + +\newtheorem{thm}{Theorem}[section] +\newtheorem{lemma}[thm]{Lemma} +\newtheorem{prop}[thm]{Proposition} +\newtheorem{cor}[thm]{Corollary} +\newtheorem{defn}[thm]{Definition} +\newtheorem{remark}[thm]{Remark} +\newtheorem{ex}[thm]{Example} + +\newcommand{\Rr}{\mathbb{R}} +\newcommand{\Zz}{\mathbb{Z}} +\newcommand{\Ll}{\mathcal{L}} + +\title{Notes on Lattices} +\author{arnaucube} +\date{2026} + +\begin{document} + +\maketitle + +\begin{abstract} + Notes taken while studying lattice-based cryptography. + + Usually while reading books and papers I take handwritten notes in paper notebooks, this document contains some of them re-written to $LaTeX$. +\end{abstract} + +\tableofcontents + +\section{Lattices} +\subsection{Hard problems} + +\begin{defn}[SVP (Shortest Vector Problem)] +find a shortest non-zero vector $x \in \Ll$, ie. that minimizes the Euclidean norm $||x||$, that is $\lambda_1(\Ll)=||x||$. +\end{defn} + +\begin{defn}[CVP (Closest Vector Problem)] +given 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||$. +\end{defn} + +\begin{defn}[NTRU key recovery problem] +Given $h(x)$, find ternary polynomials $f, g \in \mathcal{T}$ satisfying +$$f(x) \cdot h(x) = g(x) \pmod q \in R_q$$ +Where $R_q = \Zz_q[X]/(X^n-1)$. +\end{defn} + +\begin{defn}[SIS (Short Integer Solution)] +Given $q \in \Zz$ and matrix $A \in \Zz_q^{m \times n}$, find a non-zero short $z \in \Zz^n$ s.th. +$$A \cdot z = 0 \pmod q$$ + +\small{"short": $z \in \{B, B\}^n$ for some bound $B$, often $z \in \{-1, 0, 1 \}^n$.} +\end{defn} + +The set of all solutions to the SIS problem forms the (q-ary) lattice +$$\Lambda^{\perp}_q(A) = \{ z \in \Zz^n ~|~ A z = 0 \in \Zz_q^m \} \supseteq \Zz_q^n$$ +where the SIS problem becomes the SVP for $\Lambda_q^{\perp}(A)$ + +\begin{itemize} +\item LLL algorithm is used to solve SVP and CVP. + + \item Both SVP and CVP become computationally difficult (NP hard) as the lattice dimension $n$ grows. +\end{itemize} + + + +\begin{defn}[Ring SIS (Ring Short Integer Solution)] +given 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 + +$$A z = \sum_i a_i \cdot z_i = 0 \in R_q$$ +\end{defn} + +\begin{defn}[MSIS (Module Short Integer Solution)] +given 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 + +$$A z = 0 \in R_q^m$$ +$$ie.~ \sum_i a_{ij} \cdot z_j = 0 \in R_q, ~~for~ i=1, \ldots, m$$ +\end{defn} + +Notice that Module-SIS is a Ring-SIS with $rank=1$ ($m=1$). + +The next form is useful to compress the size of a SIS matrix by $n$ columns: +\begin{defn}[Hermite Normal Form (HNF)] + Assume the leftmost $n$ columns $A_1 \in \Zz_q^{n \times n}$ of $A=[A_1|A_2] \in \Zz_q^{n \times m}$ form an invertible matrix. + + Then replace $A$ by + $$A_1^{-1} \cdot A = [ I_n ~|~ \overline{A} = A_1^{-1} \cdot A_2]$$ + and threat the $I_n$ submatrix as implicit. + + Then, $A$ and $[I_n ~|~ \overline{A}]$ have exactly the same set of short SIS solutions. +\end{defn} + +\begin{defn}[LWE distribution] + $s \in \Zz_q^n$ (secret), $a \in \Zz_q^n$, $e \in \Xi$, output + $$(a, b= \langle s, a \rangle + e \pmod q) \in (\Zz_q^n \times \Zz_q)$$ +\end{defn} + +\begin{defn}[Search-LWE] + given $m$ independent samples $(a_i, b_i) \in \Zz_q^n \times \Zz_q$, for a uniform $s \in \Zz_q^n$ (fixed for all samples), find $s$. +\end{defn} +\begin{defn}[Decision-LWE] + given $m$ independent samples $(a_i, b_i) \in \Zz_q^n \times \Zz_q$, distinguish which one is not random and it is an actual instance. +\end{defn} + + + +\subsection{Dual lattices} + +From previous section, we have LWE-Lattice and SIS-Lattice: + + +Search-LWE can be seen as a Bounded-Distance Decoding (BDD) problem on q-ary m-dimensional integer lattices:\\ +for LWE samples, vector $b$ is relatively close to exactly one vector in the LWE lattice: +\begin{defn}[LWE Lattice] \label{lwe-lattice} + A LWE-Lattice $\Ll$ is defined + \begin{align*} + \Ll &= \{ A^T s ~|~ s \in \Zz_q^n \} + q \Zz^m\\ + &= \{ A^T s + qz ~|~ s \in \Zz_q^n, z \in \Zz^m \} + \end{align*} +\end{defn} + +SIS can be seen as a SVP on q-ary m-dimensional lattices: +\begin{defn}[SIS-Lattice] \label{sis-lattice} + A SIS-Lattice $\Ll$ is defined +$$\Ll^\perp = \{ z \in \Zz^m ~|~ Az=0 \in \Zz_q^n \} \supseteq q \Zz^m$$ +\end{defn} + + +\begin{defn}[Dual of a lattice] \label{dual-lattice} + For a lattice $\Ll$, its dual is + $$\Ll^* = \{ y \in \Rr^m ~|~ \langle y, x \rangle \in \Zz ~\forall~ x \in \Ll \}$$ +\end{defn} +The dual lattice consists of all vectors that measure lattice points with integer-valued linear measurements. + +\begin{remark} + For a lattice basis $B=(b_1, \ldots, b_n)$, the dual basis $B^*=(b_1^*, \ldots, b_n^*)$ is the unique basis satisfying + $$ + \langle b_i^*, b_j \rangle + = \delta_{ij} = + \begin{cases} + 1, & \text{if } i = j, \\ + 0, & \text{if } i \neq j + \end{cases} + $$ + where $\delta_{ij}$ is the Kronecker delta. +\end{remark} + +\begin{lemma} + $$\Ll = q \Ll^{\perp *} ~\text{ie.}~ \frac{1}{q} \Ll = \Ll^{\perp *}$$ +\end{lemma} +\begin{proof} + \begin{enumerate}[i.] + \item + Take $y \in \frac{1}{q} \Ll$, then by \ref{lwe-lattice}, $\exists~ s \in \Zz^n, z \in \Zz^m$ such that + $$y = \frac{1}{q} (A^Ts + qz) = \frac{1}{q} A^T s +z$$ + + Let $x \in \Ll^\perp$. By definition (\ref{sis-lattice}) $Ax=0 \pmod q$, therefore $\exists~ k \in \Zz^n$ such that $Ax = qk$. + + Compute + \begin{align*} + \langle y, x \rangle &= \langle \frac{1}{q} A^T s + z, x \rangle\\ + &= \frac{1}{q} \langle A^T s, x \rangle + \langle z, x \rangle\\ + &= \frac{1}{q} \langle s, Ax \rangle + \langle z, x \rangle\\ + &= \frac{1}{q} \langle s, qk \rangle + \langle z, x \rangle\\ + &= \langle s, k \rangle + \langle z, x \rangle + \end{align*} + and $\langle s, k \rangle + \langle z, x \rangle \in \Zz$, since each of $s, k, z, x \in \Zz$ separately. + + Thus $\langle y, x \rangle \in \Zz$, hence by \ref{dual-lattice}, $y \in \Ll^{\perp *}$. + + We started from $y \in \frac{1}{q}\Ll$, so, now we have + $$y \in \Ll^{\perp *} ~\forall~ y \in \frac{1}{q} \Ll$$ + therefore + $$\Ll^{\perp *} \supseteq \frac{1}{q} \Ll$$ + + \item + Now we prove the reverse inclusion. Take $y \in \Ll^{\perp *}$. + + Observe that $q \Zz^m \subseteq \Ll^\perp$, because + $$\forall z \in \Zz^m,~ A(qz) = qAz = q 0 = 0 \pmod q$$ + + Since $y \in \Ll^{\perp *}$, we must have $\langle y, qz \rangle \in \Zz ~\forall~ z \in \Zz^m$. + + 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). + + We know that $\langle y, qz \rangle \in \Zz ~\forall z \in \Zz^m$ (including $z=e_i$), thus, for + $q e_i = (0, \ldots, 0, q, 0, \ldots, 0)$, + $$\langle y, q e_i \rangle = q \langle y, e_i \rangle = q \cdot y_i$$ + since $\langle y, e_i \rangle = y_i$ (extracts the i-th position from $y$). + + 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$ + + This argument works $\forall i \in [m]$, that is, $q y_1, \ldots, q y_m \in \Zz$. Therefore + $$qy \in \Zz^m ~\forall~ y \in \Ll^{\perp *}$$ + + 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}). + + Since $y \in \Ll^{\perp *}$, by the definition of $\Ll^{\perp *}$ (\ref{dual-lattice}), $\langle y, x \rangle \in \Zz$. Multiply it by $q$, + $$ q \langle y, x \rangle = \langle qy, x \rangle \in q \Zz$$ + hence $\langle qy, x \rangle = 0 \pmod q$, thus $qy \pmod q \in ker(A)^\perp$. + + \begin{adjustwidth}{4em}{0pt} + We'll now prove the following identity, valid for every integer $q\geq 2$, which we will use later: + $$(\ker A)^\perp=im(A^T)$$ + where $A:\Zz_q^m \to \Zz_q^n$. + + Let $y \in im(A^T)$. Then $\exists~ s \in \Zz_q^n$ such that $y=A^Ts$. + + 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)$: + $$\langle y,x\rangle = \langle A^Ts,x\rangle = \langle s,Ax\rangle = 0$$ + + 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$. + + Therefore, + $$im(A^T) \subseteq (\ker(A))^\perp$$ + + For the reverse inclusion, it suffices to show that both sets have the same number of elements: + + By the First Isomorphism Theorem, + $$|im(A)| = \frac{ |\Zz_q^m|}{|\ker(A)|} = \frac{q^m}{|\ker(A)|}$$ + + Notice that for every subgroup $K \subseteq \Zz_q^m$, the dot product on $\Zz_q^m$ is nondegenerate, therefore + $$|K^\perp| = \frac{q^m}{|K|}$$ + + so, applied to $\ker(A)$, + $$|\ker(A)^\perp| = \frac{q^m}{|\ker(A)|}= |im(A)|$$ + + which, by transposition properties, $|im(A)|=|im(A^T)|$, thus + $$|\ker(A)^\perp| = |im(A^T)|$$ + + hence, + $$(\ker(A)^\perp) = im(A^T)$$ + \end{adjustwidth} + + Continuing from $qy \pmod q \in (ker(A))^\perp$, we've just seen that $(ker(A))^\perp = im(A^T)$, thus + $$\exists s \in \Zz^n ~\text{s.th.}~ qy=A^Ts \pmod q$$ + + Therefore, for some + $$z \in \Zz^m, ~ qy=A^Ts +qz$$ + which means that $qy \in \Ll$, by definition of $\Ll$ (\ref{lwe-lattice}). Divide that by $q$, obtaining + $$y \in \frac{1}{q} \Ll$$ + + Thus, $\forall y \in \Ll^{\perp *}$, we have $y \in \frac{1}{q} \Ll$. + + Hence $\Ll^{\perp *} \subseteq \frac{1}{q} \Ll$. + \end{enumerate} + + \vspace{0.6cm} + Putting together $(i).~ \Ll^{\perp *} \supseteq \frac{1}{q} \Ll$, and $(ii).~ \Ll^{\perp *} \subseteq \frac{1}{q} \Ll$, we have + $$\Ll^{\perp *} = \frac{1}{q} \Ll$$ +\end{proof} + + +\bibliographystyle{unsrt} +\bibliography{lattices.bib} + +\end{document}