










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!











Lattice based public key encryption (and its cousins known as knapsack and coding based encryption) have almost as long a his- tory as discrete logarithm and factoring based schemes. Already in 1976, right after the Diffie-Hellman key exchange was discovered (and before RSA), Ralph Merkle was working on building public key encryption from the NP hard knapsack problem (see Diffieโs recollec- tion). This can be thought of as the task of solving a linear equation of the form ๐ด๐ฅ = ๐ฆ (where ๐ด is a given matrix, ๐ฆ is a given vector, and the unknown are ๐ฅ) over the real numbers but with the addi- tional constraint that ๐ฅ must be either 0 or 1. His proposal evolved into the Merkle-Hellman system proposed in 1978 (which was broken in 1984). McEliece proposed in 1978 a system based on the difficulty of the decoding problem for general linear codes. This is the task of solving noisy linear equations where one is given ๐ด and ๐ฆ such that ๐ฆ = ๐ด๐ฅ + ๐ for a โsmallโ error vector ๐, and needs to recover ๐ฅ. Crucially, here we work in a finite field, such as working modulo ๐ for some prime ๐ (that can even be 2 ) rather than over the reals or rationals. There are special matrices ๐ดโ^ for which we know how to solve this problem efficiently: these are known as efficiently decodable error correcting codes. McEliece suggested a scheme where the key generator lets ๐ด be a โscrambledโ version of a special ๐ดโ^ (based on the Goppa algebraic geometric code). So, someone that knows the scrambling could solve the problem, but (hopefully) someone that doesnโt know it wouldnโt. McElieceโs system has so far not been broken. In a 1996 breakthrough, Ajtai showed a private key scheme based on integer lattices that had a very curious property- its security could be based on the assumption that certain problems were only hard in the worst case , and moreover variants of these problems were known to be NP hard. This re-ignited the hope that we could perhaps realize the old dream of basing crypto on the mere assumption that ๐ โ NP.
Compiled on 11.17.2021 22:
238 an intensive introduction to cryptography
Alas, we now understand that there are fundamental barriers to this approach. Nevertheless, Ajtaiโs work attracted significant interest, and within a year both Ajtai and Dwork, as well as Goldreich, Goldwasser and Halevi came up with lattice based constructions for public key encryp- tion (the former based also on worst case assumptions). At about the same time, Hoffstein, Pipher, and Silverman came up with their NTRU public key system which is based on stronger assumptions but offers better performance, and they started a company around it together with Daniel Lieman. You may note that I havenโt yet said what lattices are; we will do so later, but for now if you simply think of questions involving linear equations modulo some prime ๐, you will get enough of the intuition that you need. (The lattice viewpoint is more geometric, and weโll discuss it more below; it was first used to attack cryptosystems and in particular break the Merkle-Hellman knapsack scheme and many of its variants.) Lattice based cryptography has captured a lot of attention recently from both theory and practice. In the theory side, many cool new constructions are now based on lattice based cryptography, and chief among them fully homomorphic encryption, as well as indistinguisha- bility obfuscation (though the latterโs securityโs foundations are still far less solid). On the applied side, the steady advances in the technol- ogy of quantum computers have finally gotten practitioners worried about RSA, Diffie Hellman and Elliptic Curves. While current con- structions for quantum computers are nowhere near being able to, say, factor larger numbers that can be done classically (or even than can be done by hand), given that it takes many years to develop new standards and get them deployed, many believe the effort to transition away from these factoring/dlog based schemes should start today (or perhaps should have started several years ago). Based on this, the Na- tional Institute of Standards and Technology has started a process to identify โpost quantumโ public key encryption scheme. All the finalist for public-key encryption are based on lattices/codes. Cryptography has the peculiar/unfortunate feature that if a ma- chine is built that can factor large integers in 20 years, it can still be used to break the communication we transmit today , provided this communication was recorded. So, if you have some data that you expect youโd want still kept secret in 20 years (as many government and commercial entities do), you might have reasons to worry. Cur- rently lattice based cryptography is the only real โgame in townโ for potentially quantum-resistant public key encryption schemes.
240 an intensive introduction to cryptography
(^2) Inner products can be defined more generally, and in particular over fields such as the complex numbers we would define the inner product as โ ๐ข๐๐ฃ๐ where for ๐ โ โ, ๐ denotes the complex conjugate of ๐. However, we stick to this simple case for this chapter.
lattice based cryptography 241
(^3) Despite the name, Gaussian elimination has been known to Chinese mathematicians since 150BC or so, and was popularized in the west through the 1670 notes of Isaac Newton, more than 100 years before Gauss was born.
R Remark 11.1 โ Keep track of dimensions!. Through- out this chapter, and while working in lattice based cryptography in general, it is crucial to keep track of the dimensions. Whenever you see a symbol such as ๐ฃ, ๐ด, ๐ฅ, ๐ฆ ask yourself:
11.1 A WORLD WITHOUT GAUSSIAN ELIMINATION
The general approach people use to get a public key encryption is to obtain a hard computational problem with some mathematical structure. Weโve seen this in the discrete logarithm problem, where the task is to invert the map ๐ โฆ ๐๐^ (mod ๐), and the integer factoring problem, where the task is to invert the map ๐, ๐ โฆ ๐ โ ๐. Perhaps the simplest structure to consider is the task of solving linear equations. Pretend that we didnโt know of Gaussian elimination,^3 and that if we picked a โgenericโ matrix ๐ด then the map ๐ฅ โฆ ๐ด๐ฅ would be hard to invert. (Here and elsewhere, our default interpretation of a vector ๐ฅ is as a column vector, and hence if ๐ฅ is ๐ dimensional and ๐ด is ๐ ร ๐ then ๐ด๐ฅ is ๐ dimensional. We use ๐ฅโค^ to denote the row vector obtained by transposing ๐ฅ.) Could we use that to get a public key encryption scheme? Here is a concrete approach. Let us fix some prime ๐ (think of it as polynomial size, e.g., ๐ is smaller than 1024 or so, though people can and sometimes do consider ๐ of exponential size), and all computation below will be done modulo ๐. The secret key is a vector ๐ฅ โ โค๐๐ , and the public key is (๐ด, ๐ฆ) where ๐ด is a random ๐ ร ๐ matrix with entries in โค๐ and ๐ฆ = ๐ด๐ฅ. Under our assumption, it is hard to recover the secret key from the public key, but how do we use the public key to encrypt? The crucial observation is that even if we donโt know how to solve linear equations, we can still combine several equations to get new ones. To keep things simple, letโs consider the case of encrypting a single bit.
P If you have a CPA secure public key encryption scheme for single bit messages then you can extend
lattice based cryptography 243
(^4) Over โค๐, we can think of ๐ โ 1 also as the number โ1, and so on. Thus if ๐ โ โค๐, we define |๐| to be the minimum of ๐ and ๐ โ ๐. This ensures the absolute value satisfies the natural property of |๐| = | โ ๐|.
P Please stop here and make sure that you see why this is a valid encryption (not in the sense that it is secure - itโs not - but in the sense that decryption of an encryption of ๐ returns the bit ๐), and this descrip- tion corresponds to the previous one; as usual all calculations are done modulo ๐.
11.2 SECURITY IN THE REAL WORLD.
Like it or not (and cryptographers typically donโt) Gaussian elimina- tion is possible in the real world and the scheme above is completely insecure. However, the Gaussian elimination algorithm is extremely brittle. Errors tend to be amplified when you combine equations. This is usually thought of as a bad thing, and numerical analysis is much about dealing with this issue. However, from the cryptographic point of view, these errors can be our saving grace and enable us to salvage the security of the ridiculous scheme above. To see why Gaussian elimination is brittle, let us recall how it works. Think of ๐ = ๐ for simplicity. Given equations ๐ด๐ฅ = ๐ฆ in the unknown variables ๐ฅ, the goal of Gaussian elimination is to trans- form them into the equations ๐ผ๐ฅ = ๐ฆโฒ^ where ๐ผ is the identity matrix (and hence the solution is simply ๐ฅ = ๐ฆโฒ). Recall how we do it: by rearranging and scaling, we can assume that the top left corner of ๐ด is equal to 1 , and then we add the first equation to the other equa- tions (scaled appropriately) to zero out the first entry in all the other rows of ๐ด (i.e., make the first column of ๐ด equal to (1, 0, โฆ , 0)) and continue onwards to the second column and so on and so forth. Now, suppose that the equations were noisy , in the sense that we added to ๐ฆ a vector ๐ โ โค๐๐ such that |๐๐| < ๐ฟ๐ for every ๐.^4 Even ignor- ing the effect of the scaling step, simply adding the first equation to the rest of the equations would typically tend to increase the relative error of equations 2, โฆ , ๐ from โ ๐ฟ to โ 2๐ฟ. Now, when we repeat the process, we increase the error of equations 3, โฆ , ๐ from โ 2๐ฟ to โ 4๐ฟ, and we see that by the time weโre done dealing with about ๐/ variables, the remaining equations have error level roughly 2 ๐/2๐ฟ. So, unless ๐ฟ was truly tiny (and ๐ truly big, in which case the difference between working in โค๐ and simply working with integers or rationals disappears), the resulting equations have the form ๐ผ๐ฅ = ๐ฆโฒ^ + ๐โฒ^ where ๐โฒ^ is so big that we get no information on ๐ฅ. The Learning With Errors (LWE) conjecture is that this is inherent :
244 an intensive introduction to cryptography
(^6) One can think of ๐ as chosen by simply letting every coordinate be chosen at random in {โ๐ฟ๐, โ๐ฟ๐ + 1, โฆ , +๐ฟ๐}. For technical reasons, we sometimes consider other distributions and in particular the discrete Gaussian distribution which is obtained by letting every coordinate of ๐ be an independent Gaussian random variable with standard deviation ๐ฟ๐, conditioned on it being an integer. (A closely related distribution is obtained by picking such a Gaussian random variable and then rounding it to the nearest integer.) (^6) People sometimes also consider variants where both ๐(๐) and ๐(๐) can be as large as exponential.
Conjecture (Learning with Errors, Regev 2005): Let ๐ = ๐(๐) and ๐ฟ = ๐ฟ(๐) be some functions. The Learning with Error (LWE) conjecture with respect to ๐, ๐ฟ,denoted as LWE ๐,๐ฟ, is the following conjecture: for every polynomial ๐(๐) and polynomial-time adversary ๐ ,
Pr[๐ (๐ด, ๐ด๐ฅ + ๐) = ๐ฅ] < ๐๐๐๐(๐) where for ๐ = ๐(๐) and ๐ฟ = ๐ฟ(๐), this probability is taken over ๐ด a random ๐ ร ๐ matrix over โค๐, ๐ฅ a random vector in โค๐๐ , and ๐ a random โnoise vectorโ in โค๐๐ where |๐๐| < ๐ฟ๐ for every ๐ โ [๐]. 5 The LWE conjecture (without any parameters) is that there is some absolute constant ๐ such that for every polynomial ๐(๐) there, if ๐(๐) > ๐(๐)๐^ then LWE holds with respect to ๐(๐) and ๐ฟ(๐) = 1/๐(๐). 6
It is important to note the order of quantifiers in the learning with error conjecture. If we want to handle a noise of low enough mag- nitude (say ๐ฟ(๐) = 1/๐^2 ) then we need to choose the modulos ๐ to be large enough (for example it is believed that ๐ > ๐^4 will be good enough for this case) and then the adversary can choose ๐(๐) to be as big a polynomial as they like, and of course run in time which is an ar- bitrary polynomial in ๐. Therefore we can think of such an adversary ๐ as getting access to a โmagic boxโ that they can use ๐ = ๐๐๐๐ฆ(๐) number of times to get โnoisy equations on ๐ฅโ of the form (๐๐, ๐ฆ๐) with ๐๐ โ โค๐๐ , ๐ฆ๐ โ โค๐ where ๐ฆ๐ = โจ๐๐, ๐ฅโฉ + ๐๐.
P The LWE conjecture posits that no efficient algorithm can recover ๐ฅ given ๐ด and ๐ด๐ฅ + ๐. But you might wonder whether itโs possible to do this is inefficiently. The answer is yes. Intuitively the reason is that if we have more equations than unknown (i.e., if ๐ > ๐) then these equations contain enough information to determine the unknown variables even if they are noisy. It can be shown that if ๐ is sufficiently large (๐ > 10๐ will do) then with high probability over ๐ด, ๐ฅ, ๐, given ๐ด and ๐ฆ = ๐ฅ + ๐, if we enumerate over all ๐ฅ ฬโ โค๐๐ and output the string minimizing |๐ดฬ๐ฅ โ ๐ฆ| (where we define |๐ฃ| = โ |๐ฃ๐| for a vector ๐ฃ), then ๐ฅฬ will equal ๐ฅ. It is a good exercise to work out the details, but a hint is this can be proven by showing that for every ๐ฅฬ โ ๐ฅ, with high probability over ๐ด, |๐ดฬ๐ฅ โ ๐ด๐ฅ| > ๐ฟ๐๐. The latter fact holds because ๐ฃ = ๐ด(๐ฅ โฬ ๐ฅ) is a random vector in โค๐๐ , and the probability that |๐ฃ| < ๐ฟ๐๐ is
246 an intensive introduction to cryptography
Our algorithm ๐ gets as input the pair (๐ด, ๐ฆ) where ๐ฆ = ๐ด๐ฅ + ๐ and we need to decide whether ๐ฅ 1 = ๐. Now consider the instance (๐ด + (๐โ0๐โ โฏ โ0๐), ๐ฆ+๐๐), where ๐ is a random vector in โค๐๐ and the matrix (๐โ0๐โ โฏ โ0๐) is simply the matrix with first column equal to ๐ and all other columns equal to 0. If ๐ด is random then ๐ด + (๐โ0๐โ โฏ โ0๐) is random as well. Now note that ๐ด๐ฅ + (๐โ0๐^ โฏ โ0๐)๐ฅ = ๐ด๐ฅ + ๐ฅ 1 ๐ and hence if ๐ฅ 1 = ๐ then we still have an input of the same form (๐ดโฒ, ๐ดโฒ๐ฅ + ๐). In contrast, we claim that if if ๐ฅ 1 โ ๐ then the distribution (๐ดโฒ, ๐ฆโฒ) where ๐ดโฒ^ = ๐ด + (๐โ0๐โ โฏ โ0๐) and ๐ฆโฒ^ = ๐ด๐ฅ + ๐ + ๐๐ is identical to the uniform distribution over a random uniformly chosen matrix ๐ดโฒ and a random and independent uniformly chosen vector ๐ฆโฒ. Indeed, we can write this distribution as (๐ดโฒ, ๐ฆโฒ) where ๐ดโฒ^ is chosen uniformly at random, and ๐ฆโฒ^ = ๐ดโฒ๐ฅ + ๐ + (๐ โ ๐ฅ 1 )๐ where ๐ is a random and in- dependent vector. (Can you see why?) Since ๐ โ ๐ฅ 1 โ 0, this amounts to adding a random and independent vector ๐ to ๐ฆโฒ, which means that the distribution (๐ดโฒ, ๐ฆโฒ) is uniform and independent. Hence if we send the input (๐ดโฒ, ๐ฆโฒ) to our the decision algorithm ๐ท, then we would get 1 with probability ๐ + ๐ if ๐ฅ 1 = ๐ and an output of 1 with probability ๐ otherwise. Now the crucial observation is that if our decision algorithm ๐ท requires ๐ equations to succeed with bias ๐, we can use 100๐๐/๐^2 equations (which is still polynomial) to invoke it 100๐/๐^2 times. This allows us to distinguish with probability 1 โ 2โ๐^ between the case that ๐ท outputs 1 with probability ๐ + ๐ and the case that it outputs 1 with probability ๐ (this follows from the Chernoff bound; can you see why?). Hence by using polynomially more samples than the decision algorithm ๐ท, we get a search algorithm ๐ that can actually recover ๐ฅ. โ
11.4 AN LWE BASED ENCRYPTION SCHEME
We can now show the secure variant of our original encryption scheme:
LWE-based encryption LWE-ENC:
lattice based cryptography 247
(^7) In fact, due to the fact that the signs of the error vectorโs entries are different, we expect the errors to have significant cancellations and hence we would expect โ |โจ๐ค, ๐โฉ| to only be roughly of magnitude ๐๐ฟ๐, but this is not crucial for our discussions.
๐คโค๐ด, โจ๐ค, ๐ฆโฉ + ๐โ๐/2โ (all computations are done in โค๐).
P The scheme LWEENC is also described in Fig. 11. with slightly different notation. I highly recommend you stop and verify you understand why the two descriptions are equivalent.
Figure 11.2 : In the encryption scheme LWEENC, the public key is a matrix ๐ดโฒ^ = (๐ด|๐ฆ), where ๐ฆ = ๐ด๐ + ๐ and ๐ is the secret key. To encrypt a bit ๐ we choose a random ๐ค โ๐ {0, 1}๐, and output ๐คโค๐ดโฒ^ + (0, โฆ , 0, ๐โ ๐ 2 โ). We decrypt ๐ โ โค๐+1๐ to zero with key ๐ iff |โจ๐, (๐ , โ1)โฉ| โค ๐/10 where the inner product is done modulo ๐.
Unlike our typical schemes, here it is not immediately clear that this encryption is valid, in the sense that the decrypting an encryption of ๐ returns the value ๐. But this is the case:
Lemma 11.3 With high probability, the decryption of the encryption of ๐ equals ๐.
Proof. โจ๐คโค๐ด, ๐ฅโฉ = โจ๐ค, ๐ด๐ฅโฉ. Hence, if ๐ฆ = ๐ด๐ฅ + ๐ then โจ๐ค, ๐ฆโฉ = โจ๐คโค๐ด, ๐ฅโฉ + โจ๐ค, ๐โฉ. But since every coordinate of ๐ค is either 0 or 1 , |โจ๐ค, ๐โฉ| < ๐ฟ๐๐ < ๐/10 for our choice of parameters.^7 So, we get that if ๐ = ๐คโค๐ด and ๐ = โจ๐ค, ๐ฆโฉ + ๐โ๐/2โ then ๐ โ โจ๐, ๐ฅโฉ = โจ๐ค, ๐โฉ + ๐โ๐/2โ which will be smaller than ๐/10 iff ๐ = 0. โ
We now prove security of the LWE based encryption:
Theorem 11.4 โ CPA security of LWEENC. If the LWE conjecture is true then LWEENC is CPA secure. For a public key encryption scheme with messages that are just bits, CPA security means that an encryption of 0 is indistinguishable from
lattice based cryptography 249
CLAIM : Suppose that ๐ > 100๐ log ๐. If ๐ดโฒ^ is a random ๐ ร ๐ + 1 matrix over โค๐, then with probability at least 1 โ 2โ๐^ over the choice of ๐ดโฒ, the distribution ๐๐ดโฒ over โค๐+1๐ which is obtained by choosing ๐ค at random in {0, 1}๐^ and outputting ๐คโค๐ดโฒ^ has at most 2 โ๐^ statistical distance from the uniform distribution over โค๐+1๐. Note that the randomness used for the distribution ๐๐ดโฒ is only obtained by the choice of ๐ค, and not by the choice of ๐ดโฒ^ that is fixed. (This passes a basic โsanity checkโ since ๐ค has ๐ random bits, while the uniform distribution over โค๐๐ requires ๐ log ๐ โช ๐ random bits, and hence ๐๐ดโฒ at least has a โfighting chanceโ in being statisti- cally close to it.) Another way to state the same claim is that the pair (๐ดโฒ, ๐คโค๐ดโฒ) is statistically indistinguishable from the uniform distribu- tion (๐ดโฒ, ๐ง) where ๐ง is a vector chosen independently at random from โค๐+1๐. The claim completes the proof of the lemma, since letting ๐ดโฒ^ be the matrix (๐ด|๐ฆ) and ๐ง = (๐, ๐), we see that the distribution ๐ทโฒ, as the form (๐ดโฒ, ๐ง) where ๐ดโฒ^ is a uniformly random ๐ ร (๐ + 1) matrix and ๐ง is sampled from ๐๐ดโฒ (i.e., ๐ง = ๐คโค๐ดโฒ^ where ๐ค is uniformly chosen in {0, 1}๐). Hence this means that the statistical distance of ๐ทโฒ^ from ๐ท (where all elements are uniform) is ๐(2โ๐). (Please make sure you understand this reasoning!) Proof of claim: The proof of this claim relies on the leftover hash lemma. First, the basic idea of the proof: For every ๐ ร (๐ + 1) matrix ๐ดโฒ over โค๐, define โ๐ดโฒ โถ โค๐๐ โ โค๐+1๐ to be the map โ๐ดโฒ (๐ค) = ๐คโค๐ดโฒ. This collection can be shown to be a โgoodโ hash function collection in some specific technical sense, which in particular implies that for every distribution ๐ท with much more than ๐ log ๐ bits of min-entropy, with all but negligible probability over the choice of ๐ดโฒ, โ๐ดโฒ (๐ท) is sta- tistically indistinguishable from the uniform distribution. Now when we choose ๐ค at random in {0, 1}๐, it is coming from a distribution with ๐ bits of entropy. If ๐ โซ (๐ + 1) log ๐, then because the output of this function is so much smaller than ๐, we expect it to be completely uniform, and this is whatโs shown by the leftover hash lemma. Now weโll formalize this blueprint. First we need the leftover hash lemma.
Lemma 11.6 Fix ๐ > 0. Let โ be a universal hash family with functions โ โถ ๐ฒ โ ๐ฑ. Let ๐ be a random variable with output in ๐ฒ with ๐ปโ(๐ ) โฅ log |๐ฑ| + 2 log(1/๐) โ 2. Then (๐ป(๐ ), ๐ป) where ๐ป follows a uniform distribution over โ has statistical difference less than ๐ from (๐ , ๐ป) where ๐ is uniform over ๐ฑ.
250 an intensive introduction to cryptography
(^8) This is based on notes from Daniel Wichsโs class
To explain what a universal hash family is, a family โ of functions โ โถ ๐ฒ โ ๐ฑ is a universal hash family if Prโโ๐ โ[โ(๐ฅ) = โ(๐ฅโฒ)] โค (^) |๐ฑ|^1 for all ๐ฅ โ ๐ฅโฒ. First, letโs see why Lemma 11.6 implies the claim. Consider the hash family โ = {โ๐ดโฒ }, where โ๐ดโฒ โถ โค๐๐ โ โค๐+1๐ is defined by โ๐ดโฒ (๐ค) = ๐คโค๐ดโฒ. For this hash family, the probability over ๐ดโฒ^ of ๐ค โ ๐คโฒ colliding is Pr๐ดโฒ [๐คโค๐ดโฒ^ = ๐คโฒโค๐ดโฒ] = Pr๐ดโฒ [(๐ค โ ๐คโฒ)โค๐ดโฒ^ = 0]. Since ๐ดโฒ^ is random, this is 1/(๐๐+1). So โ is a universal hash family. The min entropy of ๐ค โ๐ {0, 1}๐^ is the same as the entropy (be- cause it is uniform) which is ๐. The output of the hash family is in โค๐+1๐ , and log |โค๐+1๐ | = (๐ + 1) log ๐. Since ๐ โฅ (๐ + 1) log ๐ + 20๐ โ 2 by assumption, Lemma 11.6 implies that (๐คโค๐ดโฒ, ๐ดโฒ) is 2 โ10๐^ close in terms of statistical distance to (๐ง, ๐ดโฒ) where ๐ง is chosen uniformly in โค๐+1๐. Now, weโll show this implies that for probability โฅ 1 โ 2โ๐^ over the selection of ๐ดโฒ, the statistical distance between ๐คโค๐ดโฒ^ and ๐ง is less than 2 โ๐. If not, the distance between (๐คโค๐ดโฒ, ๐ดโฒ) and (๐ง, ๐ดโฒ) would be at least 2 โ๐^ โ 2โ๐^ > 2โ10๐. Proof of Lemma 11.6:^8 Let ๐ be the random variable (๐ป(๐ ), ๐ป), where the probability is over ๐ป and ๐. Let ๐โฒ^ be an independent copy of ๐. Step 1: Pr[๐ = ๐โฒ] โค (^) |โ|โ |๐ฑ|^1 (1 + 4๐^2 ). Indeed,
Pr[๐ = ๐โฒ] = Pr[(๐ป(๐ ), ๐ป) = (๐ปโฒ(๐ โฒ), ๐ปโฒ)] = Pr[๐ป = ๐ปโฒ] โ Pr[๐ป(๐ ) = ๐ป(๐ โฒ)]
=
|โ| (Pr[๐ = ๐^
โฒ] + Pr[๐ป(๐ ) = ๐ป(๐ โฒ) โง ๐ โ ๐ โฒ])
Step 2: The statistical difference between (๐ป(๐ ), ๐ป) and (๐ , ๐ป) is less than ๐. Denote the statistical difference by ฮ((๐ป(๐ ), ๐ป), (๐ , ๐ป)), then
โ,๐ค
โฃPr[๐ = (โ(๐ค), ๐ค)] โ
252 an intensive introduction to cryptography
integer vector. There can be many different bases for the same lattice, and some of them are easier to work with than others (see Fig. 11.3).
Figure 11.3 : A lattice is a discrete subspace ๐ฟ โ โ๐^ that is closed under integer combinations. A basis for the lattice is a minimal set ๐ 1 , โฆ , ๐๐ (typically ๐ = ๐) such that every ๐ข โ ๐ฟ is an integer combination of ๐ 1 , โฆ , ๐๐. The same lattice can have different bases. In this figure the lattice is a set of points in โ^2 , and the black vectors ๐ฃ 1 , ๐ฃ 2 and the ref vectors ๐ข 1 , ๐ข 2 are two alternative bases for it. Generally we consider the basis ๐ข 1 , ๐ข 2 โbetterโ since the vectors are shorter and it is less โskewedโ.
Some classical computational questions on lattices are:
In particular, if ๐ is a linear subspace of โค๐๐ , we can think of it also as a lattice ๐ ฬof โ๐^ where we simply say that that a vector ๐ขฬ is in ๐ ฬif all of ๐ขฬโs coordinates are integers and if we let ๐ข๐ =ฬ ๐ข๐ (mod ๐) then ๐ข โ ๐. The learning with error task of recovering ๐ฅ from ๐ด๐ฅ + ๐ can then be thought of as an instance of the bounded distance decoding problem for ๐ ฬ. A natural algorithm to try to solve the closest vector and bounded distance decoding problems is that to take the vector ๐ข, express it in the basis ๐ต by computing ๐ค = ๐ตโ1๐ข, and then round all the coordinates of ๐ค to obtain an integer vector ๐คฬ and let ๐ฃ = ๐ตฬ๐ค be a vector in the lattice. If we have an extremely good basis ๐ฟ for the lattice then ๐ฃ may indeed be the closest vector in the lattice, but in other more โskewedโ bases it can be extremely far from it.
lattice based cryptography 253
11.6 RING BASED LATTICES
One of the biggest issues with lattice based cryptosystem is the key size. In particular, the scheme above uses an ๐ ร ๐ matrix where each entry takes log ๐ bits to describe. (It also encrypts a single bit using a whole vector, but more efficient โmulti-bitโ variants are known.) Schemes using ideal lattices are an attempt to get more practical vari- ants. These have very similar structure except that the matrix ๐ด cho- sen is not completely random but rather can be described by a single vector. One common variant is the following: we fix some polynomial ๐ over โค๐ with degree ๐ and then treat vectors in โค๐๐ as the coefficients of ๐ โ 1 degree polynomials and always work modulo this polynomial ๐(). (By this I mean that for every polynomial ๐ก of degree at least ๐ we write ๐ก as ๐๐ + ๐ where ๐ is the polynomial above, ๐ is some poly- nomial and ๐ is the โremainderโ polynomial of degree < ๐; then ๐ก (mod ๐) = ๐.) Now for every fixed polynomial ๐ก, the operation ๐ด๐ก which is defined as ๐ โฆ ๐ก๐ (mod ๐) is a linear operation mapping polynomials of degree at most ๐ โ 1 to polynomials of degree at most ๐ โ 1, or put another way, it is a linear map over โค๐๐. However, the map ๐ด๐ can be described using the ๐ coefficients of ๐ก as opposed to the ๐^2 description of a matrix. It also turns out that by using the Fast Fourier Transform we can evaluate this operation in roughly ๐ steps as opposed to ๐^2. The ideal lattice based cryptosystem use matrices of this form to save on key size and computation time. It is still unclear if this structure can be used for attacks; recent papers attacking principal ideal lattices have shown that one needs to be careful about this. One ideal-lattice based system is the โNew Hopeโ cryptosystem (see also paper) that has been experimented with by Google. People have also made highly optimized general (non ideal) lattice based constructions, see in particular the โFrodoโ system (paper here, can you guess whatโs behind the name?). Both New Hope and Frodo have been submitted to the NIST competition to select a โpost quantumโ public key encryption standard.