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.
25 lines
1.2 KiB
TeX
25 lines
1.2 KiB
TeX
\section{Common Implementation Pitfalls}
|
|
|
|
|
|
\begin{enumerate}
|
|
\item \textbf{Timing leaks in rejection sampling}: The number of loop iterations in
|
|
ML-DSA signing depends on the secret key. Use constant-time comparison and ensure
|
|
the loop structure does not leak via timing. Our implementation always performs the
|
|
norm check but masks the result.
|
|
|
|
\item \textbf{Incorrect NTT domain management}: NTT and inverse NTT must be applied in
|
|
the right order. Adding polynomials in different domains (one in NTT form, one in
|
|
coefficient form) is a common bug. Our type system distinguishes \texttt{Poly} from
|
|
\texttt{NTTPoly} at the Go type level.
|
|
|
|
\item \textbf{Missing modular reduction}: Coefficients must be reduced modulo $q$ after
|
|
every arithmetic operation. A single missed reduction can cause subtle correctness
|
|
failures that appear only for specific inputs.
|
|
|
|
\item \textbf{Endianness}: NIST test vectors use little-endian byte encoding for
|
|
polynomials. Mixing up endianness produces code that passes self-consistency tests
|
|
but fails against reference implementations.
|
|
\end{enumerate}
|
|
|
|
%% ============================================================
|