the learning with errors problem oded regev tel aviv university (for more details, see the survey...

41
The The Learning With Errors Learning With Errors Problem Problem Oded Regev Oded Regev Tel Aviv University Tel Aviv University (for more details, see the survey paper in the (for more details, see the survey paper in the proceedings) proceedings) Cambridge, 2010/6/11 Cambridge, 2010/6/11

Upload: mabel-felicia-shaw

Post on 17-Dec-2015

225 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

The The Learning With Errors Learning With Errors

ProblemProblem

Oded RegevOded RegevTel Aviv UniversityTel Aviv University

(for more details, see the survey paper in the proceedings)(for more details, see the survey paper in the proceedings)

Cambridge, 2010/6/11Cambridge, 2010/6/11

Page 2: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

OverviewOverview

Page 3: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

• A secret vector s in 174

• We are given an arbitrary number of equations, each correct up to 1

• Can you find s?

Learning With Errors (LWE) Learning With Errors (LWE) ProblemProblem

Page 4: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

LWE’s Claim to FameLWE’s Claim to Fame

Known to be as hard as worst-case lattice problems, which are believed to be exponentially hard (even against quantum computers)

Extremely versatile Basis for provably secure

and efficient cryptographic constructions

Page 5: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

LWE’s OriginsLWE’s Origins

The problem was first defined in [R05]

Already (very) implicit in the first work on lattice-based public key cryptography [AjtaiDwork97] (and slightly more explicit in [R03]) See the survey paper for more details

Page 6: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

LWE – More PreciselyLWE – More Precisely

8

3

12

5

• There is a secret vector s in qn

• An oracle (who knows s) generates a uniform

vector a in qn and noise e distributed normally

with standard deviation q.• The oracle outputs (a, b=a,s+e mod q)• This procedure is repeated with the same s and

fresh a and e• Our task is to find s

37132 1 13• + =

1974 -1 12

115146 2 3

Page 7: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

LWE – Parameters: n, q, LWE – Parameters: n, q, • The main parameter is n, the dimension• The modulus q is typically poly(n)

• Choosing exponential q increases size of input and makes applications much less efficient (but hardness is somewhat better understood)

• (The case q=2 is known as Learning Parity with Noise (LPN))

• The noise element e is chosen from a normal distribution with standard deviation q (rounded tothe nearest integer):

• The security proof requires q>n• The noise parameter is typically 1/poly(n)

• The number of equations does not really matter

q=113=0.05

Page 8: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

AlgorithmsAlgorithms

Page 9: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

Algorithm 1: More Luck Than Algorithm 1: More Luck Than SenseSense•Ask for equations until seeing several

“s1…”. E.g.,

•This allows us to deduce s1 and we can do the same for the other coordinates

•Running time and number of equations is 2O(nlogn)

Page 10: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

Algorithm 2: Maximum LikelihoodAlgorithm 2: Maximum Likelihood

•Easy to show: After about O(n) equations, the secret s is the only assignment that approximately satisfies the equations (hence LWE is well defined)

•We can therefore find s by trying all possible qn assignments

•We obtain an algorithm with running time qn=2O(nlogn) using only O(n) equations

Page 11: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

Algorithm 3: Algorithm 3: [BlumKalaiWasserman’03][BlumKalaiWasserman’03]

• Running time and number of equations is 2O(n)

• Best known algorithm for LWE (with usual setting of parameters)

• Idea: • First, find a small set S of equations (say, |S|=n)

such that Sai=(1,0,…,0). Do this by partitioning

the n coordinates into logn blocks of size n/logn and construct S recursively by finding collisions in blocks

• The sum of these equations gives a guess for s1

that is quite good

Page 12: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

Algorithm 4: Algorithm 4: [AroraGe’10][AroraGe’10]

•Running time and number of equations

is 2O((q)2)

•So for q<n, this gives a sub-exponential algorithm

• Interestingly, the LWE hardness proof [R05] requires q>n; only now we ‘know’ why!

• Idea: apply a polynomial that zeroes the noise, and solve by linearization

Page 13: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

VersatilityVersatility

Page 14: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

LWE is VersatileLWE is Versatile

Search to decision reduction

• Worst-case to average-case reduction (i.e., secret can be uniformly chosen)

The secret can be chosen from a normal distribution itself [ApplebaumCashPeikertSahai09], or from a weak random source [GoldwasserKalaiPeikertVaikuntanathan10]

The normal error distribution is ‘LWE complete’

The number of samples does not matter

Page 15: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

Decision LWE ProblemDecision LWE Problem

. . .

a1a2

am

s

+ e = b

World 1

. . .

a2

a1

am

b

World 2

DecisionLWE

Solver

I am in World 1 (or 2)

. . .

a2

a1

am

bs fixed in q

n

ai uniform in qn

ei random normal

(ai,bi) uniform

in qn q

Page 16: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

What We Want to ConstructWhat We Want to Construct

s fixed in qn

ai uniform in qn

ei random normal

(a1, b1 = a1s+e1)

(a2, b2= a2s+e2)

…(ak, bk = aks+ek)

SearchLWE

Solver

s

Decision LWE

Oracle

I am in World 1 (or 2)

Page 17: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

Search LWE < Decision LWESearch LWE < Decision LWE

• Idea: Use the Decision oracle to figure out the coordinates of s one at a time

• Let gq be our guess for the first

coordinate of s• Repeat the following:

• Receive LWE pair (a,b)

• Pick random r in q

• Send (a+(r,0,…,0), b+rg) to the decision oracle:

13+rg37132+r

1.If g is right, then we are sending a distribution from World 1

2.If g is wrong, then we are sending a distribution from World 2 (here we use that q is prime)

• We will find the right g after at most q attempts

• Use the same idea to recover all coefficients of s one at a time

8

3

12

5

37132 1· + = 13

a b

Page 18: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

Simple CryptosystemSimple Cryptosystem

Page 19: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

Public Key Encryption Based on Public Key Encryption Based on LWELWE

A

s

+ e = b

Secret Key: s in qn

Public Key: A in qmn ,

b=As+e(where m=2n·logq)

r

A

r

b

To encrypt a single bit z{0,1}: Pick r in {0,1}m and send (rA, r·b+z·q/2) +

0

q/2

,

Page 20: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

Proof of Semantic SecurityProof of Semantic Security

As

+ e = b

r

A

r

b

+

A b

1. The public key is pseudo-random: based on LWE

A b

r

2. If A,b is truly random, then the distribution of (rA, r·b) (over r chosen from {0,1}m) is statistically extremely close to uniform so decryption is impossible

z

Page 21: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

Other ApplicationsOther Applications Public Key Encryption [R05, KawachiTanakaXagawa07,

PeikertVaikuntanathanWaters08] CCA-Secure PKE [PeikertWaters08, Peikert09] Identity-Based Encryption [GentryPeikertVaikuntanathan08] Oblivious Transfer [PeikertVaikuntanathanWaters08] Circular-Secure Encryption [ApplebaumCashPeikertSahai09] Leakage Resilient Encryption [AkaviaGoldwasserVaikunathan09,

DodisGoldwasserKalaiPeikertVaikuntanathan10, GoldwasserKalaiPeikertVaikuntanathan10] Hierarchical Identity-Based Encryption [CashHofheinzKiltzPeikert09,

AgrawalBonehBoyen09] Learning Theory [KlivansSherstov06] And more…

Page 22: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

HardnessHardness

Page 23: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

HardnessHardness

•The best known algorithms run in exponential time

• Even quantum algorithms don’t do any better

•LWE is an extension of LPN, a central problem in learning theory and coding theory (decoding from random linear codes)

Page 24: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

HardnessHardness

• More importantly, LWE is as hard as worst-case lattice problems [R05, Peikert09]

• More precisely, • For q=2O(n), as hard as GapSVP

[Peikert09]• For q=poly(n),

• As hard as GapSVP given a somewhat short basis [Peikert09]

• As hard as GapSVP and SIVP using a quantum reduction [R05]

Page 25: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

Hardness of LWEHardness of LWE

• We will present the hardness results of LWE [R05, Peikert09] including simplifications due to [LyubashevskyMicciancio09]

• Recently, [StehléSteinfeldTanakaXagawa09] gave an interesting alternative hardness proof by a (quantum) reduction from the SIS problem

• Unfortunately leads to qualitatively weaker results

• We will not describe it here

Page 26: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

LatticesLattices

v1 v2

0

2v1v1+v2 2v2

2v2-v1

2v2-2v1

• For vectors v1,…,vn in Rn we define the lattice generated by them as

={a1v1+…+anvn | ai integers}• We call v1,…,vn a basis of

• The dual lattice of is * = { x2Rn | 8 y2, hx,yi 2 }

• For instance, (n)*= n

Page 27: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

Discrete Gaussian Discrete Gaussian DistributionDistribution

• For r>0, the distribution D,r assigns mass proportional to e-||x/r||2 to each point x

• Points sampled from D,r are lattice vectors of norm roughly rn

D,2 D,1

Page 28: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

• ‘Algebraic’ lattice problems are easy; ‘geometric’ problems are hard

• Shortest Vector Problem (GapSVP): given a lattice , approximate length of shortest (nonzero) vector1() to within

• Another lattice problem: SIVP. Asks to find n short linearly independent lattice vectors.

Computational Problems on Computational Problems on LatticesLattices

0

v2

v1

3v2-4v1

Page 29: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

• Conjecture:Conjecture: for any for any =poly(n), GapSVP=poly(n), GapSVP is is hardhard– Best known algorithms run in time 2Best known algorithms run in time 2n n

[AjtaiKumarSivakumar01, MicciancioVoulgaris10][AjtaiKumarSivakumar01, MicciancioVoulgaris10]

– Quantum computation doesn’t seem to helpQuantum computation doesn’t seem to help– On the other hand, not believed to be NP-On the other hand, not believed to be NP-

hard hard [GoldreichGoldwasser00, AharonovR04][GoldreichGoldwasser00, AharonovR04]

Lattice Problems Are HardLattice Problems Are Hard

Page 30: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

• BDDd: given a lattice and a point x within distance d of , find the nearest lattice point

Bounded Distance Decoding Bounded Distance Decoding (BDD)(BDD)

Page 31: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

• The following was shown in [AharonovR04, LiuLyubashevskyMicciancio06]:

• Proposition: – Assume we have a polynomial number of

samples from D*,r for some lattice and a not too small r>0.

– Then we can solve BDD on to within distance 1/r

Solving BDD using Gaussian Solving BDD using Gaussian SamplesSamples

Page 32: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

• The core of the LWE hardness result is the following:

• Proposition [R05]: – Assume we have a polynomial number of samples from D*,r

for some lattice and a not too small r>0.– Assume we also have access to an oracle that solves LWE

with modulus q and error parameter . – Then we can solve BDD on to within distance q/r

• This is already some kind of hardness result: without the LWE oracle, the best known algorithms for solving the above task require exponential time, assuming qn.

Core LWE Hardness Core LWE Hardness StatementStatement

Page 33: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

• [Peikert09] showed a reduction from GapSVP to solving BDD to within distance 1()/poly(n)

• Since sampling from D*,r for r=2n/1() can be done efficiently, we obtain hardness of LWE for exponential moduli q

• Alternatively, we can use the sampler in [GentryPeikertVaikuntanathan08] to show hardness of LWE with polynomial moduli q based the assumption that GapSVP is hard even given a somewhat short vector

Getting a Cleaner Getting a Cleaner Statement (1/2)Statement (1/2)

Page 34: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

• Alternatively, [R05] showed a quantum reduction from sampling D*,n/d to solving BDD in with distance d.

• Assume q2n, and combine with the core proposition:

Getting a Cleaner Statement Getting a Cleaner Statement (2/2)(2/2)

Samples from D

*,r Solution to BDD,q/r

Samples from D

*,r/2

Samples from D

*,r/4

Solution to BDD,

2q/r

Solution to BDD,

4q/r...

Page 35: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

Proof of Core Proposition Proof of Core Proposition (1/2)(1/2)

• For simplicity, assume =n (and ignore the fact that this lattice is ‘easy’)

• We will show:– Given: samples from Dn,r

– Input: a point xn within distance q/r of some unknown vn

– Output: LWE samples with secret s=(v mod q)

• Once we do this, we’re done: use the LWE oracle to find v mod q, and then recursively find v (details omitted)

Page 36: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

• This is done by repeating the following :

– Take a sample y from Dn,r

– Output the pair

(a = y mod q, b = y,x mod q) qn q

• Analysis:– Since r is not too small, a is uniformly distributed in q

n

– Now condition on any fixed value of a, and let’s analyze the distribution of b.

– y is distributed as a discrete Gaussian on qn+a– If x=v, then b is exactly a,s, so we get LWE samples with no

error– Otherwise, we get an error term of the form y,x-v. Since x-v is

a fixed vector of norm <q/r, and y is Gaussian of norm r, this inner product is normal with standard deviation <q.

Proof of Core Proposition Proof of Core Proposition (2/2)(2/2)

Page 37: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

LWE over RingsLWE over Rings

Page 38: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

Some Inefficiencies of Some Inefficiencies of LWE-Based SchemesLWE-Based Schemes

As

+ e = b

r

A

r

b

+

public key is O(n2) encryption of 1 bit requires O(n2) (or O(n)) operations

z

Page 39: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

The Ring-LWE ProblemThe Ring-LWE Problem

(a1, b1 =

a1s+e1)

(a2, b2=

a2s+e2)

…(ak, bk =

aks+ek)

Ring-LWE

Solver

• Let R be the ring q[x]/xn+1 • The secret s is now an element in R• The elements a are chosen uniformly

from R• The coefficients of the noise

polynomial e are chosen as small independent normal vars

+ =

8

3

12

5

2

13

7

3

1

-1

2

-1

*

a s e b

8

1

16

6

s

Page 40: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

Ring-LWE – Known ResultsRing-LWE – Known Results• [LyubashevskyPeikertR10] show that Ring-LWE is as hard as

(quantumly) solving the standard lattice problem SIVP (on ideal lattices)

• The proof is by adapting [R05]‘s proof to rings; only the classical part needs to be changed

• A qualitatively weaker result was independently shown by [Stehlé SteinfeldTanakaXagawa09] using different techniques of independent interest.

• [LPR10] also show that decision Ring-LWE is as hard as (search) Ring-LWE

• Proof is quite non-trivial!

• Finally [LPR10] show how this can be used to construct very efficient cryptographic applications

• Many more details in the survey paper!

Page 41: The Learning With Errors Problem Oded Regev Tel Aviv University (for more details, see the survey paper in the proceedings) Cambridge, 2010/6/11

Open QuestionsOpen QuestionsObtain the ultimate hardness result for LWE (i.e.,

classical, based on GapSVP)$500 prize

Hardness of LPN?Or is LPN easier?$250 prize

More algorithms for LWECrypto:

Direct construction of efficient pseudorandom functionsFully homomorphic encryption scheme (perhaps based on

ring-LWE)?‘Upgrade’ all existing constructions to ring-LWE

Reduction from LWE to classical problems, similar to what was done in [Feige02]