Abstract
"Salsa Fresca" introduces a significantly more efficient machine learning attack on the Learning With Errors (LWE) problem, a mathematical cornerstone of post-quantum cryptography. By combining faster lattice-based preprocessing, novel angular embeddings, and the first use of pre-training for LWE, the authors achieved a 250x reduction in total compute cost and successfully recovered secrets for the $n=1024$ dimension—a first for ML-based attacks.
Introduction
The security of our future digital infrastructure relies on the hardness of the Learning With Errors (LWE) problem. LWE is the foundation for NIST-standardized post-quantum cryptography (PQC) and Homomorphic Encryption (HE). Essentially, LWE asks an attacker to solve a system of linear equations ($b = As + e \pmod q$) where a small amount of "noise" ($e$) has been added to hide the secret ($s$).
While traditional lattice-reduction attacks (like BKZ) are the gold standard, recent research has explored using Transformers to "learn" the secret from eavesdropped samples. However, these ML attacks faced three major hurdles: computational cost of preprocessing, sample inefficiency, and scaling to real-world dimensions like $n=1024$.
Methodology
The authors propose three key innovations to transform the previous "Salsa" attack into "Salsa Fresca":
- Faster Preprocessing: They replaced the slow BKZ2.0 algorithm with Flatter, a newer, faster lattice reduction method, interleaved with "polishing" steps. This reduced the time to process a single matrix from 35 days to just 13–26 hours.
- Angular Embeddings: Standard Transformers use a discrete vocabulary. Salsa Fresca maps integers modulo $q$ onto a 2D unit circle using sine and cosine functions: $(\sin(2\pi a/q), \cos(2\pi a/q))$. This provides a crucial inductive bias: the model "understands" that $q-1$ is numerically close to $0$ in a modular sense. It also halves the input sequence length, making the Transformer much faster.
- Model Pre-training: This is the first work to apply pre-training to LWE. The model is first trained on 150 different "toy" secrets to learn the general structure of LWE problems. When faced with a new, real secret, the pre-trained model requires significantly fewer samples to "fine-tune" and succeed.
Experimental Setup
The researchers used synthetically generated LWE samples, specifically targeting parameters used in Homomorphic Encryption standards:
- Dimensions ($n$): 512, 768, and 1024.
- Secrets: Sparse binary and ternary secrets (where most entries are 0, and others are 1 or -1).
- Scale: They generated and reduced millions of LWE samples to create training sets.
Key Results
- 250x Total Efficiency Gain: A combination of 25x faster preprocessing and 10x better sample efficiency.
- Scaling Milestone: Successfully recovered sparse binary secrets in dimension $n=1024$. This is the smallest dimension used in practical HE applications and was previously unreachable for ML attacks.
- Speed: For $n=512$, the total attack time was reduced to approximately 50 hours (down from weeks in prior work).
Discussion and Conclusion
Mapping discrete integers to a continuous circle (angular embedding) is a powerful way to teach a neural network modular arithmetic, preventing the model from treating $0$ and $q-1$ as being at opposite ends of a spectrum. Furthermore, the success of pre-training suggests that there are universal features in LWE problems that a model can learn.
Despite the breakthroughs, the authors note several limitations. The attack does not yet threaten the most secure "concrete" parameters used in the highest security tiers of the HE Standard. Additionally, the attack still relies on a classical lattice reduction "head start." Future work will likely focus on even more specialized architectures designed for the "discrete torus" geometry of LWE.
Summary updated