































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
































Abstract As lattice cryptography becomes more widely used in practice, there is an increasing need for further cryptanalytic effort and higher-confidence security estimates for its underlying computational problems. Of particular interest is a class of problems used in many recent implementations, namely, Learning With Errors (LWE), its more efficient ring-based variant Ring-LWE, and their “deterministic error” counterparts Learning With Rounding (LWR) and Ring-LWR. To facilitate such analysis, in this work we give a broad collection of challenges for concrete Ring-LWE and Ring-LWR instantiations over cyclotomics rings. The challenges cover a wide variety of instantiations, involving two-power and non-two-power cyclotomics; moduli of various sizes and arithmetic forms; small and large numbers of samples; and error distributions satisfying the bounds from worst-case hardness theorems related to ideal lattices, along with narrower errors that still appear to yield hard instantiations. We estimate the hardness of each challenge by giving the approximate Hermite factor and BKZ block size needed to solve it via lattice-reduction attacks. A central issue in the creation of challenges for LWE-like problems is that dishonestly generated instances can be much harder to solve than properly generated ones, or even impossible. To address this, we devise and implement a simple, non-interactive, publicly verifiable protocol which gives reasonably convincing evidence that the challenges are properly distributed, or at least not much harder than claimed.
*Georgia Institute of Technology and University of Michigan. †Computer Science and Engineering, University of Michigan. This material is based upon work supported by the National Science Foundation under CAREER Award CCF-1054495 and CNS-1606362 and by a Google Research Award. The views expressed are those of the authors and do not necessarily reflect the official policy or position of the National Science Foundation or the Sloan Foundation.
1 Introduction
Lattice-based cryptosystems are some of the leading “post-quantum” candidates that are plausibly secure against potential large-scale quantum computers. As lattice cryptography begins a transition to widespread deployment (see, e.g., [Ste14 , LS16, Bra16 ]), there is a pressing need for increased cryptanalytic effort and higher-confidence hardness estimates for its underlying computational problems. Of particular interest is a class of problems used in many recent implementations (e.g., [HS, GLP12, DDLL13 , BCNS15, ADPS16 , CP16a, BCD+16]), namely:
∙ Learning With Errors (LWE) [Reg05], ∙ its more efficient ring-based variant Ring-LWE [LPR10], and ∙ their “deterministic error” counterparts Learning With Rounding (LWR) and Ring-LWR [BPR12].
Informally, the search version of the Ring-LWE problem is to find a secret ring element 𝑠 given multiple random “noisy ring products” with 𝑠, while the decision version is to distinguish such noisy products from uniformly random ring elements. More precisely, Ring-LWE is actually a family of problems, with a concrete instantiation given by the following parameters:^1
The Ring-LWE search problem is to find a uniformly random secret 𝑠 ∈ 𝑅𝑞, given independent samples of the form (𝑎𝑖 , 𝑏𝑖 = 𝑠 · 𝑎𝑖 + 𝑒𝑖) ∈ 𝑅𝑞 × 𝑅𝑞,
where each 𝑎𝑖 ∈ 𝑅𝑞 is uniformly random and each 𝑒𝑖 ← 𝜒 is drawn from the error distribution. The decision problem is to distinguish samples of the above form from uniformly random samples over 𝑅𝑞 × 𝑅𝑞. Ring-LWR is a “derandomized” variant of Ring-LWE in which the random errors are replaced by deterministic “rounding” to a smaller modulus 𝑝 < 𝑞. Specifically, the search problem is to find a random secret 𝑠 ∈ 𝑅𝑞 given independent samples
(𝑎𝑖 , 𝑏𝑖 = ⌊𝑠 · 𝑎𝑖⌉𝑝) ∈ 𝑅𝑞 × 𝑅𝑝,
where each 𝑎𝑖 ∈ 𝑅𝑞 is uniformly random, and ⌊·⌉𝑝 : 𝑅𝑞 → 𝑅𝑝 denotes the function that rounds each coefficient 𝑐𝑗 ∈ Z𝑞 of the input (with respect to an appropriate basis) to ⌊ 𝑝𝑞 · 𝑐𝑗 ⌉ ∈ Z𝑝. The decision problem is to distinguish such samples from (𝑎𝑖, ⌊𝑢𝑖⌉𝑝), where 𝑎𝑖, 𝑢𝑖 ∈ 𝑅𝑞 are uniformly random and independent. (Notice that ⌊𝑢𝑖⌉𝑝 ∈ 𝑅𝑝 itself is uniformly random when 𝑝 divides 𝑞, but otherwise is biased.)
(^1) This actually describes the “tweaked,” discretized form of Ring-LWE, which for convenience avoids a special ideal denoted 𝑅∨. This form is equivalent to the original “untweaked” form under a suitable change to the error distribution; see Section 2.3 for details.
random one, which has no solution. A dishonest challenger could therefore publish unsolvable challenges, and point to the absence of breaks as bogus evidence of hardness.^4 To deal with this issue, we design and implement a simple, non-interactive, and publicly verifiable “cut-and-choose” protocol that gives reasonably convincing evidence that the challenge instances are properly distributed, or at least not much harder than claimed. In short, for each Ring-LWE/LWR instantiation the challenger announces many timestamped instances. At a later time, the challenger reveals the secrets for all but a random one of the instances, as determined by a publicly verifiable source of randomness. (Concretely, we use the NIST randomness beacon [ NIS11].) Anyone can then verify that all the revealed instances look “proper,” which makes it likely that the remaining instance is proper as well. Otherwise, the challenger would have had been caught with rather larger probability—assuming, of course, that it cannot predict or influence the randomness source. See Section 3 for further details and discussion of some potential alternatives, which turn out not to give the kind of guarantees we desire. And see Section 1.3 for discussion of a recent approach to LWE challenges that aims for different goals.
Search versus decision. We stress that our challenges are for search versions of Ring-LWE/LWR, whereas many cryptographic applications rely on the conjectured hardness of solving decision with noticeable advantage. Unfortunately, it appears impractical to give meaningful challenges for the latter regime. This is because detecting a tiny advantage requires a very large number of instances, and a corresponding increase in effort by the attacker. And even for relatively large advantages, the naïve method of confirming the solutions would require the challenger to retain the correct answers and honestly compare them to the attacker’s, because the attacker cannot confirm its own answers (unlike with the search problem, where it can).^5 Nevertheless, we gain confidence in the usefulness of search challenges from the fact that the known classes of attack against decision either proceed by directly solving search, or can be adapted to do so with relatively little or no extra overhead. (See [ LP11, LN13, ADPS16].) In addition, there are search-to-decision reductions [LPR10, Section 5] which provide evidence that decision cannot be much easier than search (though the known reductions incur some as-yet unoptimized overhead). Finally, we note that practical constructions of, e.g., key exchange as in [BCD+ 16 ] can use “hashed” variants, for which hardness of search can be sufficient for a reductionist security analysis in the random oracle model.
Implementation. Our free and open-source challenge generator and verifier are implemented using the recent Λ∘𝜆 (pronounced “L O L”) framework for lattice- and ring-based cryptography [CP16a, CP16b]. In particular, Λ∘𝜆 supports arbitrary cyclotomics and sampling from the theory-recommended Ring-LWE distributions we use in our instantiations (see Section 1.2 for details). We stress that all the challenge data is formatted using Google’s platform- and language-neutral protocol buffers (protobuf) framework [Goo08 ]. This allows the challenges to be read using most popular programming languages, via parsers that are auto- matically generated from our protobuf message specifications. The Ring-LWE challenges website [RLW16 ] contains auto-generated parsers, and simple examples demonstrating their use, in C++, Java, Python, and Haskell. (The protobuf specifications are given in Appendix C, and with the challenges themselves.) In addi- tion, Λ∘𝜆 includes C++ code for cyclotomic ring operations, which can be used by alternative implementations written in other languages. (^4) This appears qualitatively different from problems like integer factorization and discrete logarithms, where deviating from the prescribed distributions seems like it can only make challenges easier to solve, or at least no harder. (^5) We considered more sophisticated non-interactive methods for confirming answers, like using a “fuzzy extractor” [DORS04] to encrypt a secret that can only be recovered by solving a large enough fraction of decision challenges. Such methods seem tantalizing, but are complex to implement and bandwidth-intensive in our setting, so we leave this direction to future work.
Our challenge instantiations cover a wide range of parameters for several aspects of the Ring-LWE/LWR problems, including: size and form of the cyclotomic index and corresponding dimension; width of the error distribution; size and arithmetic form of the modulus; and number of samples. Each of these parameters has some degree of influence on the conjectured hardness of a Ring-LWE instantiation, as we discuss below. For each challenge instantiation we give a qualitative hardness estimate, ranging from “toy” and “easy” to “very hard,” along with an approximate block size that should allow the Block Korkin-Zolotarev (BKZ) basis-reduction algorithm to solve the instantiation. (See Appendix D.) We intentionally do not estimate concrete “bits of security” (though BKZ block size is a useful proxy), since any such estimates would necessarily be very imprecise. We hope that real-world efforts to break the challenges will provide more precision. The easier categories represent instantiations that should be breakable using standard lattice algorithms on desktop-class machines in somewhere between a few minutes and a few months, whereas the hardest category should be out of reach even for nation-state adversaries—based on the current state of public cryptanalysis, at least. We deduce our hardness estimates by approximating the Hermite factors and BKZ block sizes needed to solve the instantiations via lattice attacks, which usually represent the most practically efficient attacks against Ring-LWE/LWR. See Section 5 for further details.
1.2.1 Cyclotomic Ring
A primary parameter influencing Ring-LWE’s conjectured hardness is the degree (or dimension) of the ring 𝑅, which in the cyclotomic case is the totient 𝑛 = 𝜙(𝑚) of the index (or conductor) 𝑚. Thus far, most implementations have used two-power cyclotomic rings, because they have the computationally and analytically simplest form 𝑅 ∼= Z[𝑋]/(𝑋𝑛^ + 1), where 𝑛 is a power of two. Moreover, sampling from a spherical Gaussian in their “canonical” geometry is equivalent to sampling independent identically distributed Gaussian coefficients for the powers of 𝑋. We believe that Ring-LWE over non-two-power cyclotomics is deserving of more cryptanalytic effort. First, powers of two are rather sparse, especially in the relevant range of 𝑛 in the several hundreds or more. In addition, two-power cyclotomics are incompatible with some advanced features of fully homomorphic encryption (FHE) schemes, such as “plaintext packing” [ SV11] and asymptotically efficient “bootstrapping” algorithms [GHS12, AP13 ] for characteristic-two plaintext rings like F 2 𝑘. Finally, non-two-power cyclotomic rings lack orthogonal bases (in the canonical geometry), so sampling from recommended error distributions and error management are more subtle [ LPR13], and it is interesting to consider what effect (if any) this has on concrete hardness. Our challenges are weighted toward the popular two-power case, but they also include indices of a variety of other forms, including powers of other small primes, those that are divisible by many small primes, and moderately large primes. We are particularly interested in whether there are any cryptanalytic attacks that can take special advantage of any of these forms. Our choices of indices 𝑚 correspond to dimensions 𝑛 ranging from 128 to 4 , 096 for Ring-LWE, and from 16 to 162 for Ring-LWR.
1.2.2 Error Width
The absolute error of a (Ring-)LWE instantiation is, very informally, the “width” of the coefficients of the error distribution, with respect to an appropriate choice of basis. The main worst-case hardness theorems for (Ring-)LWE (e.g., [ Reg05, Pei09 , LPR10]) apply to Gaussian-like error distributions whose widths exceed
to nearly 1 /(
𝜋) ≈ 0. 282 in the former case [ Reg16], and to 𝑐 =
8 /(𝜋𝑒) ≈ 0. 968 or better in the latter case, depending on the dimension and desired time/advantage lower bound (see Section 4. for details). We pose this class of challenges to give instantiations which might someday conform to significantly improved worst-case hardness theorems for Ring-LWE, and which in any case satisfy the bounds from known hardness theorems in the absence of ring structure.
Tall corresponds to 𝑟 ∈ { 6 , 9 }/
𝑛, i.e., error coefficients of width 6 or 9. Errors of roughly this size have been used in prior concrete analyses of LWE instantiations (e.g., [ MR09, LP11]) and in practical implementations of (Ring-)LWE cryptography (e.g., [ADPS16, BCD+16]).
Short corresponds to 𝑟 ∈ { 1 , 2 }/
𝑛, i.e., error coefficients of width 1 or 2. In light of the above-mentioned small-error and homomorphism attacks, we consider such parameters to be riskier, at least when a large number of Ring-LWE samples are available. But at present it is unclear whether the attacks are feasible when only a small or moderate number of samples are available, as is the case in our challenges and in many applications (see Section 1.2.4 below for further discussion). Finally, for each setting of the error parameter we give challenges for both continuous error and its corresponding discretized version, where each real coefficient (with respect to the decoding basis) is rounded off to the nearest integer. Cryptographic applications almost always use discrete forms of Ring-LWE, but continuous forms are also cryptanalytically interesting. In particular, rounding yields a tight reduction from any continuous form to its corresponding discrete form, i.e., the latter is at least as hard as the former.
1.2.3 Modulus
Another main quantity that strongly influences Ring-LWE’s apparent hardness is the error rate, which is, informally, the ratio of the (absolute) error width to the modulus 𝑞. There is much theoretical and practical cryptanalytic evidence that, all else being equal, Ring-LWE becomes harder as the error rate increases. E.g., there are tight reductions from smaller to larger rates; worst-case hardness theorems yield stronger conclusions for larger error rates; and lattice-based attacks perform worse in practice. Therefore, cryptographic applications typically aim to use the smallest possible modulus that can accomodate the accumulated error terms without mod-𝑞 “wraparound” (so as to avoid, e.g., incorrect decryption). However, other considerations can introduce additional subtleties in the choice of modulus. The initial worst-case hardness theorem for search-Ring-LWE [ LPR10 , Theorem 4.1] applies to any sufficiently large modulus 𝑞 and absolute error. However, the search-to-decision reduction [ LPR10, The- orems 5.1 and 5.2] requires 𝑞 to be a prime integer that “splits well” in 𝑅, i.e., the ideal 𝑞𝑅 factors into distinct prime ideals of small norm.^7 Subsequent work [BV11 , BLP+ 13 ] used the “modulus switching” technique to obtain a reduction for essentially any modulus, at the cost of an increase in the error rate. Finally, recent work [ PRS17] gave a worst-case hardness theorem for decision-Ring-LWE for any modulus, which either matches or improves upon the just-described results in terms of parameters. On the cryptanalytic side, the above-mentioned homomorphism attacks of [ EHL14, ELOS15 , CLS15, CLS16] can take advantage of moduli 𝑞 for which the ideal 𝑞𝑅 has small-norm ideal divisors, but only when the error is insufficiently “well spread” relative to those ideals. (See [Pei16] for further details.) With these considerations in mind, our challenge instantiations include moduli of a variety of sizes and arithmetic forms. We include moduli that split completely, others that split very poorly, and some that “ramify” (e.g., two-power moduli for two-power cyclotomics). Each instantiation uses a modulus that is large enough, (^7) Such moduli also enable FFT-like algorithms over Z𝑞 , also called Chinese Remainder Transforms, which yield fast multiplication algorithms for 𝑅/𝑞𝑅 using just Z𝑞 operations.
relative to the absolute error, to yield correct decryption with high probability in public-key encryption and key-exchange protocols following the template from [LPR10, Pei14]. See Section 4.2 for further details.
1.2.4 Number of Samples
Finally, each of our challenge instantiations consist of either a small or moderate number of samples (specifically, three or 100 ) for Ring-LWE, and 500 samples for Ring-LWR. These choices are motivated by the following considerations: while simple cryptographic constructions like key exchange and digital signatures reveal only a few samples (per fresh secret) to the adversary, other constructions like FHE, identity/attribute-based encryption, and pseudorandom functions can reveal a much larger (possibly even adversary-determined) number of samples. Clearly, revealing more samples cannot increase the hardness of an instantiation, because the attacker can just ignore some of them. There is also evidence that in certain parameter regimes, such as small bounded errors, increasing the number of samples can significantly reduce concrete hardness [AG11 , ACFP14]. At the same time, the main worst-case hardness theorems for Ring-LWE place mild or no conditions at all on the number of samples [ LPR10, Theorem 3.6], and the same goes for plain LWE [Reg05, Pei09, BLP+ 13 ]. (Worst-case hardness theorems for less-standard LWE instantiations [ MP13 ], and for (Ring-)LWR [ BPR12, AKPW13, BGM+ 16 , AA16 ], do have a strong dependence on the number of samples, however.) There are also standard techniques to generate fresh (Ring-)LWE samples from a fixed number of given ones, though at a cost in the error rate of the new samples [Lyu05, GPV08, ACPS09]. In summary, the practical effect of the number of samples on concrete hardness is unclear, and seems to depend heavily on the other parameters of the instantiation. Therefore, we separately consider both the small- and moderate-sample regime for our challenge instantiations.
In a recent concurrent and independent work, Buchmann et al. [BBG+ 16 ] describe a method and imple- mentation for creating challenges for LWE (but not Ring-LWE). Both their work and ours encounter a common issue—that naïve methods of generating challenges require knowing the solutions—but their main goal is quite different from ours: to prevent the solutions from existing in any one place, so that nobody is excluded from participating in the subsequent cryptanalysis. They accomplish this by generating the challenges using a multi-party computation protocol, so that the solutions never reside with any single party. (Their implementation uses three parties, although this is not inherent to the approach.) The protocol of [ BBG+ 16 ] also allows for retroactively auditing that the parties honestly executed the protocol as implemented, but only after a challenge has been solved. This is a substantially weaker verifiability property than we obtain, for at least three reasons:
For the purposes of this work, a lattice ℒ is discrete additive subgroup of 𝐻 that is full rank, i.e., spanR(ℒ) = 𝐻. A lattice is generated as the set of integer linear combinations of some linearly independent basis vectors B = {b 1 ,... , b𝑛}:
ℒ = ℒ(B) :=
𝑖
𝑧𝑖b𝑖 : 𝑧𝑖 ∈ Z
The volume (or determinant) of a lattice ℒ is vol(ℒ) := vol(𝐻/ℒ) = |det(B)|, where B denotes any basis of ℒ. The minimum distance of ℒ is 𝜆 1 (ℒ) := min 0 ̸ =v∈ℒ‖v‖, the length of a shortest nonzero lattice vector. The dual lattice ℒ∨^ of a lattice ℒ is the set of all points in 𝐻 having integer inner products with every vector of the lattice: ℒ∨^ := {w ∈ 𝐻 : ⟨w, ℒ⟩ ⊆ Z}.
Gaussians. The Gaussian function 𝜌 : 𝐻 → R+^ is defined as 𝜌(x) := exp(−𝜋‖x‖^2 ), and is scaled to have parameter (or width) 𝑟 > 0 by defining 𝜌𝑟(x) := 𝜌(x/𝑟). The (spherical) Gaussian probability distribution 𝐷𝑟 over 𝐻 is defined to have probability density function 𝑟−𝑛^ · 𝜌𝑟. (We usually omit the subscript when 𝑟 = 1.) The following bounds use the function
𝑓 (𝑥) =
2 𝜋𝑒 · 𝑥 · exp(−𝜋𝑥^2 ), (2.1)
which is strictly decreasing and at most 1 for 𝑥 ≥ 1 /
Lemma 2.1 ([Ban93, Lemma 1.5]). For any 𝑐 > 1 /
2 𝜋 defining 𝐶 = 𝑓 (𝑐) < 1 , and any lattice ℒ ⊂ 𝐻,
𝜌(ℒ ∖ 𝑐
The analogous continuous bound 𝐷(𝐻 ∖ 𝑐
𝑛ℬ) < 𝐶𝑛^ follows by taking an arbitrarily dense lattice ℒ and using a limiting argument. The following is a result of rearranging terms.
Corollary 2.2. If 𝜋𝑐^2 −ln 𝑐 ≥ (^1) 𝑛 ln( (^1) 𝜀 )+ 12 ln(2𝜋𝑒) for some 𝑐 > 1 /
2 𝜋 and 𝜀 > 0 , then 𝐷(𝐻 ∖𝑐
The following is an immediate corollary of Lemma 2.1 and [MR04, Lemma 4.1].
Lemma 2.3. For any lattice ℒ ⊂ 𝐻 and 𝑟 >
𝑛/ 2 𝜋/𝜆 1 (ℒ∨) defining 𝐶 = 𝑓 (𝑟𝜆 1 (ℒ∨)/
𝑛) < 1 , the statistical distance between 𝐷𝑟 mod ℒ and the uniform distribution over 𝐻/ℒ is less than 12 𝐶𝑛/(1 − 𝐶𝑛).
Two-power cyclotomics. As a warm-up, we start with the necessary background for two-power cyclotomic rings, which have especially simple representations and are widely used in practical applications of Ring-LWE. This background is sufficient to understand the remainder of the paper (from Section 2.3 onward) and our challenges in the specialized case of two-power cyclotomics. When 𝑚 = 2𝑘^ ≥ 2 is a power of two, the 𝑚th cyclotomic polynomial is Φ𝑚(𝑋) = 𝑋𝑛^ + 1, where 𝑛 = 𝜙(𝑚) = 2𝑘−^1. The 𝑚th cyclotomic field can be represented as 𝐾 = Q[𝑋]/(𝑋𝑛^ + 1), and the 𝑚th cyclotomic ring as 𝑅 = Z[𝑋]/(𝑋𝑛^ + 1). The power basis (which is identical to the powerful basis𝑝⃗ and the “tweaked” decoding basis 𝑡 · 𝑑⃗ of 𝑅 as defined below) consists of the powers 1 , 𝑋, 𝑋^2 ,... , 𝑋𝑛−^1. That is, an element of 𝐾 (respectively, 𝑅) can be uniquely represented as a rational (resp., integral) polynomial in 𝑋 of degree less than 𝑛.
The canonical embedding 𝜎 : 𝐾 → 𝐻 can be viewed as a linear transform from the power-basis coefficient vector in Q𝑛^ to 𝐻 ⊂ C𝑛, where 𝐻 is as defined above in Section 2.1. Under this view, 𝜎 is just a scaling by a
𝑛 factor, followed by a rigid rotation (an isometry). Therefore, a sample from the Gaussian distribution 𝐷𝑟 over 𝐻 (and over 𝐾, via 𝜎−^1 ) has independent power-basis coefficients, drawn from 𝐷𝑟/√𝑛. The fractional codifferent ideal of 𝑅 is 𝑅∨^ = 𝑛−^1 𝑅. The decoding basis 𝑑⃗ of 𝑅∨^ turns out to be the powerful basis, scaled down by the “tweak” factor 𝑡 = 𝑛, i.e., 𝑡 · 𝑑⃗ =𝑝⃗. Therefore, a sample from the Gaussian distribution 𝐷𝑟 over 𝐾 has independent decoding-basis coefficients, each drawn from 𝐷𝑟√𝑛. Tautologically, the same goes for the power-basis coefficients for the “tweaked” distribution 𝑡 · 𝐷𝑟 = 𝐷𝑟𝑛.
General cyclotomics. For a positive integer 𝑚, the 𝑚th cyclotomic number field is 𝐾 = Q(𝜁𝑚), the field extension of the rationals Q obtained by adjoining an element 𝜁𝑚 having multiplicative order 𝑚, i.e., a primitive 𝑚th root of unity. The ring of algebraic integers in 𝐾 is 𝑅 = Z[𝜁𝑚], the 𝑚th cyclotomic ring. The minimal polynomial of 𝜁𝑚 has degree 𝑛 = 𝜙(𝑚), so deg(𝐾/Q) = deg(𝑅/Z) = 𝑛. There are 𝑛 distinct ring embeddings (i.e., injective ring homomorphisms) 𝜎𝑖 : 𝐾 → C, indexed by 𝑖 ∈ Z* 𝑚, which are defined by 𝜎𝑖(𝜁𝑚) = 𝜔𝑚𝑖 where 𝜔𝑚 = exp(2𝜋
− 1 /𝑚) ∈ C is the principal 𝑚th complex root of unity. These embeddings come in conjugate pairs (𝜎𝑖, 𝜎𝑚−𝑖), because 𝜔𝑖𝑚 is the complex conjugate of 𝜔𝑚𝑚− 𝑖= 𝜔−𝑚𝑖. The canonical embedding is the concatenation of all the embeddings (under a suitable reindexing of Z* 𝑚 as { 1 ,... , 𝑛}), i.e., the injective function
𝜎 : 𝐾 → 𝐻 𝜎(𝑎) = (𝜎𝑖(𝑎))𝑖∈Z* 𝑚
where 𝐻 ⊂ C𝑛^ is the subspace defined above in Section 2.1. We endow 𝐾 and 𝑅 with a geometry using the canonical embedding 𝜎. For example, we define the ℓ 2 norm on 𝐾 as ‖𝑥‖ 2 = ‖𝜎(𝑥)‖ 2 =
⟨𝜎(𝑥), 𝜎(𝑥)⟩, and use this to define the continuous Gaussian distribution 𝐷𝑟 over 𝐾.^8
Representations. Often, the 𝑚th cyclotomic ring is represented as 𝑅 ∼= Z[𝑋]/(Φ𝑚(𝑋)), where Φ𝑚(𝑋) is the 𝑚th cyclotomic polynomial, using the natural “power basis:” every element of 𝑅 is uniquely represented as a Z-linear combination of the powers 1 , 𝑋,... , 𝑋𝑛−^1. When 𝑚 = 𝑝 is prime, we have Φ𝑝(𝑋) = 1 + 𝑋 + · · · + 𝑋𝑝−^1 , and when 𝑚 is a power of a prime 𝑝, we have Φ𝑚(𝑋) = Φ𝑝(𝑋𝑚/𝑝), but in other cases the 𝑚th cyclotomic polynomial need not have such a nice form, which makes computations more cumbersome. An alternative “tensored” representation, which was shown in [ LPR13] to have better computational and geometric properties for cryptography, uses a multivariate polynomial ring with one variable per distinct prime divisor of 𝑚. For example, Z[𝑋 1 , 𝑋 2 ]/(Φ𝑚 1 (𝑋 1 ), Φ𝑚 2 (𝑋 2 )) when 𝑚 = 𝑚 1 𝑚 2 is the factorization of 𝑚 into powers of two distinct primes. The powerful basis𝑝⃗ ∈ 𝑅𝑛^ is the corresponding Z-basis of monomials in this representation, i.e., the tensor product of the power bases of the individual prime-power cyclotomics. See [LPR13, Section 4] for further details. (Note that Λ∘𝜆, which our implementation is based upon, defines the powerful basis in “digit reversed” order; see [CP16a].)
Ideal lattices. An ideal ℐ ⊆ 𝑅 is a nontrivial additive subgroup that is also closed under multiplication by 𝑅, i.e., 𝑥 · 𝑟 ∈ ℐ for any 𝑥 ∈ ℐ, 𝑟 ∈ 𝑅. The norm is defined as N(ℐ) := |𝑅/ℐ|, the index of ℐ in 𝑅. (^8) To be formal, the continuous Gaussian is defined over 𝐾R := 𝐾 ⊗Q R, which is analogous to 𝐾 as the reals R are to the rationals Q, and which is in bijective correspondence with 𝐻 via the natural extension of 𝜎. Because precision is always finite in any computational context, in this work we ignore the formal distinction between 𝐾 and 𝐾R.
tweak is reversible. (See [CP16a] for further details on the recommended usage of tweaked Ring-LWE in cryptographic applications.) In this paper, our exposition primarily uses the original form of Ring-LWE involving 𝑅∨, so that we can use sharp concentration bounds on spherical Gaussians. Our implementation, however, uses the tweaked form, where equivalent bounds follow by ‖𝑔 · 𝑒′‖ = ‖𝑔 · 𝑡 · 𝑒‖ = ˆ𝑚 · ‖𝑒‖, where 𝑒 is the original error term and 𝑒′^ = 𝑡 · 𝑒 is its tweaked counterpart.
3 Cut-and-Choose Protocol
A central issue in the creation of challenges for LWE-like problems is that a dishonest challenger could publish improperly generated instances that are much harder than honestly generated ones, or even impossible to solve, because they have larger error than claimed or are even uniformly random. Because both the proper and improper distributions are conjectured to be pseudorandom, such misbehavior would be very difficult to detect. This stands in contrast to other types of cryptographic challenges for, e.g., the factoring or discrete logarithm problems, where improper distributions like unbalanced factors or non-uniform exponents seem like they can only make the instances easier to solve (or at least no harder), so the challenger has no incentive to use them. To deal with this issue, we use a simple, non-interactive, publicly verifiable “cut-and-choose” protocol to give reasonably convincing evidence that the challenge instances are properly distributed, or at least not much harder than claimed. The protocol uses a timestamp service and a randomness beacon. The former allows anyone to verify that a given piece of data was generated and submitted to the service before a certain point in time. The latter is a source of public, timestamped, truly random bits. Concretely, for timestamps we use the Bitcoin blockchain via the OriginStamp service [ GB14], and for randomness we use the NIST beacon [NIS11]. The use of a centralized beacon means that a verifier must trust that the challenger cannot predict or influence the beacon values, e.g., by collusion. This is obviously not entirely ideal from a security standpoint. Unfortunately, at the time we released our challenges we knew of no decentralized and practically usable alternatives that met our needs. For example, while the Bitcoin blockchain has been proposed and analyzed as a source of randomness, it turns out to be relatively easy and inexpensive to introduce significant bias [BCG15, PW16]. Similarly, the “unicorn” protocol [LW15 ] is trivial to bias completely, unless the time window for public contribution is smaller than the (fastest possible) computation time for a “slow” hash function, which is impractical for our purposes: we would need a large time window to ensure sufficient participation. Lastly, a proposal based on multi-national lotteries [ BDF+ 15 ] does not come with a practically usable implementation, and requires the verifier to manually obtain past lottery numbers from many different countries.
At a high level, our protocol proceeds as follows:
(a) the original commitment was timestamped sufficiently in advance of the beacon address (and all beacon addresses across multiple challenges are distinct); (b) secrets for the appropriate instances were revealed, as indicated by the beacon value; and (c) the revealed secrets appear “proper.” For Ring-LWE, one checks that the errors are short enough, potentially along with other statistical tests, e.g., on the errors’ covariance. For Ring-LWR one recomputes the rounded products with the revealed secret and compares them to the challenge instance.
Importantly, a verifier does not need to witness the challenger’s initial commitment firsthand, because it can just check the timestamp. In addition, the beacon’s random outputs are cryptographically signed, and can be downloaded and verified at any time, or even provided by the challenger in the reveal step (which is what our implementation does). Under the reasonable assumptions that the challenger cannot backdate timestamps, nor predict or influence the output of the randomness beacon, the above protocol provides the following guarantee: if one or more of the instances in a particular challenge are “improper,” i.e., they lack a secret that would convince the verifier, then the challenger has probability at most 1 /𝑁 of convincing the verifier. (Moreover, if two or more of the instances are improper, then the challenger can never succeed.)
Potential cheats and countermeasures. It is important to notice that as described, the protocol does not prove that the instances were correctly sampled according to the claimed Ring-LWE distribution, only that the revealed errors satisfy the statistical tests (i.e., they are short enough, etc.). Below in Section 3.2 we describe a supplementary (but platform- and implementation-specific) test, which we also include in our implementation, that gives a stronger assurance of correct sampling. However, the above protocol already seems adequate for practical purposes, because there does not appear to be any significant advantage to the challenger in choosing non-uniform 𝑎𝑖 ∈ 𝑅𝑞 or 𝑠 ∈ 𝑅∨ 𝑞 , nor in deviating from spherical Gaussian errors within the required error bound. In particular, spherical Gaussians are rotationally invariant, and have maximal entropy over all distributions bounded by a given covariance. Another way the challenger might try to cheat is a variant of the “perfect prediction” stock market scam: the challenger could prepare and timestamp a large number of different initial commitments (Step 1) containing various invalid instances. The challenger’s goal is for at least one of these commitments to be successfully revealable once the beacon values become available; the challenger would then publish only that (timestamped) commitment as the “official” one, and discard the rest. The more commitments it prepares in advance, the more invalid (but unrevealed) instances it can hope to sneak past the verifier. However, the number of commitments it must prepare grows exponentially with the number of invalid instances. In order to rule out this kind of misbehavior, we prove that there is a single commitment by widely announcing it (or its hash value under a conjectured collision-resistant hash function) before the beacon values become available, in several venues where it would be hard or impossible to make multiple announcements or suppress them at a later time. For example, on the IACR ePrint archive we have created one dated submission for this paper, every version of which contains the same hash value of the commitment (in Footnote 3). Also,
bound of ≈ 𝐵
𝑑 where 𝑑 is the lattice dimension, and the protocol from [LNSW13 ] only proves that the largest coefficient (in some basis) of the error is bounded. For our Gaussian error distributions, this bound would need to be about 2 – 3 times larger than the size of a typical coefficient. In summary, these protocols can only guarantee that the error is bounded by (say) 2 𝐵, which can correspond to a much harder Ring-LWE instance than one with error bound 𝐵. By contrast, our protocol has a gap of only 10 - 15 %, as shown next.
Here we describe our verifier in more detail, including some relevant aspects of its implementation, and describe how we compute rather sharp error bounds for our Ring-LWE instantiations. Recall that each of our Ring-LWE instantiations is parameterized by a cyclotomic index 𝑚 defining the 𝑚th cyclotomic number field 𝐾 and cyclotomic ring 𝑅, which have degree 𝑛 = 𝜙(𝑚); a positive integer modulus 𝑞 defining 𝑅𝑞 := 𝑅/𝑞𝑅 and 𝑅∨ 𝑞 := 𝑅∨/𝑞𝑅∨; and a Gaussian error parameter 𝑟 > 0. (The number of samples is also a parameter, but it plays no role in the bounds.)
Verification. To verify a (continuous) Ring-LWE instance consisting of samples (𝑎 ∈ 𝑅𝑞, 𝑏 ∈ 𝐾/𝑞𝑅∨) for a purported secret 𝑠 ∈ 𝑅∨ 𝑞 and given error bound 𝐵, one does the following for each sample:
(^) 𝑗 ¯𝑒𝑗 𝑑𝑗 where each 𝑒¯𝑗 ∈ Q/𝑞Z.
(^) 𝑗 𝑒𝑗 𝑑𝑗 where each 𝑒𝑗 ∈ Q ∩ [− 𝑞 2 , 𝑞 2 ) is the distinguished representative of ¯𝑒𝑗.
For a discrete instance one does the same, but with 𝐾 replaced by 𝑅∨^ and Q replaced by Z. In either case, properly generated Ring-LWE samples for our instantiations will correctly verify (with high probability) because the original errors 𝑒 ∈ 𝐾 have coefficients of magnitude smaller than 𝑞/ 2 with respect to the decoding basis, hence they are correctly recovered from 𝑏 − 𝑠 · 𝑎 = 𝑒 mod 𝑞𝑅∨. Moreover, we show below that they have Euclidean norms below the error bound 𝐵 with high probability.
Implementation. As mentioned in Section 2.3, our Λ∘𝜆-based implementation (and hence the challenges themselves) actually uses the “tweaked” form of Ring-LWE, in which 𝑅∨^ is replaced by 𝑅 by implicitly multiplying each 𝑏 component, and thereby the secret 𝑠 and each error term 𝑒, by the “tweak” factor 𝑡 (where 𝑡𝑅∨^ = 𝑅). Correspondingly, the basis 𝑡 · 𝑑⃗ is referred to as the decoding basis of 𝑅. Therefore, we use an equivalent verification procedure to the one above, which simply replaces 𝑅∨,⃗ 𝑑 with 𝑅, 𝑡 · 𝑑⃗, and the test ‖𝑒‖ ≤ 𝐵 with ‖𝑔 · 𝑒‖ ≤ 𝑚𝐵ˆ , where 𝑔 ∈ 𝑅 is the special element such that 𝑔 · 𝑡 = ˆ𝑚. (Recall that 𝑚ˆ = 𝑚/ 2 when 𝑚 is even, and 𝑚ˆ = 𝑚 otherwise.) The Λ∘𝜆 framework provides operations for efficiently “lifting” elements of 𝐾/𝑞𝑅 or 𝑅/𝑞𝑅 to 𝐾 or 𝑅 (respectively) using the decoding basis of 𝑅, and for computing ‖𝑔 · 𝑒‖, exactly as required. Actually, because it is computationally simpler, Λ∘𝜆 works with squared norms, Gaussian parameters, error bounds, etc., so our verifier checks the equivalent condition ‖𝑔 · 𝑒‖^2 ≤ ( ˆ𝑚𝐵)^2.
Continuous error bound. For continuous Ring-LWE instantiations with spherical Gaussian error 𝐷𝑟 over 𝐾, we use Lemma 2.1 and Corollary 2.2 to get rather sharp tail bounds on the Euclidean norm of the
error. In our actual challenge instances, the error bound we use was typically within a factor of ≈ 1. 10 of the largest error in each instance, so it gives little room for misbehavior relative to the correct error distribution. The bound is obtained as follows. For an appropriate small 𝜀 > 0 we compute the minimal 𝑐 > 1 /
(up to ≈ 10 −^4 precision) such that
𝜋𝑐^2 − ln 𝑐 ≥
ln(1/𝜀) +
ln(2𝜋𝑒).
Then by Corollary 2.2, we have Pr𝑥∼𝐷𝑟 [‖𝑥‖ > 𝐵] < 𝜀, where 𝐵 := 𝑐𝑟
𝑛. Concretely, we set 𝜀 = 2−^25 to get a rather strict bound that is still not too likely to be violated over the tens of thousands of error terms across all the instances.
Discrete error bound. For Ring-LWE instantiations with spherical Gaussian error 𝐷𝑟 over 𝐾, discretized (i.e., rounded off) to 𝑅∨^ using the decoding basis 𝑑⃗, we need to use a high-probability bound on the norm of the discretized error. For this we use a combination of Corollary 2.2 and a (partially heuristic) analysis of the round-off term. In our actual challenge instances, the ultimate bound was typically within a factor of ≈ 1. 15 of the largest error in each instance. Our discrete bound is obtained as follows. We first compute the same bound 𝐵 = 𝑐𝑟
𝑛 on 𝐷𝑟 as above. Now, because 𝐷𝑟 is above or near the “smoothing parameter” of 𝑅∨, the fractional part f ∈ [− 12 , 12 )𝑛 of its coefficient vector with respect to 𝑑⃗ is close to uniformly random; henceforth we model it as such. The discretization error is 𝑓 = ⟨𝑑,⃗ f ⟩ ∈ 𝐾, which corresponds to Df in the canonical embedding, where D = 𝜎(𝑑⃗) = (𝜎𝑖(𝑑𝑗 ))𝑖,𝑗. Observe that
‖𝑓 ‖^2 = ⟨Df , Df ⟩ = f 𝑡Gf ,
where G = D*^ · D is the positive definite Gram matrix of D. We now analyze the trace Tr(G), and use this to obtain a high-probability tail bound on ‖𝑓 ‖. Note that by definition of the decoding basis, G = H−^1 is the inverse of the Gram matrix H of the powerful basis𝑝⃗. When 𝑚 is a prime 𝑝, the proof of [ LPR13, Lemma 4.3] shows that H = 𝑝I𝑝− 1 − 1 , so G = 𝑝−^1 (I𝑝− 1 + 1 ), which has trace Tr(G) = 2(𝑝 − 1)/𝑝 = 2𝑛/𝑚. By the tensorial decomposition of the powerful and decoding bases, this immediately generalizes for arbitrary 𝑚 to
Tr(G) =
where 𝑘 is the number of distinct primes dividing 𝑚. Recalling that we model f ∈ [− 12 , 12 )𝑛^ as uniformly random, by independence of 𝑓𝑖, 𝑓𝑗 for 𝑖 ̸= 𝑗 and linearity of expectation we have
𝑓
f [f 𝑡Gf ] =
Tr(G) =
We heuristically assume that 𝜎(𝑓 ) = Df obeys essentially the same concentration bound (Lemma 2.1) as a spherical Gaussian having the above expected squared norm, times a small constant factor to account for the somewhat heavier tails (due to the non-spherical, non-Gaussian distribution). Our ultimate bound is√ 𝐵^2 + 𝐹 2 , where 𝐵 = 𝑐𝑟
𝑛 and 𝐹 = 𝑐
2 𝑘𝑛/𝑚 are the high-probability bounds on the norms of 𝐷𝑟 and the rounding term 𝑓 , respectively.
The dual ideal of ℐ𝑅∨^ is (ℐ𝑅∨)−^1 · 𝑅∨^ = ℐ−^1 , which has norm N(ℐ)−^1 , so by Lemma 2.4 its minimum distance is 𝜆 1 (ℐ−^1 ) ≥
𝑛/𝑠. Letting 𝑓 (𝑥) =
2 𝜋𝑒 · 𝑥 · exp(𝜋𝑥^2 ) be as in Equation (2.1), define
𝐶 := 𝑓 (𝑐) ≤ 2 exp(− 2 /𝑒) < 2 −^1 /^17 ,
where the penultimate inequality follows by 𝑐 ≥
2 /(𝜋𝑒) and the fact that 𝑓 is decreasing for 𝑥 ≥ 1 /
By Lemma 2.3, the statistical distance between 𝐷𝑟 mod ℐ𝑅∨^ and the uniform distribution over 𝐾/ℐ𝑅∨ is at most 12 𝐶𝑛/(1 − 𝐶𝑛). Then because 𝑛 ≥ 17 , the time/advantage ratio of the attack is
2(1 − 𝐶𝑛) N(ℐ) 𝐶𝑛^
so it remains to show that 𝑠/𝐶 ≥ 𝑡. By the previous observation on 𝑓 (𝑥) and the fact that 𝑐 ≥ 𝑟/𝑠 > 1 /
2 𝜋𝑒 · (𝑟/𝑠)^2 · exp(−𝜋(𝑟/𝑠)^2 )
A straightforward calculation shows that the denominator (as a function of 𝑠) has a global maximum when 𝑟/𝑠 = 1/
𝜋, so as desired, 𝑠/𝐶 ≥ 𝑟
For a given Gaussian error parameter 𝑟, we choose moduli 𝑞 to reflect a typical Ring-LWE public-key encryption or key-exchange application following the basic template from [ LPR10, Pei14 ]. Essentially, this means that 𝑞 must be large enough to accomodate the ultimate error term, which is a combination of the original errors, without any “wraparound.” A bit more precisely, we need that with sufficiently high probability, the ultimate error has coefficients (with respect to an appropriate choice of basis) in the interval (− 𝑞 4 , 𝑞 4 ). The precise meaning of “high probability” depends on the low-level details of the application. For example, wraparound of a few coefficients might be acceptable if error-correcting codes are used, or a final key-confirmation step may handle the rare case when wraparound does occur. The Ring-LWE “toolkit” [ LPR13] provides general techniques and reasonably sharp concentration bounds for analyzing the coefficients of sums and products of (discretized) error terms in arbitrary cyclotomics (see, e.g., [LPR13, Lemma 6.6]). However, their generality makes them a bit pessimistic, so they do not capture the strongest possible concentration properties for concrete cases of interest. In this work we take a combined empirical and theoretical approach to more tightly bound the ultimate error in encryption/key-exchange applications, and thereby obtain smaller values of the modulus and larger error rates. Our empirical approach is as follows:
The theoretical (though heuristic) basis for this approach is as follows: in the canonical embedding, the coordinates of 𝐷𝑟 are i.i.d. Gaussians over C (up to conjugate symmetry), and the same nearly holds for the discretization to 𝑅∨^ when 𝐷𝑟 is “well-spread” relative to 𝑅∨^ (as it is in our instantiations). Because multiplication is coordinate-wise in the canonical embedding, the products 𝑒 · 𝑒′, 𝑓 · 𝑓 ′^ have nearly i.i.d. subexponential coordinates. (The multiplication by 𝑚ˆ simply scales them all by the same factor.) Finally, each coefficient of 𝐸 with respect to the decoding basis is by definition the inner product of 𝜎(𝐸) with a vector consisting of various roots of unity. Bernstein’s inequality says that such inner products have subgaussian exp(−Θ(𝑘^2 )) tail probabilities in the “near zone,” which in our setting goes all the way out to 𝑘 = 𝑂(
standard deviations. In the “far zone” beyond that, the tails are still subexponential exp(−Θ(𝑘)). Because the near zone is so wide, the largest coefficient among the tens or hundreds of thousands in our simulation should be not much smaller than a true high-probability bound. Concretely, the largest empirical coefficient 𝐵 should have a tail probability of no more than, say, 2 −^13. Under the subgaussian model, the probability of obtaining a coefficient of magnitude more than 4 𝐵 is therefore less than (2−^13 )^4 2 = 2−^208. Even under the weaker subexponential model, the probability is at most (2−^13 )^4 = 2−^52.
5 Hardness Estimates
In this section we describe how we obtain hardness estimates for our challenges. There are many different algorithmic approaches for attacking lattice problems like the approximate Shortest Vector Problem (SVP) and the Bounded Distance Decoding (BDD) problem, of which Ring-LWE/LWR are special cases. These include lattice-basis reduction (e.g., [LLL82, Sch87, GNR10, CN11 , MW16]), exponential-time and -space sieving or Voronoi-based algorithms (e.g., [AKS01, NV08 , MV10b, MV10a, Laa15 , ADRS15]), combinatorial and algebraic attacks [BKW03, AG11, ACFP14], and combinations thereof (e.g., [How07]). Because all the above approaches represent active areas of research and can be difficult to compare directly—especially because some require enormous memory—we do not attempt to give precise estimates of “bits of security.” Instead, we follow the analysis approach of [ MR09 , LP11, LN13 , ADPS16] for (Ring-)LWE to derive two kinds of hardness estimates. First, we give the approximate root-Hermite factor 𝛿 > 1 needed to solve each challenge via lattice attacks. We use 𝛿 to classify each challenge into one of a few broad categories, ranging from “toy” (very easy) to “very hard”(likely out of reach for nation-state attackers using the best publicly known algorithms). Second, we estimate the smallest block size that is sufficient to solve the challenge using the BKZ algorithm [SE94, CN11]. In Appendix D, Table 1 and Table 2 give the hardness estimates for our Ring-LWE/LWR challenges, using the methods described below (specifically, Equations (5.1) and (5.2)).
A standard attack on Ring-LWE casts it as a Bounded Distance Decoding (BDD) problem on a random lattice from a certain class. For a collection of ℓ Ring-LWE samples (𝑎𝑖 ∈ 𝑅𝑞, 𝑏𝑖 = 𝑠 · 𝑎𝑖 + 𝑒𝑖 mod 𝑞𝑅∨) defining 𝑎⃗ = (𝑎 1 ,... , 𝑎ℓ), we consider the corresponding “𝑞-ary” lattice
ℒ𝑎(⃗ ) := {𝑣⃗ ∈ (𝑅∨)ℓ^ : ∃ 𝑧 ∈ 𝑅∨^ such that𝑣⃗ = 𝑧 ·𝑎⃗ (mod 𝑞𝑅∨)}.