An Introduction to the Theory of Lattices and Applications to Cryptography Joseph H
Total Page:16
File Type:pdf, Size:1020Kb
An Introduction to the Theory of Lattices and Applications to Cryptography Joseph H. Silverman Brown University and NTRU Cryptosystems, Inc. Summer School on Computational Number Theory and Applications to Cryptography University of Wyoming June 19 { July 7, 2006 0 An Introduction to the Theory of Lattices Outline ² Introduction ² Lattices and Lattice Problems ² Fundamental Lattice Theorems ² Lattice Reduction and the LLL Algorithm ² Knapsack Cryptosystems and Lattice Cryptanaly- sis ² Lattice-Based Cryptography ² The NTRU Public Key Cryptosystem ² Convolution Modular Lattices and NTRU Lattices ² Further Reading An Introduction to the Theory of Lattices { 1{ An Introduction to the Theory of Lattices Public Key Cryptography and Hard Mathematical Problems ² Underlying every public key cryptosystem is a hard mathematical problem. ² Unfortunately, in very few instances is there a proof that breaking the cryptosystem is equivalent to solving the hard mathematical problem. But we won't worry about that for now! ² The best known examples are: RSA Integer Factorization Problem ¤ Di±e-Hellman Discrete Logarithm Problem in Fq ECC Discrete Logarithm Problem on an Elliptic Curve An Introduction to the Theory of Lattices { 2{ An Introduction to the Theory of Lattices A Di®erent Hard Problem for Cryptography ² There are many other hard mathematical problems that one might use for cryptography. ² An appealing class of problems involves ¯nding clos- est and shortest vectors in lattices. ² The general Closest Vector Problem (CVP) is known to be NP-hard and the Shortest Vector Problem (SVP) is NP-hard under a randomized reduction hypothesis. ² In this lecture I will discuss the mathematics of lattices, alogrithms to solve SVP and CVP, and give some applications to breaking cryptosystems. In the next lecture I will describe some cryptosys- tems that are based on the di±culty of solving SVP and CVP. An Introduction to the Theory of Lattices { 3{ Lattices and Lattice Problems Lattices and Lattice Problems Lattices | De¯nition and Notation De¯nition. A lattice L of dimension n is a maximal discrete subgroup of Rn. Equivalently, a lattice is the Z-linear span of a set of n linearly independent vectors: L = fa1v1 + a2v2 + ¢ ¢ ¢ + anvn : a1; a2; : : : ; an 2 Zg: The vectors v1;:::; vn are a Basis for L. Lattices have many bases. Some bases are \better" than others. A fundamental domain for the quotient Rn=L is the set F(L) = ft1v1 + t2v2 + ¢ ¢ ¢ + tnvn : 0 · ti < 1g: The Discriminant (or \volume") of L is ¡ ¢ Disc(L) = Volume(F(L)) = det v1jv2j ¢ ¢ ¢ jvn : An Introduction to the Theory of Lattices { 4{ Lattices and Lattice Problems A Two Dimensional Example v 6 v v v v v v v L x ÃÃÃÃÃà ÃÃÃÃÃÃÃ÷·· ÃÃÃÃ÷·Ã··Ã÷·Ãà ÃÃÃÃÃ÷÷··Ã·Ã· Ã÷·Ã÷·· ÃÃÃÃÃ÷·Ã·Ã·Ã·Ã÷÷·Ã··ÃÃà ÃÃÃÃÃÃ÷÷·Ã··Ã· Ã÷·Ã··Ã·Ã·ÃÃ÷··Ã÷· ÃxÃÃ÷÷·Ã·Ã··ÃÃ÷·Ã··Ã·Ã· Ã÷÷÷÷·ÃÃà ÃÃ÷÷·Ã··ÃÃ÷·Ã··Ã·ÃÃÃ÷·Ã··Ã··ÃÃ÷·Ã÷Ã÷· ·Ã·Ã··ÃÃ÷·Ã··Ã·Ã· Ã÷·Ã·Ã···ÃÃÃ÷·Ã··Ã··ÃÃà ÷÷·Ã··Ã·ÃÃ÷÷·Ã··Ã· Ã÷÷·Ã··Ã·ÃÃ÷÷Ã÷·· ÷÷ÃÃ÷·Ã·Ã··ÃÃÃ÷·Ã··Ã·ÃÃ÷·Ã··Ã·Ã·ÃÃà ÷÷·Ã÷·Ã·Ã÷÷·Ã··Ã·ÃÃ÷÷·Ã··Ã·ÃÃ÷·Ã÷·· v ÷·ÃÃ÷÷÷÷·ÃÃ÷÷··Ã·ÃÃÃ÷·Ã··Ã··ÃÃà v ÷÷·Ã··Ã·Ã÷Ã÷·Ã··Ã·Ã÷÷·Ã··Ã÷ÃÃ÷·Ã÷·· ÷·ÃÃ÷÷··Ã·ÃÃÃ÷·ÃF··Ã·ÃÃ÷·Ã·Ã·Ã··ÃÃà ÷Ã÷·Ã··Ã·Ã÷÷·Ã··Ã·ÃÃ÷÷·Ã··Ã· ÃÃ÷·Ã÷Ã÷· ÷·ÃÃÃ÷÷··Ã·ÃÃ÷·Ã·Ã··ÃÃÃ÷·Ã··Ã··ÃÃà ÷÷·Ã··Ã·ÃÃ÷÷·Ã··Ã·Ã÷÷·Ã··Ã·ÃÃ÷·Ã·Ã÷·· ÷÷ÃÃ÷··Ã·Ã··ÃÃ÷÷·Ã·Ã··Ã÷÷÷··Ã·ÃÃÃ÷x ÷÷·Ã÷·ÃÃ÷÷·Ã··ÃÃÃ÷÷·Ã··ÃÃ÷÷·Ã÷· ÷·Ã÷÷÷÷÷·Ã÷÷÷··Ã·ÃÃÃ÷÷·Ã··Ã· ÷·Ã··Ã··ÃÃ÷·Ã÷·Ã··ÃÃ÷·Ã··Ã·· ÷ÃÃ÷÷÷·Ã·ÃÃ÷÷·Ã··Ã ÷·Ã··Ã·Ã·ÃÃ÷·Ã··Ã·· ÷Ã÷÷·Ã···Ã v ÷x÷·Ã··Ã· - v A 2-dimensional lattice L with fundamental domain F An Introduction to the Theory of Lattices { 5{ Lattices and Lattice Problems The Two Fundamental Hard Lattice Problems Let L be a lattice of dimension n. The two most im- portant computational problems are: Shortest Vector Problem (SVP) Find a shortest nonzero vector in L. Closest Vector Problem (CVP) Given a vector t 2 Rn not in L, ¯nd a vector in L that is closest to t. The Approximate Closest Vector Problem (apprCVP) is to ¯nd a vector v 2 L so that kv ¡ tk is small. For example, kv ¡ tk · · min kw ¡ tk w2L for a small constant ·. An Introduction to the Theory of Lattices { 6{ Lattices and Lattice Problems Using a Basis to Try to Solve the Closest Vector Problem 6 t Draw a fundamental domain t t around the target point t ÃÃÃt ÃÃà · ÃÃà ÃÃà · ÃÃà ÃÃà · tà · · · · · · t t t x · · · · · L · ·t · ÃÃÃà ÃÃà · ÃÃà ÃÃà · ÃÃà ·Ãt Ãà t t t t t - t Use a basis for the lattice to draw a parallelogram around the target point. An Introduction to the Theory of Lattices { 7{ Lattices and Lattice Problems Using a Basis to Try to Solve the Closest Vector Problem 6 t t t ÃÃÃt ÃÃà · ÃÃà ÃÃà · ÃÃà ÃÃà · tà · · · · · · t t t x · · · · · L · ·x · ÃÃÃà ÃÃà · ÃÃà ÃÃà · ÃÃà v t·ÃÃà The vertex v that is closest t to t is a candidate for (approximate) closest vector t t - The vertex v of the fundamental domain that is closest to t will be a close lattice point if the basis is \good", meaning if the basis consists of short vectors that are reasonably orthogonal to one another. An Introduction to the Theory of Lattices { 8{ Lattices and Lattice Problems Good and Bad Bases s s s s s s s s s s s s s s s s s s s s s s s s s s s s s 6 s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s ³³1 »»»: ³³ »»» s s s s s s ³³s s »» s s ³³ »»» ³³ »»» s s s s s ³³ s »» s s s s ³³ »»» ³³ »»» s s s ³³s »»s s s s s s ³³ »»» s s s ³³s »»» s s s s s s ³³ »» ³³ »» s s ³ »s» s s s s s s s ©* ³»³»» ©»³©»³» s»³©»³ s s s s s s s s - s @ s @Rs s s s s s s s s s s s s s s s s s A \good" basis and a \bad" basis An Introduction to the Theory of Lattices { 9{ Lattices and Lattice Problems The Closest Vertex Method Using a Bad Basis s s s s s s s s s s s s s s s s s s s s s s s s s s s s s 6 s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s »»» s s s s s s s s s s»»» »»» s s s s s s s s »s» s ³³ »»» ³³ »»» ³³ s s s s s s »s » s ³s ³ s ³³ »»» ³³ »»» s s s s s s ³³s s »» s s ³³ »»» ³³ »»» s s s Targets Points ³³ s »» s s s s ³³ x »»» ³³ »»» s s s ³³s »»s s s s s s ³³ »»» s s s ³³s »»» s s s s s s ³³ »» ³³ »» s s ³ »s» s s s s s s s ³»³»» »³»³» s»³»³ s s s s s s s s - s s s s s s s s s s s s s s s s s s s s Here is the parallelogram spanned by a \bad" basis and a CVP target point. An Introduction to the Theory of Lattices { 10{ Lattices and Lattice Problems The Closest Vertex Method Using a Bad Basis s s s s s s s s s s s s s s s s s s s s s s s s s s s s s 6 s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s »»» s s s s s s s s s s»»» »»» s s s s s s s s »s» s ³³ »»» ³³ Closest Vertex »»» ³³ s s s s s s x»s » s ³s ³ s ³³ »»» ³³ »»» s s s s s s ³³s s »» s s ³³ »»» ³³ »»» s s s Targets Points ³³ s »» s s s s ³³ x »»» ³³ »»» s s s ³³s »»s s s s s s ³³ »»» s s s ³³s »»» s s s s s s ³³ »» ³³ »» s s ³ »s» s s s s s s s ³»³»» »³»³» s»³»³ s s s s s s s s - s s s s s s s s s s s s s s s s s s s s It is easy to ¯nd the vertex of the parallelogram that is closest to the target point.