21
Post-Quantum Cryptography Sebastian Schmittner Institute for Theoretical Physics University of Cologne 2015-10-26 Talk @ U23 @ CCC Cologne This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

  • Upload
    others

  • View
    18

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

Post-Quantum Cryptography

Sebastian Schmittner

Institute for Theoretical PhysicsUniversity of Cologne

2015-10-26 Talk @ U23 @ CCC Cologne

This work is licensed under a Creative CommonsAttribution-ShareAlike 4.0 International License.

Page 2: Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

IntroductionReview: Asymmetric CryptographyQuantum Computer: Shor’s AlgorithmComplexity

Post-Quantum CryptographyOverviewLattice-based cryptographyLearning with errors

1 Sebastian Schmittner

Page 3: Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

Asymmetric Cryptography

2 Sebastian Schmittner

Page 4: Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

RSA1977 by Ron Rivest, Adi Shamir, and Leonard Adleman at MIT

c = me mod N

m = cd mod N

ϕ = (p − 1)(q − 1)d = e−1 mod ϕ

N = pqe < ϕ

3 Sebastian Schmittner

Page 5: Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

Shor’s Algorithm

I Combined classical/quantum probabilistic algorithm

I Essential step: find period of x 7→ ax mod N viasuperposition, quantum Fourier transform and measurement

I Quantum computer breaks: RSA, DSA, (hyper-)ellipticcurve cryptography,. . .

I Need for “post-quantum” cryptography

4 Sebastian Schmittner

Page 6: Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

Complexity

BQP

P

NP

NP-hardNP-complete

RSA

5 Sebastian Schmittner

Page 7: Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

Complexity

BQP

P

NP

NP-hardNP-complete

RSA

Post-Quantum!

PQ?

6 Sebastian Schmittner

Page 8: Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

Post-Quantum Cryptography1

Existing PQ-cryptography schemes:

I Secret-key (Symmetric encryption, AES, 1998)

I Hash-based (Signature, Hash trees, 1979)

I Code-based (McEliece, 1978)

I Lattice-based (NTRU, 1998)

I Multivariate-quadratic-equations (Signature, HFEv−, 1996)

Why RSA?

I Security level: attack needs 2b operations

I RSA: key length nRSA ∝ b3/(log b)2

I McEliece: key length nMcEliece ∝ b2/(log b)2

But: nMcEliece/nRSA(b = 128) ≈ 102 ∼ 103 due to pre-factors1Bernstein, Buchmann, Dahmen: Post-quantum cryptography. Springer ’09.

7 Sebastian Schmittner

Page 9: Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

Lattice-based cryptography

I Choose a basis B = {b1, . . . , bn} of Rn

I The finite set L = SpannZq(B) is called a (periodic) lattice

b1

b2

b′1

b′2

b′1

b′2b′1

b′2

b1 b2

I B ′ Basis ⇔ linear independent and SpannZq(B ′)L

I ⇔ B ′ = UB for unimodular U ∈ Gln(Z).

I Lenstra–Lenstra–Lovasz lattice (LLL) basis reduction

8 Sebastian Schmittner

Page 10: Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

Lattice-based cryptography

I Choose a basis B = {b1, . . . , bn} of Rn

I The finite set L = SpannZq(B) is called a (periodic) lattice

b1

b2

b′1

b′2

b′1

b′2b′1

b′2

b1 b2

I B ′ Basis ⇔ linear independent and SpannZq(B ′)

?=L

I ⇔ B ′ = UB for unimodular U ∈ Gln(Z).

I Lenstra–Lenstra–Lovasz lattice (LLL) basis reduction

9 Sebastian Schmittner

Page 11: Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

Lattice-based cryptography

I Choose a basis B = {b1, . . . , bn} of Rn

I The finite set L = SpannZq(B) is called a (periodic) lattice

b1

b2

b′1

b′2

b′1

b′2

b′1

b′2

b1 b2

I B ′ Basis ⇔ linear independent and SpannZq(B ′) 6=L

I ⇔ B ′ = UB for unimodular U ∈ Gln(Z).

I Lenstra–Lenstra–Lovasz lattice (LLL) basis reduction

10 Sebastian Schmittner

Page 12: Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

Lattice-based cryptography

I Choose a basis B = {b1, . . . , bn} of Rn

I The finite set L = SpannZq(B) is called a (periodic) lattice

b1

b2

b′1

b′2

b′1

b′2

b′1

b′2

b1 b2

I B ′ Basis ⇔ linear independent and SpannZq(B ′) = L

I ⇔ B ′ = UB for unimodular U ∈ Gln(Z).

I Lenstra–Lenstra–Lovasz lattice (LLL) basis reduction

11 Sebastian Schmittner

Page 13: Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

Lattice problemsGiven a basis B

b1b2

Shortest Vector Prob. (SVP)

I Find shortest v ∈ L

I NP-hard for max-Norm

I Used to secureNTRUEncrypt public keycryptosystem

b1b2

Closest Vector Problem (CVP)

I Find closest v ∈ L togiven v ∈ Rn \ L

I Goldreich-Goldwasser-Halevi (GGH)cryptosystem

12 Sebastian Schmittner

Page 14: Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

Lattice problemsGiven a basis B

b1b2

Shortest Vector Prob. (SVP)

b1b2

Closest Vector Problem (CVP)

I Decision Problems: GapSVPβ and GapCVPβI ||v − v || < 1 or ||v − v || > β ?

I Polynomialtime-equivalent and both in NP

I Easy for large β

I NP-hard for e.g. β ∈ o(n1/ log log n

), in particular for β ∈ O(1)

13 Sebastian Schmittner

Page 15: Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

Learning with errors (LWE)Rough idea

y

x0

+

++

+

+ +

y = f (x)

I f : Znq → Zq linear, i.e. f (x) = v · x for some vector v

I Error: y = f (x) + η with random variable η (e.g. gaussian)

I Can we “learn” the function f from samples {(x , y)}?

14 Sebastian Schmittner

Page 16: Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

Learning with errors (LWE)Rough idea

y

x0

+

++

+

+ +

y = f (x)

I f : Znq → Zq linear, i.e. f (x) = v · x for some vector v

I Error: y = f (x) + η with random variable η (e.g. gaussian)

I Can we “learn” the function f from samples {(x , y)}?

15 Sebastian Schmittner

Page 17: Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

Learning with errors (LWE)More precise idea

I Replace target space by T = R/Z ' U(1) ' S1

I Group homomorphism Zq → T, i.e. y 7→ y/q

I Distribution φ of random variable η on TI Find v ∈ Zn

q from polynomially many (x , v · x/q + η)

16 Sebastian Schmittner

Page 18: Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

Learning with errors (LWE)More precise idea

I Decision version: φ uniform or gaussian?

I Equivalent to search for not to large prime q

I No easy instances

I GapSVP can be reduced to LWE

I LWE translates into Regev’s public key cryptosystem

17 Sebastian Schmittner

Page 19: Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

Key exchangeGeneral idea + example: Diffie-Hellman

I Public: Set of commuting functions {fa}, e.g. fa(x) = ea

mod N, and starting value x

I Private: every participant chooses random aiI Exchange: everybody publishes fai (x)

I Computing a from x and fa(x) needs to be hard

I Compute and publish fai(faj (x)

)I . . . (actually do this more cleverly with many participants ;)

I Finally everybody possesses a common key F (x) withF = fa1 ◦ fa2 ◦ . . . = fa2 ◦ fa1 ◦ . . .

I E.g. (ea)b = eab =(eb)a

(also true mod N)

18 Sebastian Schmittner

Page 20: Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

Ring learning with errors key exchange (RLWE-KEX)Rough idea

I Public: polynomial a(x) =∑n

i=1 aixi

I Private: small (max norm of coefficients) polynomials s and e

I (Almost) commuting operations:

(asA + eA)sB + eB = asAsB + easB + eB (1)

≈ (asB + eB)sA + eA = asAsB + eBsA + eA (2)

I Treating eBsA + eA and eAsB + eB as errors

I Detailed description of the algorithm:https://en.wikipedia.org/wiki/Ring_learning_with_

errors_key_exchange

19 Sebastian Schmittner

Page 21: Post-Quantum Cryptography - Chaos Computer Club · Post-Quantum Cryptography1 Existing PQ-cryptography schemes: I Secret-key (Symmetric encryption, AES, 1998) I Hash-based (Signature,

Many Thanks!