Ideal Lattices and Ring-LWE

Slides:



Advertisements
Similar presentations
Efficient Lattice (H)IBE in the standard model Shweta Agrawal, Dan Boneh, Xavier Boyen.
Advertisements

Shortest Vector In A Lattice is NP-Hard to approximate
Fearful Symmetry: Can We Solve Ideal Lattice Problems Efficiently?
Mathematics of Cryptography Part II: Algebraic Structures
Foundations of Cryptography Lecture 10 Lecturer: Moni Naor.
Cryptography and Network Security
22C:19 Discrete Structures Integers and Modular Arithmetic
Notation Intro. Number Theory Online Cryptography Course Dan Boneh
The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11.
7. Asymmetric encryption-
New Lattice Based Cryptographic Constructions
Lattice-Based Cryptography. Cryptographic Hardness Assumptions Factoring is hard Discrete Log Problem is hard  Diffie-Hellman problem is hard  Decisional.
1 The RSA Algorithm Supplementary Notes Prepared by Raymond Wong Presented by Raymond Wong.
Session 4 Asymmetric ciphers.
Simple Lattice Trapdoor Sampling from a Broad Class of Distributions Vadim Lyubashevsky and Daniel Wichs.
Lattice-Based Cryptography
Oded Regev Tel-Aviv University On Lattices, Learning with Errors, Learning with Errors, Random Linear Codes, Random Linear Codes, and Cryptography and.
Introduction Polynomials
CSE 321 Discrete Structures Winter 2008 Lecture 8 Number Theory: Modular Arithmetic.
Lattice-Based Cryptography
ON THE PROVABLE SECURITY OF HOMOMORPHIC ENCRYPTION Andrej Bogdanov Chinese University of Hong Kong Bertinoro Summer School | July 2014 based on joint work.
1 NTRU: A Ring-Based Public Key Cryptosystem Jeffrey Hoffstein, Jill Pipher, Joseph H. Silverman LNCS 1423, 1998.
Foundations of Cryptography Lecture 9 Lecturer: Moni Naor.
1 CIS 5371 Cryptography 8. Asymmetric encryption-.
The RSA Algorithm Rocky K. C. Chang, March
Integers Number Theory = Properties of Integers
10.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 10 Symmetric-Key Cryptography.
FINITE FIELDS 7/30 陳柏誠.
CPSC 3730 Cryptography and Network Security
Information Security and Management 4. Finite Fields 8
The Polynomial Time Algorithm for Testing Primality George T. Gilbert.
By: Hector L Contreras SSGT / USMC
Great Theoretical Ideas in Computer Science.
Cryptography Dec 29. This Lecture In this last lecture for number theory, we will see probably the most important application of number theory in computer.
Learning Parities with Structured Noise Sanjeev Arora, Rong Ge Princeton University.
CS555Spring 2012/Topic 51 Cryptography CS 555 Topic 5: Pseudorandomness and Stream Ciphers.
Vadim Lyubashevsky INRIA / ENS, Paris
Lattice-Based Cryptography: From Practice to Theory to Practice Vadim Lyubashevsky INRIA / CNRS / ENS Paris (September 12, 2011)
Session 1 Stream ciphers 1.
Chapter 4 – Finite Fields
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
Data Security and Encryption (CSE348) 1. Lecture # 12 2.
Great Theoretical Ideas in Computer Science.
Information Security Lab. Dept. of Computer Engineering 87/121 PART I Symmetric Ciphers CHAPTER 4 Finite Fields 4.1 Groups, Rings, and Fields 4.2 Modular.
Information and Coding Theory Cyclic codes Juris Viksna, 2015.
China Summer School on Lattices and Cryptography Craig Gentry and Shai Halevi June 4, 2014 Homomorphic Encryption over Polynomial Rings.
Cryptography and Network Security Chapter 4. Introduction  will now introduce finite fields  of increasing importance in cryptography AES, Elliptic.
Lattice-based cryptography and quantum Oded Regev Tel-Aviv University.
1 CSC 421: Algorithm Design & Analysis Spring 2014 Complexity & lower bounds  brute force  decision trees  adversary arguments  problem reduction.
CRYPTOGRAPHY AND NP-HARDNESS Andrej Bogdanov Chinese University of Hong Kong MACS Foundations of Cryptography| January 2016.
1/16 Seeing through M IST given a Small Fraction of an RSA Private Key Colin D. Walter Comodo Research Lab (Bradford, UK)
1 The unique-SVP World 1. Ajtai-Dwork’97/07, Regev’03  PKE from worst-case uSVP 2. Lyubashvsky-Micciancio’09  Relations between worst-case uSVP, BDD,
Lecture 3.1: Public Key Cryptography I CS 436/636/736 Spring 2015 Nitesh Saxena.
Applied Symbolic Computation1 Applied Symbolic Computation (CS 567) The Fast Fourier Transform (FFT) and Convolution Jeremy R. Johnson TexPoint fonts used.
May 9, 2001Applied Symbolic Computation1 Applied Symbolic Computation (CS 680/480) Lecture 6: Multiplication, Interpolation, and the Chinese Remainder.
Directions in Practical Lattice Cryptography Vadim Lyubashevsky IBM Research – Zurich.
1 The RSA Algorithm Rocky K. C. Chang February 23, 2007.
week 8Complexity of Algorithms1 Elementary Number Theory Given positive integers a and b, we use the notation a¦b to indicated that a divides b, i.e.,
On the Size of Pairing-based Non-interactive Arguments
On Bounded Distance Decoding, Unique Shortest Vectors, and the
The Learning With Errors Problem
Background: Lattices and the Learning-with-Errors problem
Lattice Signature Schemes
Equivalence of Search and Decisional (Ring-) LWE
Vadim Lyubashevsky INRIA / ENS, Paris
Public-key encryption
Vadim Lyubashevsky IBM Research -- Zurich
Cryptography Lecture 20.
Presentation transcript:

Ideal Lattices and Ring-LWE Vadim Lyubashevsky INRIA / ENS, Paris

Ideal lattices

Cyclic Lattices A set L in Zn is a cyclic lattice if: 1.) For all v,w in L, v+w is also in L -1 2 3 -4 + -7 -2 3 6 = -8 6 2 2.) For all v in L, -v is also in L -1 2 3 -4 1 -2 -3 4 3.) For all v in L, a cyclic shift of v is also in L -4 3 2 -1 3 2 -1 -4 -4 3 2 -1 -4 3 2 -1

Cyclic Lattices = Ideals in Z[x]/(xn-1) A set L in Zn is a cyclic lattice if L is an ideal in Z[x]/(xn-1) 1.) For all v,w in L, v+w is also in L -1 2 3 -4 + -7 -2 3 6 = -8 6 2 (-1+2x+3x2-4x3) + (-7-2x+3x2+6x3)= (-8+0x+6x2+2x3) 2.) For all v in L, -v is also in L -1 2 3 -4 1 -2 -3 4 (-1+2x+3x2-4x3) (1-2x-3x2+4x3) 3.) For all v in L, a cyclic shift of v is also in L vx is also in L -4 3 2 -1 -1+2x+3x2-4x3 3 2 -1 -4 (-1+2x+3x2-4x3)x=-4-x+2x2+3x3 -4 3 2 -1 (-1+2x+3x2-4x3)x2 =3-4x-x2+2x3 -4 3 2 -1 (-1+2x+3x2-4x3)x3 =2+3x-4x2-x3

Why Cyclic Lattices? Succinct representations Algebraic structure Can represent an n-dimensional lattice with 1 vector Algebraic structure Allows for fast arithmetic (using FFT) Makes proofs possible NTRU cryptosystem One-way functions based on worst-case hardness of SVP in ideal lattices [Mic02]

Is SVPpoly(n) Hard for Cyclic Lattices? Short answer: we don't know but conjecture it is. What's wrong with the following argument that SVPn is easy? -4 3 2 -1 4 1 v is a shortest vector in L -4 3 2 -1 1 4 -4 3 2 -1 1 4 Also in L + -4 3 2 -1 1 4 -4 3 2 -1 10 Length at most n||v|| Algorithm for solving SVPn(L) for a cyclic lattice L: 1. Construct 1-dimensional lattice L'=L ∩ {1n} 2. Find and output the shortest vector in L'

The Hard Cyclic Lattice Instances -4 3 2 -1 v is a shortest vector in L -4 3 2 -1 1n -4 3 2 -1 Also in L + -4 3 2 -1 -4 3 2 -1 Length at most n||v|| The “hard” instances of cyclic lattices lie on plane P perpendicular to the 1n vector In algebra language: If R=Z[x]/(xn-1), then 1n = (xn-1+xn-2+...+1) ≈ Z[x]/(x-1) P = (x-1) ≈ Z[x]/(xn-1+xn-2+...+1)

f-Ideal Lattices = Ideals in Z[x]/(f) Want f to have 3 properties: Monic (i.e. coefficient of largest exponent is 1) Irreducible over Z For all polynomials g,h ||gh mod f||<poly(n)||g||∙||h|| Conjecture: For all f that satisfy the above 3 properties, solving SVPpoly(n) for ideals in Z[x]/(f) takes time 2Ω(n). Some “good” f to use: f=xn-1+xn-2+...+1 where n is prime f=xn+1 where n is a power of 2

(xn+1)-Ideal Lattices = Ideals in Z[x]/(xn+1) A set L in Zn is a (xn+1)-ideal lattice if L is an ideal in Z[x]/(xn+1) 1.) For all v,w in L, v+w is also in L -1 2 3 -4 + -7 -2 3 6 = -8 6 2 (-1+2x+3x2-4x3) + (-7-2x+3x2+6x3)= (-8+0x+6x2+2x3) 2.) For all v in L, -v is also in L -1 2 3 -4 1 -2 -3 4 (-1+2x+3x2-4x3) (1-2x-3x2+4x3) 3.) For all v in L, vx is also in L -4 3 2 -1 -1+2x+3x2-4x3 3 2 -1 4 (-1+2x+3x2-4x3)x=4-x+2x2+3x3 -4 3 2 -1 4 -3 (-1+2x+3x2-4x3)x2 =-3+4x-x2+2x3 -4 3 2 -1 4 -3 -2 (-1+2x+3x2-4x3)x3 =-2-3x+4x2-x3

Hardness of Problems for General and (xn+1)-Ideal Lattices Exact Versions Poly(n)-approximate Versions General (xn+1)-ideal General (xn+1)-ideal SVP NP-hard ? SVP ? ? SIVP NP-hard ? SIVP ? ? GapSVP NP-hard ? GapSVP ? Easy uSVP NP-hard N/A uSVP ? N/A BDD NP-hard ? BDD ? ? Legend: ?: No hardness proofs nor sub-exponential time algorithms are known. Colored boxes: Problems are equivalent

||v|| = ||vx|| = ||vx2|| = ||vx3|| SVP = SIVP Lemma: If v is a vector in Z[x]/(f) where f is a monic, irreducible polynomial of degree n, then v, vx, vx2, ... vxn-1 are linearly independent. -4 3 2 -1 4 1 Shortest vector v 3 2 1 -4 vx ||v|| = ||vx|| = ||vx2|| = ||vx3|| -4 3 2 -1 1 -3 vx2 -4 3 2 -1 1 -3 -2 vx3 Corollary: A (xn+1)-ideal lattice cannot have a unique shortest vector.

det(L)1/n ≤ λ1(L) ≤ √n det(L)1/n GapSVP√n is easy Fact: For all (xn+1)-ideal lattices L, det(L)1/n ≤ λ1(L) ≤ √n det(L)1/n So det(L)1/n is a √n – approximation of λ1(L) Proof of fact: 1. λ1(L) ≤ √n det(L)1/n is Minkowski's theorem. 2. Let v be the shortest vector of L. Define L'=(v). (i.e. L' is generated by vectors v, vx, vx2, ... vxn-1) L' is a sublattice of L, so we have det(L) ≤ det(L') ≤ ||v||n = ( λ1(L) )n

Ring-sis and hash functions [Mic ‘02, PeiRos ‘06, LyuMic ‘06]

SIS Source of Inefficiency A z 4 11 6 8 10 7 6 14 1 7 7 1 2 13 3 = h(z) n 2 9 12 5 1 2 5 9 1 3 14 9 7 1 11 1 1 m 1 1 Requires O(nm) storage Computing the function takes O(nm) time

A More Efficient Idea z A = h(z) Now A only requires O(m) storage 4 -1 -2 -7 10 -7 -1 -13 1 7 4 -1 -2 13 10 -7 -1 = h(z) n 2 7 4 -1 1 13 10 -7 1 2 7 4 7 1 13 10 1 m 1 1 Now A only requires O(m) storage Az can be computed faster as well

(4+7x+2x2+x3)(1+x3) +(10+13x+x2+7x3)(x+x2) A More Efficient Idea A z (4+7x+2x2+x3)(1+x3) +(10+13x+x2+7x3)(x+x2) in Zp[x]/(xn+1)

Ring-SIS Given k random polynomials a1, … ,ak in Zp[x]/(xn+1), find “small” polynomials z1, … ,zk such that a1z1+ … +akzk = 0

Collision-Resistant Hash Functions Digital Signatures Approximate SVP in (xn+1)-ideal Lattices Worst-Case Average-Case Ring-SIS One-Way Functions Collision-Resistant Hash Functions Digital Signatures Identification Schemes (Minicrypt)

Ring-lwe [LyuPeiReg ‘10]

Source of Inefficiency in LWE Constructions 4 11 6 8 7 7 1 2 2 9 12 5 1 3 14 9 + m = 10 7 6 14 13 3 1 2 5 9 7 1 11 1 n

Use the Same “Efficient Idea”? 4 -1 -2 -7 7 4 -1 -2 2 7 4 -1 1 2 7 4 + m = 10 -7 -1 -13 13 10 -7 -1 1 13 10 -7 7 1 13 10 n

Public Key Encryption … Approximate SVP in (xn+1)-ideal Lattices Worst-Case (quantum reduction) Average-Case Learning With Errors Problem (LWE) Public Key Encryption … (Cryptomania)

Ring-LWE Ring R=Zq[x]/(xn+1) Given: a1, a1s+e1 a2, a2s+e2 … ak, aks+ek Find: s s is random in R ei are “small” (distribution symmetric around 0)

Decision Ring-LWE Ring R=Zq[x]/(xn+1) Given: a1, b1 a2, b2 … ak, bk Question: Does there exist an s and “small” e1, … , ek such that bi=ais+ei or are all bi uniformly random in R?

Decision Ring-LWE Problem World 1: s in R ai random in R ei random and “small” (a1,b1 = a1s+e1) (a2,b2= a2s+e2) … (ak,bk = aks+ek) Decision Ring-LWE Oracle I am in World 1 (or 2) World 2: ai,bi random in R (a1,b1) (a2,b2) … (ak,bk)

What We Want to Construct s in ring R ai uniformly random in ring R ei random and “small” (a1,b1 = a1s+e1) (a2,b2= a2s+e2) … (ak,bk = aks+ek) Search Ring-LWE Solver s I am in World 1 (or 2) Decision Ring-LWE Oracle For LWE, this is very easy. For Ring-LWE, it is not as easy and introduces some restrictions.

uniformly random in Zpm Decision LWE Problem World 1 a1 a1 . . . b a2 . . . s e b a2 + = am am World 2 a1 Decision LWE Oracle . . . b a2 am uniformly random in Zpm I am in World 1 (or 2)

Search LWE < Decision LWE Use the Decision oracle to figure out the coefficients of s one at a time Let g be our guess for the first coefficient of s Repeat the following: Receive LWE pair (a,b) If g is right, then we are sending a distribution from World 1 If g is wrong, then we are sending a distribution from World 2 We will find the right g in O(p) time Use the same idea to recover all coefficients of s one at a time 2 13 7 3 8 1 * + 13 = 3 a b 12 5 Pick random r in Z17 Send sample below to the Decision Oracle 2+r 13 7 3 13+rg

Difference between LWE and Ring-LWE LWE: Getting just one extra random-looking number requires n random numbers On the other hand, just need to guess one bit of the secret to make valid instance 2 13 7 3 8 + 1 * = 13 3 12 5 Ring-LWE: get n random numbers and produce O(n) pseudo-random numbers in “one shot” On the other hand, need to guess all bits of the secret to make valid instance 2 8 1 13 3 -1 Still, a reduction is possible for all cyclotomic rings! + = 7 12 2 3 5 -1

The Ring R=Z17[x]/(x4+1) x4+1 = (x-2)(x-8)(x+2)(x+8) mod 17 Every polynomial z in R has a unique “Chinese Remainder” representation (z(2), z(8), z(-2), z(-8)) For any c in Z17, and two polynomials z, z' z(c)+z'(c) = (z+z')(c) z(c)∙z'(c) = (z∙z')(c)

Example (1 + x + 7x2 - 5x3) ∙ (5 - 3x + 4x2 + 3x3) + (1 + x - x2 + x3) = (-6 +2x - x2 - 4x3) ∙ + = 8 5 -1 -8 5 5 3 7 7 -2 4 -5 -4 6 1 7

Representation of Elements in R=Z17[x]/(x4+1) (x4+1) = (x-2)(x-23)(x-25)(x-27) mod 17 = (x-2)(x-8)(x+2)(x+8) Represent polynomials z(x) as (z(2), z(8), z(-2), z(-8)) ( ) (a(x),b(x)) = , a(2) a(8) a(-2) a(-8) b(2) b(8) b(-2) b(-8) Notation: means that the coefficients that should be b(2) and b(8) are instead uniformly random b(-2) b(-8)

Learning One Position of the Secret ( ) Decision Ring-LWE Oracle , “I am in World 1” a(2) a(8) a(-2) a(-8) b(2) b(8) b(-2) b(-8) ( ) Decision Ring-LWE Oracle , a(2) a(8) a(-2) a(-8) b(8) b(-2) b(-8) “I am in World 1” ( ) Decision Ring-LWE Oracle , a(2) a(8) a(-2) a(-8) b(-2) b(-8) “I am in World 2” ( ) Decision Ring-LWE Oracle , a(2) a(8) a(-2) a(-8) b(-8) “I am in World 2” ( ) Decision Ring-LWE Oracle , “I am in World 2” a(2) a(8) a(-2) a(-8)

Learning One Position of the Secret ( ) Decision Ring-LWE Oracle , a(2) a(8) a(-2) a(-8) b(8) b(-2) b(-8) “I am in World 1” ( ) Decision Ring-LWE Oracle , “I am in World 2” a(2) a(8) a(-2) a(-8) b(-2) b(-8) Can learn whether this position is random or b(8)=a(8)∙s(8)+e(8) This can be used to learn s(8)

Learning One Position of the Secret Let g in Z17 be our guess for s(8) (there are 17 possibilities) We will use the decision Ring-LWE oracle to test the guess ( ) , a(2) a(8) a(-2) a(-8) b(2) b(8) b(-2) b(-8) Make the first position of f(b) uniformly random in Z17 ( ) , a(2) a(8) a(-2) a(-8) b(8) b(-2) b(-8) Pick random r in Z17 ( ) , a(2) a(8)+r a(-2) a(-8) b(8)+gr b(-2) b(-8) Send to the decision oracle If g=s(8), then (a(8)+r)∙s(8)+e(8)=b(8)+gr (Oracle says “W. 1”) If g≠s(8), then b(8)+gr is uniformly random in Z17 (Oracle says “W. 2”)

Learning the Other Positions We can use the decision oracle to learn s(8) How do we learn s(2),s(-2), and s(-8)? Idea: Permute the input to the oracle Make the oracle give us s'(8) for a different, but related, secret s'. From s'(8) we can recover s(2) (and s(-2) and s(-8))

A Possible Swap ( , ) Send to the decision oracle + + e(2) e(8) e(-2) e(-8) e(2) e(-2) e(8) e(-8) = = b(2) b(8) b(-2) b(-8) b(2) b(-2) b(8) b(-8) Send to the decision oracle ( , ) a(2) a(-2) a(8) a(-8) b(2) b(-2) b(8) b(-8) Is this a valid distribution??

A Possible Swap ( , ) Send to the decision oracle 5 - 3x + 4x2 + 3x3 5 + x + 8x3 5 5 3 7 5 3 5 7 1 + x + 7x2 - 5x3 8 5 -1 -8 8 -1 5 -8 1 - x - 5x2 - 7x3 + + WRONG DISTRIBUTION !! 1 + x - x2 + x3 7 -2 4 -5 7 4 -2 -5 1 + 3x - 6x2 + 3x3 = = -6 +2x - x2 - 4x3 -4 6 1 7 -4 -6 +6x + 6x2 1 6 7 Send to the decision oracle ( , ) 5 3 5 7 -4 1 6 7 Is this a valid distribution??

x4+1 = (x-2)(x-23)(x-25)(x-27) mod 17 Automorphisms of R x4+1 = (x-2)(x-23)(x-25)(x-27) mod 17 2 23 25 27 z(x) z(2) z(23) z(25) z(27) z(x3) z(x5) z(x7) roots of x4+1 z(x)

Automorphisms of R z(x) = z0 + z1x + z2x2 + z3x3 z(x3) = z0 + z1x3 + z2x6 + z3x9 = z0 + z3x - z2x2 + z1x3 z(x5) = z0 + z1x5 + z2x10 + z3x15 = z0 - z1x + z2x2 - z3x3 z(x7) = z0 + z1x7 + z2x14 + z3x21 = z0 - z3x - z2x2 - z1x3 If coefficients of z(x) have distribution D symmetric around 0, then so do the coefficients of z(x3), z(x5), z(x7) !!

Repeat the analogous procedure to recover s(-2), s(-8) A Correct Swap 5 - 3x + 4x2 + 3x3 5 + 3x - 4x2 - 3x3 5 5 3 7 5 5 7 3 1 + x + 7x2 - 5x3 8 5 -1 -8 5 8 -8 -1 1 - 5x - 7x2 + x3 + + 1 + x - x2 + x3 7 -2 4 -5 -2 7 -5 4 1 + x + x2 + x3 = = -6 + 2x - x2 - 4x3 -4 6 1 7 6 -6 -4x + x2 +2x3 -4 7 1 Send to the decision oracle ( , ) 5 5 7 3 6 -4 7 1 This will recover s(2). Repeat the analogous procedure to recover s(-2), s(-8)

Caveat The adversary is not worst-case, so he is not guaranteed to always work on all secrets s(x), s(x3), s(x5), s(x7) But … Ring-LWE (just like LWE) is random self-reducible given (a, b=as+e), we can pick a random s’ and output (a, b’= b+as’ = a(s+s’)+e) so the new secret is the uniformly-random s+s’ thus to recover every position, we always re-randomize the secret

Another Caveat … “If coefficients of z(x) have distribution D symmetric around 0, then so do the coefficients of z(x3), z(x5), z(x7) !! ” This only holds true for Z[x]/(xn+1) Can work with all cyclotomic polynomials by representing elements differently In a ring of integers R=Z[x]/(Φm(x)), z is thought of as σ(z) := (σ1(z), … , σφ(m)(z)) where σi is the ith canonical embedding (i.e. σi(z) = z(ζi) where ζi is the ith root of Φm(x)) So for all i and j relatively prime to m, z(xi) is a permutation of z(xj) i.e. σ(z(xi)) is a permutation of σ(z(xj))

Thanks