betaFeedback

WorksComputer Science

Provably Subexponential Algorithms for Bounded-Error LWE with Few Samples

Abstract

We show that a variant of the Wagner/BKW-style algorithm for LWE of Kirchner and Fouque [KF15] solves decision and search LWE with secrets of size nn over prime moduli q=nκ+o(1)q=n^{κ+o(1)}, for any fixed κ>0κ>0, with errors bounded by exp⁡((ln⁡n)o(1))\exp((\ln n)^{o(1)}), in time 2O(n/ln⁡ln⁡n)2^{O(n/\ln\ln n)} given n+O(n/ln⁡ln⁡n)n+O(n/\ln\ln n) original samples. Further, if each coordinate of the secret is also bounded by exp⁡((ln⁡n)o(1))\exp((\ln n)^{o(1)}), the same time bound holds with errors bounded by no(1)n^{o(1)} and only O(n/ln⁡ln⁡q)O(n/\ln\ln q) samples. Earlier, it was known that Kirchner and Fouque's algorithm could solve LWE with these parameters in subexponential time with a much larger number of samples m=Ω(nlog⁡n)m = Ω(n\log{n}) [HKM18]. Ducas et al. [DEL25] showed that an adaptation of this algorithm could solve the corresponding dual, the SIS∞\mathrm{SIS}^{\infty} problem, with a suitable norm bound q/polylog⁡(n)q/\operatorname{polylog}(n) and m=n+ω(n/ln⁡ln⁡n)m=n+ω(n/\ln\ln n) variables in subexponential time. Whereas their analysis involves interpreting the algorithm in terms of chains of lattices, our approach is quite elementary and is based on bounding the lower moments of a Fourier statistic.

@references.viewer

Contents

  • 1 Introduction 3

  • 1.1 Our results 3

  • 1.2 Prior work 5

  • 2 The full algorithm and its guarantees 7

  • 2.1 Constructing the lists 7

  • 2.2 The decision algorithm 8

  • 2.3 Correctness 9

  • 2.4 Time and space complexity 11

  • 2.5 Search and arbitrary secrets 12

  • 3 Correctness under sample reuse 13

  • 3.1 Describing entries by leaf selections 14

  • 3.2 The moment bounds 15

  • 3.3 The survival advantage of a linear dependency among leaf vectors 16

  • 3.4 Shared subtrees and their weights 17

  • 3.5 Comparing the actual and ideal means, covariance, and the uniform case 19

  • 3.6 Applying the moments to decision 22

  • 4 Proof of the time and space bounds 22

  • 4.1 Enumerating compatible pairs efficiently 22

  • 4.2 Exact sampling and the total cap 24

  • 4.3 Numerical evaluation of the Fourier statistic 25

  • 4.4 Resources of the reductions 27

  • 5 Parameter choices 28

  • 5.1 Computing the parameters 28

  • 5.2 The mean in the ideal model 29

  • 5.3 Verifying the guarantees 30

  • 6 AI Acknowledgments 33

  • A Standard reductions with a fixed number of original samples 37

  • A.1 Bounded-secret search on the same samples 37

  • A.2 Normal form from the reserved samples 38

  • B Concurrent work 39

Introduction

Learning with errors (LWE) asks us to recover a secret from noisy linear equations, or to distinguish those equations from uniformly random data. Its connection to worst-case lattice problems and its use in public-key encryption make the resources needed to solve it an important cryptographic question [29]. Time and memory are two such resources; the number of equations used is another. For example, Regev’s public-key encryption scheme publishes a finite collection of noisy equations under one secret. For this reason, it is important to understand the complexity of the problem given a limited number of equations. We study this complexity for bounded errors and polynomial prime moduli.

Our results

Building on the Wagner/BKW approach to LWE [22] and its provable SIS variant [DEL25], we prove that a variant of the kk-tree algorithm gives decision and search algorithms using a sublinear number of original samples for secrets bounded by exp⁡((ln⁡n)o(1))\exp((\ln n)^{o(1)}) and errors bounded by no(1)n^{o(1)}, and only a sublinear excess over the secret dimension for arbitrary secrets and errors bounded by exp⁡((ln⁡n)o(1))\exp((\ln n)^{o(1)}). With these sample counts, our algorithms succeed with high probability for every fixed secret-error pair satisfying the stated bounds (and not just random secrets and errors).

Model and theorem. In LWE, the input consists of mm noisy linear equations bj=⟨aj,s⟩+ej mod qb_j = \langle a_j, s\rangle+ e_j \bmod q, with unknown secret s∈Fqns \in\mathbb{F}_q^n and error ej∈Fqe_j \in\mathbb{F}_q. We collect their public vectors aja_j as the columns of A∈Fqn×mA \in\mathbb{F}_q^{n\times m} and their right-hand sides in b∈Fqmb \in\mathbb{F}_q^m, so b=ATs+e mod qb = A^\mathsf{T}s + e \bmod q, where Fq=Z/qZ\mathbb{F}_q = \mathbb{Z}/q\mathbb{Z}. The search problem is to recover ss mod qq; the decision problem is to distinguish such (A,b)(A,b) from the case where bb is uniform independently of AA. We take AA to be uniformly random and fix the secret-error pair (s,e)(s,e) independently of AA (note that the error coordinates need not be independent). We denote by Es,Ee≥0E_s,E_e \ge0 the bounds on the absolute values of each coordinate of the secret and error, respectively.

Theorem 1.1 (LWE with few samples). Fix κ>0\kappa> 0 and C>min⁡{1,1/κ}C > \min\{1,1/\kappa\}, and let q=nκ+o(1)q = n^{\kappa+o(1)} run through primes. Consider the LWE problem with mm equations, secret of length nn, and modulus qq, with EsE_s and EeE_e being bounds on the absolute values of the secret and error coordinates, respectively. There is a decision (resp. search) algorithm for LWE in each of the following regimes that succeeds with advantage (resp. probability) 1−o(1)1-o(1) for all large enough nn:

  • Es≤exp⁡((ln⁡n)o(1))E_s \le\exp((\ln n)^{o(1)}), Ee≤no(1)E_e \le n^{o(1)}, and m≥Cn/ln⁡ln⁡qm \ge Cn/\ln\ln q

  • Ee≤exp⁡((ln⁡n)o(1))E_e \le\exp((\ln n)^{o(1)}) and m≥n+Cn/ln⁡ln⁡qm \ge n + Cn/\ln\ln q

The expected running time of these algorithms is 2(1/2+o(1))m/ln⁡q2^{(1/2+o(1))m/\ln q}, and the same bound holds with probability at least 1−1/n1-1/n. They work for uniformly random AA and any (even worst-case) ss and ee fixed independently of AA, as long as they satisfy the above bounds.

:::

We prove Theorem 1.1 at the end of § 2.5. The core is a decision algorithm for bounded secrets and errors. We obtain the search algorithm by adapting Regev’s coordinate-guess reduction [29], and reduce arbitrary-secret instances to bounded-secret ones using the normal-form transformation of Applebaum–Cash–Peikert–Sahai [2]. The second regime has the tighter error bound because normal form makes the original errors the new secret, which must satisfy the first regime’s secret bound. The algorithm is essentially a careful application of Wagner’s kk-tree algorithm [Wag02]. The formal decision algorithm is Algorithm 2, with its correctness stated in Proposition 2.3; § 2.5 gives the extensions to search and arbitrary secrets, and Proposition 2.7 bounds the resources of the full algorithms.

The kk-tree algorithm. Wagner’s kk-tree algorithm addresses the generalized birthday problem: choose one entry from each of kk lists of vectors so that their sum is zero [Wag02]. Its idea is to build candidate sums in stages. For four lists of binary vectors, with addition modulo two, first combine lists 1 and 2 and lists 3 and 4, keeping only sums that vanish on a chosen block of coordinates. Then combine the resulting two lists to find sums that vanish on the remaining coordinates as well. When kk is a power of two, these pairwise merges form a binary tree, with the input lists at its leaves and the final list at its root. Filtering limits intermediate list growth, while sums remain zero on coordinates processed at earlier levels.

For bounded-secret LWE decision, we use the first d=min⁡{m,n}d = \min\{m,n\} original equations and write AA, bb, ee for their restrictions. The goal is to find coefficient vectors zz that control error amplification and the secret’s contribution through AzAz, yielding a detectable LWE signal. We draw kk initial lists at level zero, each with NN independently sampled coefficient vectors. Each vector specifies one weight for each equation. When combining two lists, adding entry vectors xx, yy adds the corresponding weighted equations. At level ii, the submatrix AiA_i formed from nin_i rows of AA filters these sums, keeping only those for which every coordinate of Ai(x+y)A_i(x+y) lies in the centered interval {−Ri,…,Ri}\{-R_i,\ldots,R_i\} mod qq (for a choice of RiR_i’s described later). We then independently subsample the passing sums, keeping each with probability pip_i. Different levels use disjoint sets of rows, and the parameters are chosen to keep intermediate list sizes around the target size NN.

Figure 1 illustrates the case k=4k=4. First merge lists 1 and 2, and lists 3 and 4; then merge the two resulting lists. At each merge, every compatible pair with one entry from the left list and one from the right list is enumerated. Every entry remains available for every compatible pair, so one entry can contribute to many combinations. Each final entry is the sum of exactly one coefficient vector from each of the kk initial lists.

The construction with four initial lists

Figure 1. The construction with four initial lists. Each merge adds one entry from each incoming list, filters the sum, and independently decides whether to keep it. Using an entry leaves it available for other pairs; equal vector values produced by different pairs remain separate entries.

The decision algorithm. A coefficient vector z∈Fqdz \in\mathbb{F}_q^d combines the equations as:

⟨z,b⟩=⟨z,e⟩+⟨Az,s⟩(modq).(1)\langle z,b\rangle= \langle z,e\rangle+ \langle Az,s\rangle\pmod q. \tag*{(1)}

The two terms are the combined error and the secret’s contribution through the combined public vector. The initial coefficient interval controls error amplification, while the filters control the secret contribution. We map each combined right-hand side to a point on the complex unit circle and sum these points over the final list Lroot\mathcal{L}_{\mathrm{root}}:

Z(b)=∑z∈Lrootexp⁡(2πi⟨z,b⟩/q).(2)Z(b) = \sum_{z\in\mathcal{L}_{\mathrm{root}}} \exp(2\pi i\langle z,b\rangle/q). \tag*{(2)}

Every list entry contributes separately, including duplicate vector values. The lists are generated using AA and fresh randomness, without using bb. The construction ensures that all final coefficient vectors are nonzero, so when bb is uniform, every entry contributes a point with mean zero.

For intuition, suppose the final list leads to the above Z(b)Z(b) being a sum of NN independent terms with a common mean of magnitude N−o(1)N^{-o(1)}. Their sum would have mean magnitude N1−o(1)N^{1-o(1)} and fluctuations of order N\sqrt{N}. Under uniform data, its mean would be zero and its typical magnitude of order N\sqrt{N}. A threshold TT near N3/4N^{3/4} would separate these scales. The actual output terms are dependent; our analysis proves that this separation survives their dependence. Algorithm 1 summarizes the algorithm.

Algorithm 1: Bounded-secret LWE decision: informal outline

Input: dd original equations, written as A∈Fqn×dA \in\mathbb{F}_q^{n \times d} and b∈Fqdb \in\mathbb{F}_q^d; parameters, including list sizes, intervals, submatrices, and probabilities, chosen as in Table 2.

ParametersValues
E‾s,E‾e\overline{E}_s,\overline{E}_eE‾s=max⁡{1,⌈Es⌉}, E‾e=max⁡{1,⌈Ee⌉}\overline{E}_s = \max\{1,\lceil E_s\rceil\},\ \overline{E}_e = \max\{1,\lceil E_e\rceil\}.
h,fh,fh=bitlen⁡(2n−1), f=32E‾shh = \operatorname{bitlen}(2n-1),\ f = 32\overline{E}_s h.
k,r,Mik,r,M_ikk is the largest power of two at most min⁡{d,q}/h\min\{d,q\}/h; r=log⁡2k, Mi=k/2ir = \log_2 k,\ M_i = k/2^i.
B,QB,QB=⌊q/(2E‾e)⌋, Q=2B+1B = \left\lfloor\sqrt{q}/(2\overline{E}_e)\right\rfloor,\ Q = 2B+1.
Ri,WiR_i,W_iRi=⌊q/(fMi)⌋, Wi=2Ri+1R_i = \left\lfloor q/(f\sqrt{M_i})\right\rfloor,\ W_i = 2R_i+1.
ℓi,H\ell_i,Hℓi=log⁡2(q/Wi), H=∑i=1rℓi−1\ell_i = \log_2(q/W_i),\ H = \sum_{i=1}^{r}\ell_i^{-1}.
L,NL,NL=min⁡{l∈Z≥1:∑i=1r⌊l/ℓi⌋≥n}, N=2LL = \min\left\{l \in\mathbb{Z}_{\ge1} : \sum_{i=1}^{r}\left\lfloor l/\ell_i\right\rfloor\ge n\right\},\ N = 2^L.
bi,Δ,nib_i,\Delta,n_ibi=⌊L/ℓi⌋, Δ=∑ibi−n, ni=bi−1{i≤Δ}b_i = \lfloor L/\ell_i\rfloor,\ \Delta= \sum_i b_i-n,\ n_i = b_i-\mathbf{1}_{\{i\le\Delta\}}.
ρi,pi\rho_i,p_iρi=(Wi/q)ni, pi=1/(Nρi)\rho_i = (W_i/q)^{n_i},\ p_i = 1/(N\rho_i).
T,KT,KT=2⌈3L/4⌉, K=2kn4NT = 2^{\lceil3L/4\rceil},\ K = 2kn^4N.
PPP=min⁡{j∈Z≥1:2jT≥4K}P = \min\{j \in\mathbb{Z}_{\ge1} : 2^jT \ge4K\}.
D0,εD_0,\varepsilonD0=d−1−2k, ε=4kNrQ−D0D_0 = d-1-2k,\ \varepsilon= 4kNrQ^{-D_0}.

Table 2. Parameter choices for levels 1≤i≤r1 \le i \le r. The row capacities are computed by exact integer comparisons; ℓi\ell_i, HH, D0D_0, ε\varepsilon are analysis quantities.

References

  1. [1]Divesh Aggarwal, Yanlin Chen, Rajendra Kumar, and Yixin Shen. Improved (provable) algorithms for the shortest vector problem via bounded distance decoding. In Markus Bläser and Benjamin Monmege, editors, 38th International Symposium on Theoretical Aspects of Computer Science (STACS 2021), volume 187 of Leibniz International Proceedings in Informatics (LIPIcs), pages 4:1–4:20, Dagstuhl, Germany, 2021. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.STACS.2021.4.DOI
  2. [2]Benny Applebaum, David Cash, Chris Peikert, and Amit Sahai. Fast cryptographic primitives and circular-secure encryption based on hard learning problems. In Advances in Cryptology – CRYPTO 2009, volume 5677 of Lecture Notes in Computer Science, pages 595–618. Springer, 2009. doi:10.1007/978-3-642-03356-8_35.DOI
  3. [3]Divesh Aggarwal, Daniel Dadush, Oded Regev, and Noah Stephens-Davidowitz. Solving the shortest vector problem in 2ⁿ time using discrete Gaussian sampling: Extended abstract. In Proceedings of the Forty-Seventh Annual ACM Symposium on Theory of Computing (STOC 2015), pages 733–742. ACM, 2015. Full version: https://arxiv.org/abs/1412.7994. doi:10.1145/2746539.2746606.
  4. [4]Divesh Aggarwal, Daniel Dadush, and Noah Stephens-Davidowitz. Solving the closest vector problem in 2ⁿ time – the discrete Gaussian strikes again! In 2015 IEEE 56th Annual Symposium on Foundations of Computer Science (FOCS), pages 563–582. IEEE Computer Society, 2015. Full version: https://arxiv.org/abs/1504.01995. doi:10.1109/FOCS.2015.41.
  5. [5]Martin R. Albrecht, Jean-Charles Faugère, Robert Fitzpatrick, and Ludovic Perret. Lazy modulus switching for the BKW algorithm on LWE. In Hugo Krawczyk, editor, Public-Key Cryptography – PKC 2014, volume 8383 of Lecture Notes in Computer Science, pages 429–445. Springer Berlin Heidelberg, Germany, 2014. doi:10.1007/978-3-642-54631-0_25.DOI
  6. [6]Sanjeev Arora and Rong Ge. New algorithms for learning in presence of errors. In Luca Aceto, Monika Henzinger, and Jiri Sgall, editors, ICALP 2011: 38th International Colloquium on Automata, Languages and Programming, Part I, volume 6755 of Lecture Notes in Computer Science, pages 403–415, Zurich, Switzerland, July 4–8, 2011. Springer Berlin Heidelberg, Germany. doi:10.1007/978-3-642-22006-7_34.DOI
  7. [7]Miklós Ajtai. Generating hard instances of lattice problems. In 28th Annual ACM Symposium on Theory of Computing, pages 99–108, Philadelphia, PA, USA, May 22–24, 1996. ACM Press. doi:10.1145/237814.237838.DOI
  8. [8]Divesh Aggarwal, Zeyong Li, and Noah Stephens-Davidowitz. A 2ⁿ⁄²-time algorithm for √n-SVP and √n-Hermite SVP, and an improved time-approximation tradeoff for (H)SVP. In Anne Canteaut and François-Xavier Standaert, editors, Advances in Cryptology – EUROCRYPT 2021, Part I, volume 12696 of Lecture Notes in Computer Science, pages 467–497. Springer, Cham, Switzerland, 2021. doi:10.1007/978-3-030-77870-5_17.DOI
  9. [9]Dorit Aharonov and Oded Regev. Lattice problems in NP ∩ coNP. Journal of the ACM, 52(5):749–765, 2005. doi:10.1145/1089023.1089025.DOI
  10. [10]Divesh Aggarwal and Noah Stephens-Davidowitz. Just take the average! an embarrassingly simple 2ⁿ-time algorithm for SVP (and CVP). In Raimund Seidel, editor, 1st Symposium on Simplicity in Algorithms (SOSA 2018), volume 61 of Open Access Series in Informatics (OASIcs), pages 12:1–12:19, Dagstuhl, Germany, 2018. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/OASIcs.SOSA.2018.12.DOI
  11. [11]Alessandro Budroni, Qian Guo, Thomas Johansson, Erik Mårtensson, and Paul Stankovski Wagner. Making the BKW algorithm practical for LWE. In Karthikeyan Bhargavan, Elisabeth Oswald, and Manoj Prabhakaran, editors, Progress in Cryptology - INDOCRYPT 2020: 21st International Conference in Cryptology in India, volume 12578 of Lecture Notes in Computer Science, pages 417–439. Springer, Cham, Switzerland, 2020. doi:10.1007/978-3-030-65277-7_19.DOI
  12. [12]Avrim Blum, Adam Kalai, and Hal Wasserman. Noise-tolerant learning, the parity problem, and the statistical query model. Journal of the ACM, 50(4):506–519, 2003. doi:10.1145/792538.792543.DOI
  13. [13]Zvika Brakerski, Adeline Langlois, Chris Peikert, Oded Regev, and Damien Stehlé. Classical hardness of learning with errors. In Proceedings of the Forty-Fifth Annual ACM Symposium on Theory of Computing (STOC 2013), pages 575–584. ACM, 2013. Full version: https://arxiv.org/abs/1306.0281. doi:10.1145/2488608.2488680.
  14. [14]Richard P. Brent and Paul Zimmermann. Modern Computer Arithmetic. Cambridge University Press, 2010. URL: https://members.loria.fr/PZimmermann/mca/mca-cup-0.5.9.pdf.DOI
  15. [15]Zhili Chen, Kaijie Jiang, Anyu Wang, and Chuanqi Zhang. A subexponential algorithm for binary LWE with sublinear samples. Cryptology ePrint Archive, Paper 2026/2289, 2026. Uploaded 1 October 2026. URL: https://eprint.iacr.org/2026/2289.
  16. [17]Qian Guo, Thomas Johansson, Erik Mårtensson, and Paul Stankovski. Coded-BKW with sieving. In Tsuyoshi Takagi and Thomas Peyrin, editors, Advances in Cryptology – ASIACRYPT 2017, Part I, volume 10624 of Lecture Notes in Computer Science, pages 323–346. Springer, Cham, Switzerland, 2017. doi:10.1007/978-3-319-70694-8_12.DOI
  17. [18]Qian Guo, Erik Mårtensson, and Paul Stankovski Wagner. On the sample complexity of solving LWE using BKW-style algorithms. In 2021 IEEE International Symposium on Information Theory (ISIT), pages 2405–2410. IEEE, 2021. doi:10.1109/ISIT45174.2021.9518190.DOI
  18. [20]Gottfried Herold, Elena Kirshanova, and Alexander May. On the asymptotic complexity of solving LWE. Designs, Codes and Cryptography, 86(1):55–83, 2018. doi:10.1007/s10623-016-0326-0.DOI
  19. [21]Antoine Joux, Hunter Kippen, and Julian Loss. A concrete analysis of Wagner’s k-list algorithm over Zₚ. Cryptology ePrint Archive, Report 2024/282, 2024. URL: https://eprint.iacr.org/2024/282.DOI
  20. [22]Paul Kirchner and Pierre-Alain Fouque. An improved BKW algorithm for LWE with applications to cryptography and lattices. In Rosario Gennaro and Matthew J. B. Robshaw, editors, Advances in Cryptology – CRYPTO 2015, Part I, volume 9215 of Lecture Notes in Computer Science, pages 43–62, Santa Barbara, CA, USA, August 16–20, 2015. Springer Berlin Heidelberg, Germany. doi:10.1007/978-3-662-47989-6_3.
  21. [23]Éric Levieil and Pierre-Alain Fouque. An improved LPN algorithm. In Roberto De Prisco and Moti Yung, editors, Security and Cryptography for Networks (SCN 2006), volume 4116 of Lecture Notes in Computer Science, pages 348–359. Springer Berlin Heidelberg, Germany, 2006. doi:10.1007/11832072_24.DOI
  22. [25]Vadim Lyubashevsky. The parity problem in the presence of noise, decoding random linear codes, and the subset sum problem. In Approximation, Randomization and Combinatorial Optimization. Algorithms and Techniques (APPROX/RANDOM 2005), volume 3624 of Lecture Notes in Computer Science, pages 378–389. Springer, 2005. doi:10.1007/11538462_32.DOI
  23. [26]Daniele Micciancio and Chris Peikert. Hardness of SIS and LWE with small parameters. In Ran Canetti and Juan A. Garay, editors, Advances in Cryptology – CRYPTO 2013, Part I, volume 8042 of Lecture Notes in Computer Science, pages 21–39, Santa Barbara, CA, USA, August 18–22, 2013. Springer Berlin Heidelberg, Germany. doi:10.1007/978-3-642-40041-4_2.DOI
  24. [27]Daniele Micciancio and Oded Regev. Worst-case to average-case reductions based on Gaussian measures. SIAM Journal on Computing, 37(1):267–302, 2007. doi:10.1137/S0097539705447360.DOI
  25. [28]Lorenz Minder and Alistair Sinclair. The extended k-tree algorithm. Journal of Cryptology, 25(2):349–382, April 2012. doi:10.1007/s00145-011-9097-y.DOI
  26. [29]Oded Regev. On lattices, learning with errors, random linear codes, and cryptography. In Harold N. Gabow and Ronald Fagin, editors, 37th Annual ACM Symposium on Theory of Computing, pages 84–93, Baltimore, MD, USA, May 22–24, 2005. ACM Press. doi:10.1145/1060590.1060603.DOI

Paper details

vlnc:W_juvctr4w
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 9

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents