MIT 6.875 & Berkeley CS276 Foundations of Cryptography Lecture - - PowerPoint PPT Presentation

β–Ά
mit 6 875 berkeley cs276
SMART_READER_LITE
LIVE PREVIEW

MIT 6.875 & Berkeley CS276 Foundations of Cryptography Lecture - - PowerPoint PPT Presentation

MIT 6.875 & Berkeley CS276 Foundations of Cryptography Lecture 20 TODAY: Lattice-based Cryptography Why Lattice-based Crypto? o Exponentially Hard (so far) o Quantum-Resistant (so far) o Worst-case hardness (unique feature of


slide-1
SLIDE 1

MIT 6.875 & Berkeley CS276

Lecture 20 Foundations of Cryptography

slide-2
SLIDE 2

TODAY: Lattice-based Cryptography

slide-3
SLIDE 3

Why Lattice-based Crypto?

  • Quantum-Resistant

(so far)

  • Worst-case hardness
  • Exponentially Hard
  • Simple and Efficient

(unique feature of lattice-based crypto)

  • Enabler of Surprising Capabilities

(computing on encrypted data) (so far)

slide-4
SLIDE 4

Solving Linear Equations

5𝑑! + 11𝑑" = 2 2𝑑! + 𝑑" = 6 7𝑑! + 𝑑" = 26 where all equations are over β„€, the integers

slide-5
SLIDE 5

Solving Linear Equations

More generally, π‘œ variables and 𝑛 ≫ π‘œ equations. and A A s Given: GOAL: Find s.

slide-6
SLIDE 6

Solving Linear Equations

GOAL: Find s.

EASY! For example, by Gaussian Elimination

and A A s Given:

slide-7
SLIDE 7

Solving Linear Equations

GOAL: Find s. How to make it hard: That is, work modulo some π‘Ÿ. (1121 𝑛𝑝𝑒 100 = 21)

Still EASY! Gaussian Elimination mod π‘Ÿ

and A A s Given: Chop the head?

slide-8
SLIDE 8

Solving Linear Equations

GOAL: Find s. How to make it hard: Chop the tail? Add a small error to each equation.

Still EASY! Linear regression.

and A A s Given:

+

e

slide-9
SLIDE 9

Solving Linear Equations

GOAL: Find s. How to make it hard: Chop the head and the tail? Add a small error to each equation and work mod π‘Ÿ.

Turns out to be very HARD!

and A A s Given:

+

e

slide-10
SLIDE 10

Solving Noisy Modular Linear Equations

GOAL: Find s. A is chosen at random from β„€#

$Γ—&, s from β„€# &

and e from πœ“$. and A A s Given:

+

e Parameters: dimensions 𝒐 and 𝑛, modulus 𝒓, error distribution πœ“ = uniform in some interval [βˆ’π‘ͺ, … , π‘ͺ].

Learning with Errors (LWE)

slide-11
SLIDE 11

Learning with Errors (LWE)

u Decoding Random Linear Codes

(over Fq with L1 errors)

u Learning Noisy Linear Functions u Worst-case hard Lattice Problems

[Regev’05, Peikert’09]

slide-12
SLIDE 12

Attack 1: Linearization

Given 𝑩, 𝑩𝒕 + 𝒇, find 𝒕. Idea (a) Each noisy linear equation is an exact polynomial eqn. Consider 𝑐 = 𝒃, 𝒕 + 𝑓 = βˆ‘π’‹(𝟐

𝒐

𝑏+𝑑+ + 𝑓. Imagine for now that the error bound 𝐢 = 1. So, 𝑓 ∈ βˆ’1,0,1 . In other words, b βˆ’ βˆ‘π’‹(𝟐

𝒐

𝑏+𝑑+ ∈ βˆ’1,0,1 . So, here is a noiseless polynomial equation on 𝑑+: (b βˆ’ βˆ‘π’‹(𝟐

𝒐

𝑏+𝑑+ βˆ’ 1) (b βˆ’ βˆ‘π’‹(𝟐

𝒐

𝑏+𝑑+)(b βˆ’ βˆ‘π’‹(𝟐

𝒐

𝑏+𝑑+ + 1) = 0

slide-13
SLIDE 13

Attack 1: Linearization

Given 𝑩, 𝑩𝒕 + 𝒇, find 𝒕. BUT: Solving (even degree 2) polynomial equations is NP-hard. (b βˆ’ βˆ‘π’‹(𝟐

𝒐

𝑏+𝑑+ βˆ’ 1) (b βˆ’ βˆ‘π’‹(𝟐

𝒐

𝑏+𝑑+)(b βˆ’ βˆ‘π’‹(𝟐

𝒐

𝑏+𝑑+ + 1) = 0

slide-14
SLIDE 14

Attack 1: Linearization

(b βˆ’ βˆ‘π’‹(𝟐

𝒐

𝑏+𝑑+ βˆ’ 1) (b βˆ’ βˆ‘π’‹(𝟐

𝒐

𝑏+𝑑+)(b βˆ’ βˆ‘π’‹(𝟐

𝒐

𝑏+𝑑+ + 1) = 0 Idea (b) Easy to solve given sufficiently many equations. (using a technique called β€œlinearization”)

* 𝑏!"#𝑑!𝑑"𝑑# + * 𝑏!"𝑑!𝑑" + * 𝑏!𝑑! + 𝑐 βˆ’ 1 𝑐(𝑐 + 1) = 0

Treat each β€œmonomial”, e.g. s,s-s. as an independent variable, e.g. t,-.. Now, you have a noiseless linear equation in t,-.!!!

slide-15
SLIDE 15

Attack 1: Linearization

* 𝑏!"#𝑒!"# + * 𝑏!"𝑒!" + * 𝑏!𝑒! + 𝑐 βˆ’ 1 𝑐(𝑐 + 1) = 0

Solution space (with some eqns): The real solution 𝑒+/0 = 𝑑+𝑑

/𝑑 0 etc.

slide-16
SLIDE 16

Attack 1: Linearization

* 𝑏!"#𝑒!"# + * 𝑏!"𝑒!" + * 𝑏!𝑒! + 𝑐 βˆ’ 1 𝑐(𝑐 + 1) = 0

Solution space (with more eqns): The real solution 𝑒+/0 = 𝑑+𝑑

/𝑑 0 etc.

slide-17
SLIDE 17

Attack 1: Linearization

* 𝑏!"#𝑒!"# + * 𝑏!"𝑒!" + * 𝑏!𝑒! + 𝑐 βˆ’ 1 𝑐(𝑐 + 1) = 0

Solution space (with even more eqns): The real solution 𝑒+/0 = 𝑑+𝑑

/𝑑 0 etc.

slide-18
SLIDE 18

Attack 1: Linearization

* 𝑏!"#𝑒!"# + * 𝑏!"𝑒!" + * 𝑏!𝑒! + 𝑐 βˆ’ 1 𝑐(𝑐 + 1) = 0

Solution space (keep going): The real solution 𝑒+/0 = 𝑑+𝑑

/𝑑 0 etc.

slide-19
SLIDE 19

Attack 1: Linearization

* 𝑏!"#𝑒!"# + * 𝑏!"𝑒!" + * 𝑏!𝑒! + 𝑐 βˆ’ 1 𝑐(𝑐 + 1) = 0

When #eqns = #vars β‰ˆ 𝑃(π‘œ1) the only surviving solution to the linear system is the real solution.

slide-20
SLIDE 20

Attack 1: Linearization

Given 𝑩, 𝑩𝒕 + 𝒇, find 𝒕. Can solve/break as long as 𝒏 ≫ π’πŸ‘π‘ͺ4𝟐 We will set 𝐢 = π‘œ5(!), in other words polynomial in π‘œ so as to blunt this attack.

slide-21
SLIDE 21

a1

O

a2

Attack 2: Lattice Decoding

a1*s1+a2*s2 a1*s1+a2*s2+e

in polynomial time when 𝒓/π‘ͺ > πŸ‘π’

The famed Lenstra-Lenstra-Lovasz algorithm decodes

slide-22
SLIDE 22

Setting Parameters

Put together, we are safe with: π‘œ = security parameter (β‰ˆ 1 βˆ’ 10K) 𝑛 = arbitrary poly in π‘œ 𝐢 = small poly in π‘œ, say π‘œ π‘Ÿ = poly in π‘œ, larger than 𝐢, and could be as large as sub-exponential, say 2&!.## even from quantum computers, AFAWK!

slide-23
SLIDE 23

Decisional LWE

Theorem: β€œDecisional LWE is as hard as LWE”. Can you distinguish between: , A A s + e and , A b

slide-24
SLIDE 24

OWF and PRG

gA(s,e) = As+e

  • gA is a one-way function (assuming LWE)
  • gA is a pseudo-random generator (decisional LWE)
  • gA is also a trapdoor function…
  • also a homomorphic commitment…

𝒇 ∈ π‘Ž!

": random β€œsmall” error vector)

(A ∈ π‘Ž!

"#$

s ∈ π‘Ž!

" random β€œsmall” secret vector

slide-25
SLIDE 25

Basic (Secret-key) Encryption

  • Secret key sk = Uniformly random vector s Î π‘Ž%

&

  • Encryption Encs(𝜈): // 𝜈 Î {0,1}

– Sample uniformly random a Î π‘Ž%

&, β€œsmall” noise e Î π‘Ž

– The ciphertext c = (a, b = Γ‘a, sΓ± + e +𝜈 π‘Ÿ/2 )

n = security parameter, q = β€œsmall” modulus [Regev05]

  • Decryption Decsk(c): Output Roundq/2(b βˆ’ Γ‘a, sΓ± mod q)

// correctness as long as |e| < q/4

slide-26
SLIDE 26

Basic (Secret-key) Encryption

[Regev05]

We already saw that this scheme is additively homomorphic.

𝒅 = (a, b = Γ‘a, sΓ± + e + 𝜈 π‘Ÿ/2 ) 𝒅′ = (aβ€² , bβ€² = Γ‘aβ€², sΓ± + eβ€² + 𝜈 β€² π‘Ÿ/2 ) 𝒅 + 𝒅′ = (a+aβ€² , b+ bβ€²)

+ In words: 𝑑 + 𝑑′ is an encryption of 𝜈 + 𝜈 β€² (mod 2)

Encs(m) Encs(m’)

𝒅 + 𝒅′ = (a+aβ€² , b+ bβ€² = Γ‘ a +aβ€², sΓ± + (e+eβ€²) + (𝜈 + 𝜈 β€²) π‘Ÿ/2 )

slide-27
SLIDE 27

Basic (Secret-key) Encryption

[Regev05]

We will see how to make this scheme into a fully homomorphic scheme (in the next lec) Setting π‘Ÿ = π‘œ9:; & and 𝐢 = π‘œ (for example) lets us support any polynomial number of additions. For now, note that the error increases when you add two ciphertexts. That is, |𝑓<== β‰ˆ |𝑓! + 𝑓" ≀ 2𝐢. You can also negate the encrypted bit easily.

slide-28
SLIDE 28

Public-key Encryption

  • Secret key sk = Uniformly random vector s Î π‘Ž%

& [Regev05]

  • Public key pk: for 𝑗 𝑔𝑠𝑝𝑛 1 𝑒𝑝 𝑛 = π‘žπ‘π‘šπ‘§(π‘œ) TBD

𝒅𝒋 = (𝒃𝒋, 𝒃𝒋, 𝒕 + 𝑓!)

slide-29
SLIDE 29

Public-key Encryption

  • Secret key sk = Uniformly random vector s Î π‘Ž%

& [Regev05]

  • Public key pk: for 𝑗 𝑔𝑠𝑝𝑛 1 𝑒𝑝 𝑛 = π‘žπ‘π‘šπ‘§(π‘œ)

(𝑩, 𝒄 = 𝑩𝒕 + 𝒇)

  • Encrypting a message bit 𝜈: pick a random vector 𝒔 ∈ {0,1}(

(𝒔𝑩, 𝒔𝒄 + 𝜈 π‘Ÿ/2 )

, A A s + e

  • Decryption: compute

𝒔𝒄 + 𝜈 π‘Ÿ/2 βˆ’ 𝒔𝑩 𝐭 and round to nearest multiple of q/2.

slide-30
SLIDE 30

Correctness

  • Encrypting a message bit 𝜈: pick a random vector 𝒔 ∈ {0,1}(

(𝒔𝑩, 𝒔𝒄 + 𝜈 π‘Ÿ/2 )

  • Decryption:

𝒔𝒄 + 𝜈 π‘Ÿ/2 βˆ’ 𝒔𝑩 𝐭 = 𝒔(𝑩𝒕 + 𝒇) + 𝜈 π‘Ÿ/2 βˆ’ 𝒔𝑩 𝐭 Decryption works as long as |𝒔𝒇| < 𝒓/πŸ“ or in other words, if the LWE error bound B < 𝒓/πŸ“π’ β‰ˆ q/poly(n).

slide-31
SLIDE 31

Security

Theorem: under decisional LWE, the scheme is IND-

  • secure. In fact, even more: a ciphertext together with

the public key is pseudorandom. We show this by a hybrid argument. Let’s stare at a public key, ciphertext pair.

𝒒𝒍 = 𝑩, 𝒄 = 𝑩𝒕 + 𝒇 , 𝒅 = 𝑭𝒐𝒅 𝒒𝒍, 𝜈 = 𝒔𝑩, 𝒔𝒄 + 𝜈 π‘Ÿ/2 )

Call this distribution Hybrid 0.

slide-32
SLIDE 32

Security

Theorem: under decisional LWE, the scheme is IND-

  • secure. In fact, even more: a ciphertext together with

the public key is pseudorandom. Hybrid 1. Change the public key to random (from LWE).

^ 𝒒𝒍 = 𝑩, 𝒄 , _ 𝒅 = 𝑭𝒐𝒅 ^ 𝒒𝒍, 𝜈 = 𝒔𝑩, 𝒔𝒄 + 𝜈 π‘Ÿ/2 )

Hybrids 0 and 1 are comp. indist. by decisional LWE.

slide-33
SLIDE 33

Detour: Leftover Hash Lemma

[Impagliazzo-Levin-Luby’90]

We want to understand how 𝒔𝑩, 𝒔𝒄 = 𝒔 𝑩 𝒄] is distributed when 𝐡, 𝑐 is random (and public). But 𝒔 is NOT truly random! It has small entries. 𝑩 𝒄 If 𝒔 is truly random, so is 𝒔 𝑩 𝒄]. 𝒔 Nevertheless, 𝒔 has entropy. Leftover hash lemma tells us that matrix multiplication turns (sufficient) entropy into true randomness. We need 𝑛 ≫ π‘œ + 1 log π‘Ÿ. β‰ˆ

𝒅

𝒃′ 𝑐′

slide-34
SLIDE 34

Security

Theorem: under decisional LWE, the scheme is IND-

  • secure. In fact, even more: a ciphertext together with

the public key is pseudorandom. Hybrid 1. Change the public key to random (from LWE).

^ 𝒒𝒍 = 𝑩, 𝒄 , _ 𝒅 = 𝑭𝒐𝒅 ^ 𝒒𝒍, 𝜈 = 𝒔𝑩, 𝒔𝒄 + 𝜈 π‘Ÿ/2 )

Hybrids 0 and 1 are comp. indist. by decisional LWE.

slide-35
SLIDE 35

Security

Theorem: under decisional LWE, the scheme is IND-

  • secure. In fact, even more: a ciphertext together with

the public key is pseudorandom. Hybrid 2. Change 𝒔𝑩, 𝒔𝒄 into random.

^ 𝒒𝒍 = 𝑩, 𝒄 , _ 𝒅 = 𝑭𝒐𝒅 ^ 𝒒𝒍, 𝜈 = 𝒃′, 𝑐′ + 𝜈 π‘Ÿ/2 )

Hybrids 1 and 2 are stat. indist. by leftover hash lemma.

slide-36
SLIDE 36

Security

Theorem: under decisional LWE, the scheme is IND-

  • secure. In fact, even more: a ciphertext together with

the public key is pseudorandom. Hybrid 2. Change 𝒔𝑩, 𝒔𝒄 into random.

^ 𝒒𝒍 = 𝑩, 𝒄 , _ 𝒅 = 𝑭𝒐𝒅 ^ 𝒒𝒍, 𝜈 = 𝒃′, 𝑐′ + 𝜈 π‘Ÿ/2 )

Now, we have the message 𝜈 encrypted with a one-time pad which perfectly hides 𝜈.

slide-37
SLIDE 37

Public-key Encryption

  • Secret key sk = Uniformly random vector s Î π‘Ž%

& [Regev05]

  • Public key pk: for 𝑗 𝑔𝑠𝑝𝑛 1 𝑒𝑝 𝑛 = 2 π‘œ + 1 log π‘Ÿ

(𝑩, 𝒄 = 𝑩𝒕 + 𝒇)

  • Encrypting a message bit 𝜈: pick a random vector 𝒔 ∈ {0,1}(

(𝒔𝑩, 𝒔𝒄 + 𝜈 π‘Ÿ/2 )

  • Decryption: compute

𝒔𝒄 + 𝜈 π‘Ÿ/2 βˆ’ 𝒔𝑩 𝐭 and round to nearest multiple of q/2.

slide-38
SLIDE 38

Next Lecture: Fully Homomorphic Encryption