An Efficient and Parallel Gaussian Sampler for Lattices

Transcription

1 An Efficient and Parallel Gaussian Sampler for Lattices Chris Peikert April 13, 2011 Abstract At the heart of many recent lattice-based cryptographic schemes is a polynomial-time algorithm that, given a high-quality basis, generates a lattice point according to a Gaussian-like distribution. Unlike most other operations in lattice-based cryptography, however, the known algorithm for this task (due to Gentry, Peikert, and Vaikuntanathan; STOC 2008) is rather inefficient, and is inherently sequential. We present a new Gaussian sampling algorithm for lattices that is efficient and highly parallelizable. We also show that in most cryptographic applications, the algorithm s efficiency comes at almost no cost in asymptotic security. At a high level, our algorithm resembles the perturbation heuristic proposed as part of NTRUSign (Hoffstein et al., CT-RSA 2003), though the details are quite different. To our knowledge, this is the first algorithm and rigorous analysis demonstrating the security of a perturbation-like technique. 1 Introduction In recent years, there has been rapid development in the use of lattices for constructing rich cryptographic schemes. 1 These include digital signatures (both tree-based [LM08] and hash-and-sign [GPV08, CHKP10]), identity-based encryption [GPV08] and hierarchical IBE [CHKP10, ABB10], noninteractive zero knowledge [PV08], and even a fully homomorphic cryptosystem [Gen09]. The cornerstone of many of these schemes (particularly, but not exclusive to, those that answer queries ) is the polynomial-time algorithm of [GPV08] that samples from a so-called discrete Gaussian probability distribution over a lattice Λ. More precisely, for a vector c R n and a width parameter s > 0, the distribution D Λ+c,s assigns a probability proportional to exp( π v 2 /s 2 ) to each v Λ+c (and probability zero elsewhere). Given c, a basis B of Λ, and a sufficiently large s (related to the quality of B), the GPV algorithm outputs a sample from a distribution statistically close to D Λ+c,s. (Equivalently, by subtracting c from the output, it samples a lattice point from a Gaussian distribution centered at c.) Informally speaking, the sampling algorithm is zero-knowledge in the sense that it leaks no information about its input basis B (aside from a bound on its quality), because D Λ+c,s is defined without reference to any particular basis. This zero-knowledge property accounts for its broad utility in lattice-based cryptography. While the sampling algorithm of [GPV08] has numerous applications in cryptography and beyond, for both practical and theoretical purposes it also has some drawbacks: School of Computer Science, College of Computing, Georgia Institute of Technology. This material is based upon work supported by the National Science Foundation under Grant CNS Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation. 1 A lattice Λ R n is a periodic grid of points, or more formally, a discrete subgroup of R n under addition. It is generated by a (not necessarily unique) basis B R n k of k linearly independent vectors, as Λ = {Bz : z Z k }. In this paper we are concerned only with full-rank lattices, i.e., where k = n. 1

2 First, it is rather inefficient: on an n-dimensional lattice, a straightforward implementation requires exact arithmetic on an n n matrix having Ω(n)-bit entries (even ignoring some additional log n factors). While approximate arithmetic and other optimizations may be possible in certain cases, great care would be needed to maintain the proper output distribution, and the algorithm s essential structure appears difficult to make truly practical. Second, it is inherently sequential: to generate a sample, the algorithm performs n adaptive iterations, where the choices made in each iteration affect the values used in the next. This stands in stark contrast to other embarrassingly parallelizable operations that are typical of lattice-based cryptography. 1.1 Contributions We present a new algorithm that samples from a discrete Gaussian distribution D Λ+c,s over a lattice, given a high-quality basis for Λ. The algorithm is especially well-suited to q-ary integer lattices, i.e., sublattices of Z n that themselves contain qz n as a sublattice, for some known and typically small q 2. These include NTRU lattices [HPS98] and the family of random lattices that enjoy worst-case hardness, as first demonstrated by Ajtai [Ajt96]. Most modern lattice-based cryptographic schemes (including those that rely on Gaussian sampling) are designed around q-ary lattices, so they are a natural target for optimization. The key features of our algorithm, as specialized to n-dimensional q-ary lattices, are as follows. It is: Offline / online: when the lattice basis is known in advance of the point c (which is the norm in cryptographic applications), most of the work can be performed as offline precomputation. In fact, the offline phase may be viewed simply as an extension of the application s key-generation algorithm. Simple and efficient: the online phase involves only O(n 2 ) integer additions and multiplications modulo q or q 2, where the O-notation hides a small constant 4. Fully parallelizable: for any P up to n 2, the online phase can allocate O(n 2 /P ) of its operations to each of P processors. High-quality: for random bases that are commonly used in cryptographic schemes, our algorithm can sample from a Gaussian of essentially the same quality as the prior GPV algorithm; this is important for the concrete security of applications. See Section below for a full discussion. We emphasize that for a practical implementation, parallelized operations on small integers represent a significant performance advantage. Most modern computer processors have built-in support for vector instructions (also known as single instruction, multiple data ), which perform simple operations on entire vectors of small data elements simultaneously. Our algorithm can exploit these operations very naturally. For a detailed efficiency comparison between our algorithm and that of [GPV08], see Section below. At a very high level, our algorithm resembles the perturbation heuristic proposed for the NTRUSign signature scheme [HHGP + 03], but the details differ significantly; see Section 1.3 for a comparison. To our knowledge, this is the first algorithm and analysis to demonstrate the theoretical soundness of a perturbationlike technique. Finally, the analysis of our algorithm relies on some new general facts about convolutions of discrete Gaussians, which we expect will be applicable elsewhere. For example, these facts allow for the use of a clean discrete Gaussian error distribution (rather than a rounded Gaussian) in the learning with errors problem [Reg05], which may be useful in certain applications. 2

3 1.2 Comparison with the GPV Algorithm Here we give a detailed comparison of our new sampling algorithm to the previous one of [GPV08]. The two main points of comparison are the width ( quality ) of the sampled Gaussian, and the algorithmic efficiency Gaussian Width One of the important properties of a discrete Gaussian sampling algorithm is the width s of the distribution it generates, as a function of the input basis. In cryptographic applications, the width is the main quantity governing the concrete security and, if applicable, the approximation factor of the underlying worst-case lattice problems. This is because in order for the scheme to be secure, it must hard for an adversary to find a lattice point within the likely radius s n of the Gaussian (i.e., after truncating its negligibly likely tail). The wider the distribution, the more leeway the adversary has in an attack, and the larger the scheme s parameters must be to compensate. On the other hand, a more efficient sampling algorithm can potentially allow for the use of larger parameters without sacrificing performance. The prior sampling algorithm of [GPV08], given a lattice basis B = {b 1,..., b n }, can sample from a discrete Gaussian having width as small as B = max i b i, where B denotes the Gram-Schmidt orthogonalization of B. 2 (Actually, the width also includes a small ω( log n) factor, which is also present in our new algorithm, so for simplicity we ignore it in this summary.) As a point of comparison, B is always at most max i b i, and in some cases it can be substantially smaller. In contrast, our new algorithm works for a width s as small as the largest singular value s 1 (B) of the basis B, or equivalently, the square root of the largest eigenvalue of the Gram matrix BB t. It is easy to show that s 1 (B) is always at least max i b i, so our new algorithm cannot sample from a narrower Gaussian than the GPV algorithm can. At the same time, any basis B can always be efficiently processed (without increasing B ) to guarantee that s 1 (B) n B, so our algorithm is at worst an n factor looser than that of [GPV08]. While a factor of n gap between the two algorithms may seem rather large, in cryptographic applications this worst-case ratio is actually immaterial; what matters is the relative performance on the random bases that are used as secret keys. Here the situation is much more favorable. First, we consider the basisgeneration algorithms of [AP09] (following [Ajt99]) for worst-case-hard q-ary lattices, which are used in most theoretically sound cryptographic applications. We show that with a minor modification, one of the algorithms from [AP09] outputs (with overwhelming probability) a basis B for which s 1 (B) is only an O( log q) factor larger than B (which itself is asymptotically optimal, as shown in [AP09]). Because q is typically a small polynomial in n, this amounts to a cost of only an O( log n) factor in the width of the Gaussian. Similarly, when the vectors of B are themselves drawn from a discrete Gaussian, as in the basis-delegation technique of [CHKP10], we can show that s 1 (B) is only a ω( log n) factor larger than B (with overwhelming probability). Therefore, in cryptographic applications the performance improvements of our algorithm can come at almost no asymptotic cost in security. Of course, a concrete evaluation of the performance/security trade-off for real-world parameters would require careful analysis and experiments, which we leave for later work Efficiency We now compare the efficiency of the two known sampling algorithms. We focus on the most common case of q-ary n-dimensional integer lattices, where a good lattice basis (whose vectors having length much less than 2 In the Gram-Schmidt orthogonalization B of B, the vector b i is the projection of b i orthogonally to span(b 1,..., b i 1). 3

4 q) is initially given in an offline phase, followed by an online phase in which a desired center c Z n is given. This scenario allows for certain optimizations in both algorithms, which we include for a fair comparison. The sampling algorithm from [GPV08] can use the offline phase to compute the Gram-Schmidt orthogonalization of its given basis; this requires Ω(n 4 log 2 q) bit operations and Ω(n 3 ) bits of intermediate storage. The online phase performs n sequential iterations, each of which computes an inner product between a Gram-Schmidt vector having Ω(n)-bit entries, and an integer vector whose entries have magnitude at most q. In total, these operations require Ω(n 3 log q) bit operations. In addition, each iteration performs a certain randomized-rounding operation, which, while asymptotically poly(log n)-time, is not especially practical (nor precomputable) because it uses rejection sampling on a value that is not known until the online phase. Lastly, while the work within each iteration may be parallelized, the iterations themselves must be performed sequentially. Our algorithm is more efficient and practical in the running time of both phases, and in the amount of intermediate storage between phases. The offline phase first computes a matrix inverse modulo q 2, and a square root of a matrix whose entries have magnitude at most q; these can be computed in O(n 3 log 2 q) bit operations. Next, it generates and stores one or more short integer perturbation vectors (one per future call to the online phase), and optionally discards the matrix square root. The intermediate storage is therefore as small as O(n 2 log q) bits for the matrix inverse, plus O(n log q) bits per perturbation vector. Optionally, the offline phase can also precompute the randomized-rounding operations, due to the small number of possibilities that can occur online. The online phase simply computes about 4n 2 integer additions and multiplications (2n 2 of each) modulo q or q 2, which can be fully parallelized among up to n 2 processors. Lastly, we mention that our sampling algorithm translates very naturally to the setting of compact q-ary lattices and bases over certain rings R that are larger than Z, where security is based on the worst-case hardness of ideal lattices in R (see, e.g., [Mic02, SSTX09, LPR10]). In contrast to GPV, our algorithm can directly take advantage of the ring structure for further efficiency, yielding a savings of an Ω(n) factor in the computation times and intermediate storage. 1.3 Overview of the Algorithm The GPV sampling algorithm [GPV08] is based closely on Babai s nearest-plane decoding algorithm for lattices [Bab86]. Babai s algorithm takes a point c R n and a lattice basis B = {b 1,..., b n }, and for i = n,..., 1 computes a coefficient z i Z for b i by iteratively projecting ( rounding ) c orthogonally to the nearest hyperplane of the form z i b i + span(b 1,..., b i 1 ). The output is the lattice vector i z ib i, whose distance from the original c can be bounded by the quality of B. The GPV algorithm, whose goal is instead to sample from a discrete Gaussian centered at c, uses randomized rounding in each iteration to select a nearby plane, under a carefully defined probability distribution. (This technique is also related to another randomized-rounding algorithm of Klein [Kle00] for a different decoding problem.) In addition to his nearest-plane algorithm, Babai also proposed a simpler (but somewhat looser) lattice decoding algorithm, which we call simple rounding. In this algorithm, a given point c R n is rounded to the lattice point B B 1 c, where each coordinate of B 1 c R n is independently rounded to its nearest integer. With precomputation of B 1, this algorithm can be quite practical especially on q-ary lattices, where several more optimizations are possible. Moreover, it is trivially parallelized among up to n 2 processors. Unfortunately, its deterministic form it turns out to be completely insecure for answering queries (e.g., digital signatures), as demonstrated by Nguyen and Regev [NR06]. A natural question, given the approach of [GPV08], is whether a randomized variant of Babai s simplerounding algorithm is secure. Specifically, the natural way of randomizing the algorithm is to round each coordinate of B 1 c to a nearby integer (under a discrete Gaussian distribution over Z, which can be sampled 4

5 efficiently), then left-multiply by B as before. Unlike with the randomized nearest-plane algorithm, though, the resulting probability distribution here is unfortunately not spherical, nor does it leak zero knowledge. Instead, it is a skewed (elliptical) Gaussian, where the skew mirrors the geometry of the basis. More precisely, the covariance matrix E x [(x c)(x c) t ] of the distribution (about its center c) is approximately BB t, which captures the entire geometry of the basis B, up to rigid rotation. Because covariance can be measured efficiently from only a small number of samples, the randomized simple-rounding algorithm leaks this geometry. 3 Our solution prevents such leakage, in a manner inspired by the following facts. Recall that if X and Y are two independent random variables, the probability distribution of their sum X + Y is the convolution of their individual distributions. In addition, for continuous (not necessarily spherical) Gaussians, covariance matrices are additive under convolution. In particular, if Σ 1 and Σ 2 are covariance matrices such that Σ 1 + Σ 2 = s 2 I, then the convolution of two Gaussians with covariance matrices Σ 1, Σ 2 (respectively) is a spherical Gaussian with standard deviation s. The above facts give the basic idea for our algorithm, which is to convolve the output of the randomized simple-rounding algorithm with a suitable non-spherical (continuous) Gaussian, yielding a spherically distributed output. However, note that we want the algorithm to generate a discrete distribution i.e., it must output a lattice point so we should not alter the output of the randomized-rounding step. Instead, we first perturb the desired center c by a suitable non-spherical Gaussian, then apply randomized rounding to the resulting perturbed point. Strictly speaking this is not a true convolution, because the rounding step depends on the output of the perturbation step, but we can reduce the analysis to a true convolution using bounds related to the smoothing parameter of the lattice [MR04]. The main remaining question is: for a given covariance matrix Σ 1 = BB t (corresponding to the rounding step), for what values of s is there an efficiently sampleable Gaussian having covariance matrix Σ 2 = s 2 I Σ 1? The covariance matrix of any (non-degenerate) Gaussian is symmetric positive definite, i.e., all its eigenvalues are positive. Conversely, every positive definite matrix is the covariance of some Gaussian, which can sampled efficiently by computing a square root of the covariance matrix. Since any eigenvector of Σ 1 (with eigenvalue σ 2 > 0) is also an eigenvector of s 2 I (with eigenvalue s 2 ), it must be an eigenvector of Σ 2 (with eigenvalue s 2 σ 2 ) as well. Therefore, a necessary and sufficient condition is that all the eigenvalues of Σ 1 be less than s 2. Equivalently, the algorithm works for any s that exceeds the largest singular value of the given basis B. More generally, it can sample any (possibly non-spherical) discrete Gaussian with covariance matrix Σ > Σ 1 (i.e., Σ Σ 1 is positive definite). In retrospect, the high-level structure of our algorithm resembles the perturbation heuristic proposed for NTRUSign [HHGP + 03], though the details are quite different. First, the perturbation and rounding steps in NTRUSign are both deterministic with respect to two or more bases, and there is evidence that this is insecure [MPSW09], at least for a large polynomial number of signatures. Interestingly, randomization also allows for improved efficiency, since our perturbations can be chosen with offline precomputation (as opposed to the deterministic method of [HHGP + 03], which is inherently online). Second, the signing and perturbation bases used in NTRUSign are chosen independently, whereas our perturbations are carefully chosen to conceal the statistics that would otherwise be leaked by randomized rounding. 3 Given the above, one might still wonder whether the covariance BB t could be simulated efficiently (without any privileged knowledge about the lattice) when B is itself drawn from a nice distribution, such as a discrete Gaussian. Indeed, if the vectors of B were drawn independently from a continuous Gaussian, the matrix BB t would have the so-called Wishart distribution, which can be generated obliviously (without knowledge of B itself) using the Bartlett decomposition. (See, e.g., [Ksh59] and references therein). Unfortunately, these facts do not quite seem to carry over to discrete Gaussians, though they may be useful in another cryptographic context. 5

6 1.4 Organization Section 2 reviews the necessary linear algebra and lattice background. In Section 3 we prove some general facts about convolutions of discrete Gaussians, which are used in the analysis of our sampling algorithm. In Section 4 we describe new sampling algorithms and analyze their complexity under suggested optimizations. In Section 5 we give bounds on the largest singular value of a basis relative to other important quantities, both in general and for particular constructions of bases used in cryptographic schemes. 2 Preliminaries 2.1 Notation For a countable set X and a real-valued function f, we write f(x) to denote x X f(x). A nonnegative function f : N R is called negligible, written f(n) = negl(n), if it vanishes faster than any inverse polynomial, i.e., f(n) = o(n c ) for every constant c 0. A function g : N [0, 1] is called overwhelming if it is 1 negl(n). The statistical distance between two distributions X and Y (or two random variables have those distributions, respectively) is defined as (X, Y ) = sup A D X(A) Y (A). When D is a countable set, we have (X, Y ) = 1 2 d D X(d) Y (d). We use bold lower-case letters (e.g., x) to denote vectors in R n, for an undetermined positive integer dimension n that remains the same throughout the paper. We use bold upper-case letters (e.g., B) for ordered sets of vectors, and identify the set with the matrix having the vectors as its columns. We frequently use upper-case Greek letters such as Σ to denote (symmetric) positive (semi)definite matrices, defined below. In contexts where a matrix is expected, we sometimes use a scalar s R to denote s I, where I is the identity matrix of appropriate dimension. We let B = max i b i, where denotes the Euclidean norm. 2.2 Linear Algebra A symmetric matrix Σ R n n is positive definite, written Σ > 0, if x t Σx > 0 for all nonzero x R n. Equivalently, its spectral decomposition is Σ = QD 2 Q 1 = QD 2 Q t, where Q R n n is an orthogonal matrix (i.e., one for which Q t Q = QQ t = I) whose columns are eigenvectors of Σ, and D is the real diagonal matrix of the square roots of the corresponding eigenvalues, all of which are positive. We have Σ > 0 if and only if Σ 1 > 0. We say that Σ is positive semidefinite, written Σ 0, if x t Σx 0 for all x R n ; such a matrix may not be invertible. Positive (semi)definiteness defines a partial ordering on symmetric matrices: we say that Σ 1 > Σ 2 if (Σ 1 Σ 2 ) > 0, and likewise for Σ 1 Σ 2. It is the case that Σ 1 Σ 2 > 0 if and only if Σ 1 2 Σ 1 1 > 0, and likewise for the analogous strict inequalities. For any nonsingular matrix B R n n, the symmetric matrix Σ = BB t is positive definite, because x t Σx = B t x, B t x = B t x 2 > 0 for nonzero x R n. We say that B is a square root of Σ > 0, written B = Σ, if BB t = Σ. Every Σ > 0 has a square root B = QD, where Σ = QD 2 Q t is the spectral decomposition of Σ as above. Moreover, the square root is unique up to right-multiplication by an orthogonal matrix, i.e., B = Σ if and only if B = BP for some orthogonal matrix P. A square root of particular interest is given by the 6

11 4.1 Randomized Rounding We first need to define and analyze some simple randomized-rounding operations from the reals to lattices, which are an important component of our sampling algorithms. We start with a basic rounding operation from R to the integers Z, denoted v r for v R and some positive real rounding parameter r > 0. The output of this operation is a random variable over Z having distribution v + D Z v,r. Observe that for any integer z Z, the random variables z + v r and z + v r are identically distributed; therefore, we sometimes assume that v [0, 1) without loss of generality. We extend the rounding operation coordinate-wise to vectors v R n, where each entry is rounded independently. It follows that for any v R n and z Z n, Pr [ v r = z] ( z i v i ) 2 /r 2 ) = exp( π z v 2 /r 2 ) = ρ r ( z v). i [n] ρ r ( z i v i ) = exp( π i [n] That is, v r has distribution v + D Z n v,r, because the standard basis for Z n is orthonormal. The next lemma characterizes the distribution obtained by randomized rounding to an arbitrary lattice, using an arbitrary (possibly non-orthonormal) basis. Lemma 4.1. Let B be a basis of a lattice Λ = L(B), let Σ = r 2 BB t for some real r > 0, and let t R n be arbitrary. The random variable x = t B B 1 t r has distribution D Λ+t, Σ. Proof. Let v = B 1 t. The support of v r is Z n, so the support of x is t B Z n = Λ + t. Now for any x = t B z where z Z n, we have x = x if and only if v r = z. As desired, this event occurs with probability proportional to ρ r ( z v) = ρ r (B 1 (t x) B 1 t) = ρ r ( B 1 x) = ρ rb ( x) = ρ Σ ( x). Efficient rounding. In [GPV08] it is shown how to sample from D Z v,r for any v R and r > 0, by rejection sampling. While the algorithm requires only poly(log n) iterations before terminating, its concrete running time and randomness complexity are not entirely suitable for practical implementations. In this work, we can sample from v + D Z v,r more efficiently because r is always fixed, known in advance, and relatively small (about log n). Specifically, given r and v R we can (pre)compute a compact table of the approximate cumulative distribution function of v r, i.e., the probabilities p z := Pr[v + D Z v,r z] for each z Z in an interval [v r ω( log n), v + r ω( log n)]. (Outside of that interval are the tails of the distribution, which carry negligible probability mass.) Then we can sample directly from v + D Z v,r by choosing a uniformly random x [0, 1) and performing a binary search through the table for the z Z such that x [p z 1, p z ). Moreover, the bits of x may be chosen lazily, from most- to least-significant, until z is determined uniquely. To sample within a negl(n) statistical distance of the desired distribution, these operations can all be implemented in time poly(log n). 4.2 Generic Sampling Algorithm Here we apply Theorem 3.1 to sample from a discrete Gaussian of any sufficiently large covariance, given a good enough basis of the lattice. This procedure, described in Algorithm 1, serves mainly as a proof of 11

14 Implementation notes. For a practical implementation, Algorithm 2 admits several additional optimizations, which we discuss briefly here. In all cryptographic applications of Gaussian sampling on q-ary lattices, the length of the sampled vector is significantly shorter than q, i.e., its entries lie within a narrow interval around 0. Therefore, it suffices for the sampling algorithm to compute its output modulo q, using the integers { q q 1 2,..., 2 } as the set of canonical representatives. For this purpose, the final multiplication by the input basis B 1 need only be performed modulo q. Similarly, Z and Z(c x 2 ) need only be computed modulo q 2, because we are only concerned with the value of Z(c x 2) q modulo q. Because all the randomized-rounding steps are performed on rationals whose fractional parts are in { 0 q,..., q 1 q }, if q is reasonably small it may be worthwhile (for faster rounding) to precompute the tables of the cumulative distribution functions for all q possibilities. Alternatively (or in addition), during the offline phase the algorithm could precompute and cache a few rounded samples for each of the q possibilities, consuming them as needed in the online phase. 5 Singular Value Bounds In this section we give bounds on the largest singular value of a basis B and relate them to other geometric quantities that are relevant to the prior sampling algorithm of [GPV08]. 5.1 General Bounds The Gram-Schmidt orthogonalization of a nonsingular matrix B is B = QG, where Q is an orthogonal matrix and G is right-triangular, with positive diagonal entries g i,i > 0 (without loss of generality). The Gram-Schmidt vectors for B are b i = g i,i q i. That is, b 1 = b 1, and b i is the component of b i orthogonal to the linear span of b 1,..., b i 1. The Gram-Schmidt orthogonalization can be computed efficiently in a corresponding iterative manner. Let B = QG be the Gram-Schmidt orthogonalization of B. Without loss of generality we can assume that B is size-reduced, i.e., that g i,j g i,i /2 for every i < j. This condition can be achieved efficiently by the following process: for each j = 1,..., n, and for each i = j 1,..., 1, replace b j by b j g i,j /g i,i b i. Note that the size reduction process leaves the lattice L(B) and Gram-Schmidt vectors b i = g i,i q i unchanged. Note also that g i n max i g i,i, by the Pythagorean theorem. Lemma 5.1. Let B R n n be a size-reduced nonsingular matrix. We have s 1 (B) n b i 2 n B. i [n] The lemma is tight up to a constant factor, which may be seen by considering the right-triangular matrix with 1s on the diagonal and 1/2 in every entry above the diagonal. Proof. Let B have Gram-Schmidt orthogonalization B = QG. We have s 1 (B) = max x Bt x = max x Gt x ( n g i,i ) 2 = n gi,i 2, where the maxima are taken over all unit vectors x R n, the second equality uses the fact that Q is orthogonal, and the first inequality is by Cauchy-Schwarz. i [n] i [n] 14

15 5.2 Bases for Cryptographic Lattices Ajtai [Ajt99] gave a procedure for generating a uniformly random q-ary lattice from a certain family of worst-case-hard cryptographic lattices, together with a relatively short basis B. Alwen and Peikert [AP09] recently improved and extended the construction to yield asymptotically optimal bounds on B = max i b i and B = max i b i. Here we show that with a small modification, one of the constructions of [AP09] yields (with overwhelming probability) a basis whose largest singular value is within an O( log q) factor of B. It follows that our efficient Gaussian sampling algorithm is essentially as tight as the GPV algorithm on such bases. Lemma 5.2. The construction of [AP09, Section 3.2] (modified as described below) outputs a basis B such that s 1 (B) = O( log q) B with overwhelming probability. Proof. For concreteness, we focus on the version of the construction that uses base r = 2, though similar bounds can be obtained for any r 2. In the construction, there are matrices G and U where the columns of G include the columns of an (efficiently computable) bad basis H of a certain lattice, and GU is a rectangular 0-1 matrix containing the binary representation of H. As described in [AP09], H actually need not be a basis; any full-rank set of lattice vectors suffices. In this case, the output is then a q-ary lattice together with a short full-rank set of lattice vectors, which can be efficiently converted to a basis without increasing the largest singular value (see Lemma 5.4 below). We modify the construction so that the columns of G include all the columns of qi (rather than H), which are a full-rank set of lattice vectors as required by the construction. Similarly, GU is rectangular matrix containing the binary representation of qi. More formally, GU = I q t, where denotes the Kronecker product and q t is the lg q -dimensional row vector containing the binary representation of q. These modifications do not affect the (asymptotically optimal) bounds on B and B established in [AP09]. The construction outputs a matrix B with block structure ( ) (G + R)U RP B = Z n n. U P The exact definitions of the components are not important for our purposes; we only need the following facts: s 1 (GU) = O( log q) by the description above, and s 1 (U) 3. s 1 (R) = O( log q) R = O( log q) B with all but exponentially small probability, because R is a random {0, ±1} matrix (under a certain distribution) that is a lg q factor wider than it is tall. s 1 (P) = 1 because P has at most a single 1 in each row and in each column. By the triangle inequality and the definition of s 1, the lemma follows. 5.3 Gaussian-Distributed Bases Here we show that for a lattice basis generated by choosing its vectors from a discrete Gaussian distribution over the lattice (following by some post-processing), the largest singular value s 1 (B) of the resulting basis is essentially the same as the maximal Gram-Schmidt length B (with high probability). Such a bound is important because applications that use basis delegation, such as the hierarchical ID-based encryption schemes of [CHKP10, ABB10], generate random bases in exactly the manner just described. Algorithm 3 recalls the precise method for generating and post-processing a Gaussian-distributed basis. 15

16 Algorithm 3 Abstract algorithm for sampling and post-processing a Gaussian-distributed basis. Input: An arbitrary basis B of a lattice Λ, and an oracle for D Λ,s, where s η ɛ (Λ) for some ɛ = negl(n). Output: A basis T of Λ. 1: i 0 2: repeat 3: Draw a fresh s D Λ,s. 4: if s is linearly independent of {s 1,..., s i } then 5: i i + 1, s i s 6: end if 7: until i = n 8: return T = ToBasis(S, B). Theorem 5.3. With overwhelming probability, Algorithm 3 outputs a basis T such that T s Ω( n), and for any ω( log n) function, s 1 (T) s O( n) ω( log n). In particular, s 1 (T)/ T = ω( log n). We use the remainder of this subsection to prove the theorem. First we recall the algorithm ToBasis [MG02, Lemma 7.1, page 129], which is used by Algorithm 3 to transform a full-rank set S of lattice vectors into a basis T of the lattice, without increasing the Gram-Schmidt lengths of the vectors; here we show that it also does not increase the largest singular value of the matrix either. This means that it is enough to consider the largest singular value of S. Lemma 5.4. There is a deterministic polynomial-time algorithm ToBasis(S, B) that, given a full-rank set of lattice vectors S Λ and an arbitrary basis B of Λ = L(B), outputs a basis T of Λ such that s 1 (T) s 1 (S), and t i s i for all i. Proof. The algorithm works as follows: write S = BZ for some nonsingular integer matrix Z. Decompose Z = UR for a unimodular matrix U and (nonsingular) right-triangular integer matrix R. Output T = BU. Clearly T is a basis of Λ, because U is unimodular. Observe that T = SR 1. Now because R is a (nonsingular) triangular integral matrix, all its singular values σ i (R) 1, hence every σ i (R 1 ) 1. We conclude that s 1 (T) s 1 (S) s 1 (R 1 ) s 1 (S). For the Gram-Schmidt lengths, let S = QG be the G-S decomposition of S, where G is right-triangular. Then T = Q(GR 1 ) is the G-S decomposition of T, because R 1 is also right-triangular. The ith diagonal entry of R 1 is r 1 i,i, hence t i s i / r i,i s i. We next prove the lower bound on T. First we claim that in the decomposition S = BUR above, r 1,1 = 1 with overwhelming probability. This is because s 1 r 1,1 Λ, and the probability that D Λ,s outputs an element in r Λ for an integer r > 1 is negligible: the probability is maximized for r = 2, and is (1 + negl(n)) 2 n in that case because there are 2 n cosets of 2Λ, and by Lemma 2.4. Therefore, t 1 = t 1 = s 1. By [MR04, Lemma 4.2], we know that s 1 has length s Ω( n) with overwhelming probability, and hence T t 1 = s Ω( n). We now work to prove the upper bound on s 1 (S). The next lemma bounds the singular values of a (possibly non-square) matrix whose columns are drawn from D Λ,s. Lemma 5.5. Let Λ R n be a lattice and let s η ɛ (Λ) for some ɛ = negl(n). Let S R n m be a matrix whose m columns s i are drawn independently from D Λ,s. Then with all but 2 Ω(n+m) probability, s 1 (S ) s O( n + m). 16

17 Proof sketch. We give an outline of the proof, whose details are standard in random matrix theory; see for example [Ver07, Lecture 6]. Without loss of generality, assume that s = 1. The first fact we need is that the distribution D Λ is subgaussian in every direction, i.e., for any unit vector u, we have Pr x DΛ [ x, u > t] C exp( πt 2 ) for some fixed constant C and any t > 0. This fact is established in [Pei07, Lemma 5.1], using techniques of [Ban95]. The second fact we need is that an n-by-m matrix S with independent subgaussian columns has largest singular value O( n + m) with all but 2 Ω(m+n) probability. The largest singular value of S is the maximum of u t S v over all unit vectors u R n, v R m. This maximum is bounded by first observing that for any fixed u, v, the random variable u t S v is itself subgaussian, and therefore has absolute value O( n + m) except with probability 2 Ω(m+n). By then taking a union bound over 2 O(m+n) points in a suitable ɛ-net, the bound extends to all u, v simultaneously. Now let S R n m be the matrix consisting of every vector s D Λ,s chosen by Algorithm 3, irrespective of whether it is linearly independent of its predecessors. Because S is made up of a subset of the columns of S, it follows immediately from the definition that s 1 (S) s 1 (S ). It simply remains to bound the total number m of samples that Algorithm 3 draws from D Λ,s. By [Reg05, Lemma 3.15], each sample s is linearly independent of s 1,..., s i with probability at least 1/10. Therefore, for any ω(log n) function, the algorithm draws a total of n ω(log n) samples, except with negligible probability. By Lemma 5.5, we conclude that s 1 (S ) s O( n) ω( log n) with overwhelming probability. This completes the proof. 6 Acknowledgments The author thanks Phong Nguyen, Xiang Xie, and the anonymous CRYPTO 10 reviewers for helpful comments. References [ABB10] S. Agrawal, D. Boneh, and X. Boyen. Efficient lattice (H)IBE in the standard model. In EUROCRYPT To appear. [Ajt96] M. Ajtai. Generating hard instances of lattice problems. Quaderni di Matematica, 13:1 32, Preliminary version in STOC [Ajt99] M. Ajtai. Generating hard instances of the short basis problem. In ICALP, pages [AP09] [Bab86] [Ban95] [CHKP10] J. Alwen and C. Peikert. Generating shorter bases for hard random lattices. In STACS, pages L. Babai. On Lovász lattice reduction and the nearest lattice point problem. Combinatorica, 6(1):1 13, W. Banaszczyk. Inequalites for convex bodies and polar reciprocal lattices in R n. Discrete & Computational Geometry, 13: , D. Cash, D. Hofheinz, E. Kiltz, and C. Peikert. Bonsai trees, or how to delegate a lattice basis. In EUROCRYPT To appear. 17

Subspace Pursuit for Compressive Sensing: Closing the Gap Between Performance and Complexity Wei Dai and Olgica Milenkovic Department of Electrical and Computer Engineering University of Illinois at Urbana-Champaign

COSAMP: ITERATIVE SIGNAL RECOVERY FROM INCOMPLETE AND INACCURATE SAMPLES D NEEDELL AND J A TROPP Abstract Compressive sampling offers a new paradigm for acquiring signals that are compressible with respect

Orthogonal Bases and the QR Algorithm Orthogonal Bases by Peter J Olver University of Minnesota Throughout, we work in the Euclidean vector space V = R n, the space of column vectors with n real entries

Foundations of Data Science John Hopcroft Ravindran Kannan Version /4/204 These notes are a first draft of a book being written by Hopcroft and Kannan and in many places are incomplete. However, the notes

WHICH SCORING RULE MAXIMIZES CONDORCET EFFICIENCY? DAVIDE P. CERVONE, WILLIAM V. GEHRLEIN, AND WILLIAM S. ZWICKER Abstract. Consider an election in which each of the n voters casts a vote consisting of

Fast Solution of l 1 -norm Minimization Problems When the Solution May be Sparse David L. Donoho and Yaakov Tsaig October 6 Abstract The minimum l 1 -norm solution to an underdetermined system of linear

Communication Theory of Secrecy Systems By C. E. SHANNON 1 INTRODUCTION AND SUMMARY The problems of cryptography and secrecy systems furnish an interesting application of communication theory 1. In this

A mini course on additive combinatorics 1 First draft. Dated Oct 24th, 2007 These are notes from a mini course on additive combinatorics given in Princeton University on August 23-24, 2007. The lectures

Chapter 1 The Gödel Phenomena in Mathematics: A Modern View Avi Wigderson Herbert Maass Professor School of Mathematics Institute for Advanced Study Princeton, New Jersey, USA 1.1 Introduction What are