mirror of
https://github.com/lux-apps/papers.git
synced 2026-10-30 18:15:21 +00:00
Restructured from flat .tex/.pdf files into per-paper subdirectories. Added Antje Worring as co-author on all papers. Synced PDFs to pdfs/ for download site.
41 lines
1.5 KiB
TeX
41 lines
1.5 KiB
TeX
\section{Mathematical Foundations}
|
|
|
|
|
|
\subsection{Roots of Unity in $\mathbb{Z}_q$}
|
|
|
|
A primitive $n$-th root of unity $\omega \in \mathbb{Z}_q$ satisfies $\omega^n \equiv 1
|
|
\pmod{q}$ and $\omega^k \not\equiv 1 \pmod{q}$ for $0 < k < n$. Such a root exists if
|
|
and only if $n \mid (q - 1)$.
|
|
|
|
For ML-KEM: $q = 3329$, $n = 256$. Since $3329 - 1 = 3328 = 2^5 \cdot 104 = 2^5 \cdot 8 \cdot 13$,
|
|
and $256 = 2^8$, we need $2^8 \mid (q - 1)$. But $3328 = 13 \cdot 256$, so $256 \mid 3328$,
|
|
confirming that a primitive 256th root of unity exists.
|
|
|
|
For ML-DSA: $q = 8380417$, $n = 256$. $8380416 = 2^{23} \cdot 3 \cdot 1$... we verify
|
|
$256 \mid 8380416$.
|
|
|
|
\subsection{The Forward Transform}
|
|
|
|
\begin{definition}[Forward NTT]
|
|
Given polynomial $a = (a_0, a_1, \ldots, a_{n-1})$ and primitive $2n$-th root of unity
|
|
$\zeta$ (so $\zeta^2$ is a primitive $n$-th root):
|
|
\[
|
|
\hat{a}_j = \sum_{i=0}^{n-1} a_i \cdot \zeta^{(2 \cdot \text{brv}(j) + 1) \cdot i} \pmod{q}
|
|
\]
|
|
where $\text{brv}(j)$ is the bit-reversal of $j$ in $\log_2(n)$ bits.
|
|
\end{definition}
|
|
|
|
In practice, we use the Cooley-Tukey decomposition which computes this via $\log_2(n)$
|
|
layers of butterfly operations.
|
|
|
|
\subsection{The Inverse Transform}
|
|
|
|
The inverse NTT (INTT) recovers coefficient form from evaluation form:
|
|
\[
|
|
a_i = n^{-1} \sum_{j=0}^{n-1} \hat{a}_j \cdot \zeta^{-(2 \cdot \text{brv}(j) + 1) \cdot i} \pmod{q}
|
|
\]
|
|
|
|
The factor $n^{-1}$ is the modular inverse of $n$ modulo $q$.
|
|
|
|
%% ============================================================
|