MIT 6.875 & Berkeley CS276 Foundations of Cryptography Lecture - - PowerPoint PPT Presentation
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
TODAY: Lattice-based Cryptography
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)
Solving Linear Equations
5π‘! + 11π‘" = 2 2π‘! + π‘" = 6 7π‘! + π‘" = 26 where all equations are over β€, the integers
Solving Linear Equations
More generally, π variables and π β« π equations. and A A s Given: GOAL: Find s.
Solving Linear Equations
GOAL: Find s.
EASY! For example, by Gaussian Elimination
and A A s Given:
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?
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
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
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)
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]
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
Attack 1: Linearization
Given π©, π©π + π, find π. BUT: Solving (even degree 2) polynomial equations is NP-hard. (b β βπ(π
π
π+π‘+ β 1) (b β βπ(π
π
π+π‘+)(b β βπ(π
π
π+π‘+ + 1) = 0
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,-.!!!
Attack 1: Linearization
* π!"#π’!"# + * π!"π’!" + * π!π’! + π β 1 π(π + 1) = 0
Solution space (with some eqns): The real solution π’+/0 = π‘+π‘
/π‘ 0 etc.
Attack 1: Linearization
* π!"#π’!"# + * π!"π’!" + * π!π’! + π β 1 π(π + 1) = 0
Solution space (with more eqns): The real solution π’+/0 = π‘+π‘
/π‘ 0 etc.
Attack 1: Linearization
* π!"#π’!"# + * π!"π’!" + * π!π’! + π β 1 π(π + 1) = 0
Solution space (with even more eqns): The real solution π’+/0 = π‘+π‘
/π‘ 0 etc.
Attack 1: Linearization
* π!"#π’!"# + * π!"π’!" + * π!π’! + π β 1 π(π + 1) = 0
Solution space (keep going): The real solution π’+/0 = π‘+π‘
/π‘ 0 etc.
Attack 1: Linearization
* π!"#π’!"# + * π!"π’!" + * π!π’! + π β 1 π(π + 1) = 0
When #eqns = #vars β π(π1) the only surviving solution to the linear system is the real solution.
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.
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
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!
Decisional LWE
Theorem: βDecisional LWE is as hard as LWEβ. Can you distinguish between: , A A s + e and , A b
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
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
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 )
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.
Public-key Encryption
- Secret key sk = Uniformly random vector s Γ π%
& [Regev05]
- Public key pk: for π ππ ππ 1 π’π π = ππππ§(π) TBD
π π = (ππ, ππ, π + π!)
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.
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).
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.
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.
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 π. β
π
πβ² πβ²
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.
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.
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 π.
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