Introduction to post-quantum cryptography and learning with errors
Douglas Stebila
Summer School on real-world crypto and privacy • Šibenik, Croatia • June 11, 2018 https://www.douglas.stebila.ca/research/presentations Funding acknowledgements:
Introduction to post-quantum cryptography and learning with errors - - PowerPoint PPT Presentation
Introduction to post-quantum cryptography and learning with errors Douglas Stebila Funding acknowledgements: Summer School on real-world crypto and privacy ibenik, Croatia June 11, 2018
Summer School on real-world crypto and privacy • Šibenik, Croatia • June 11, 2018 https://www.douglas.stebila.ca/research/presentations Funding acknowledgements:
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 2
Internet
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 3
AES Encrypt(k, m) AES Decrypt(k, c) cipher text msg key key Key established using Diffie–Hellman key exchange Authenticated using RSA digital signatures
skA vkB
vkA skB msg Secure channel e.g. TLS
Public-key cryptography RSA signatures difficulty of factoring Elliptic curve Diffie–Hellman key exchange difficulty of elliptic curve discrete logarithms Symmetric cryptography AES encryption HMAC SHA-256 integrity
Can be solved efficiently by a large-scale quantum computer
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 4
Cannot be much more efficiently solved by a quantum computer*
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 5
Devoret, Schoelkopf. Science 339:1169–1174, March 2013.
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 6
Devoret, Schoelkopf. Science 339:1169–1174, March 2013.
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 7
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 8
http://qurope.eu/system/files/u7/93056_Quantum%20Manifesto_WEB.pdf
2009
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 9
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 10
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 11
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 12
http://csrc.nist.gov/groups/ST/post-quantum-crypto/faq.html#Q7
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 13
2016 Start PQ Crypto project 2023-25 Standards ready Nov. 2017 Submission deadline 2031 Mosca – 1/2 chance
2026 Mosca – 1/7 chance
2035 EU commission – universal quantum computer 1995 SHA-1 standardized 2001 SHA-2 standardized 2005 SHA-1 weakened 16 years Aug. 2017 First full SHA-1 collision Jan. 2017 Browsers stop accepting SHA-1 certificates
signatures
quadratic
errors
elliptic curve isogenies
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 14
Hash- & Symmetric- based
signatures
Code-based
Multivariate
quadratic
Lattice- based
with errors
…
Isogenies
elliptic curve isogenies
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 15
Quantum key distribution Quantum random number generators Quantum channels Quantum blind computation
Hash- & symmetric-based
signatures, not public key encryption
based signatures, but large signatures required for many signature-systems
Code-based
moderately high confidence for some code families
sizes
Multivariate quadratic
levels of confidence and trade-offs
Lattice-based
this field, flexible constructions
communication sizes
Elliptic curve isogenies
technique
computation
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 16
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 17
secret
× =
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 18
secret
v e d u s i n g G a u s s i a n e l i m i n a t i
( L i n e a r A l g e b r a 1 1 ) E a s i l y s
v e d u s i n g G a u s s i a n e l i m i n a t i
( L i n e a r A l g e b r a 1 1 )
× =
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 19
random secret small noise
× + =
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 20
random secret small noise
× + =
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 21
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 22
[Regev STOC 2005]
random secret small noise looks random
× + =
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 23
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 24
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 25
[Regev STOC 2005]
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 26
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 27
[Applebaum et al., CRYPTO 2009]
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 28
640 8
random
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 29
random
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 30
random
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 31
random secret small noise
× + =
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 32
random secret small noise
× + =
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 33
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 34
[Lyubashesky, Peikert, Regev; EUROCRYPT 2010, JACM 2013]
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 35
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 36
[Langlois & Stehlé, https://eprint.iacr.org/2012/090, DCC 2015]
random secret small noise
× + =
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 37
Figure from https://eprint.iacr.org/2012/090.pdf
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 38
[Banerjee, Peikert, Rosen EUROCRYPT 2012]
random secret
× =
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 39
https://eprint.iacr.org/2013/098, https://eprint.iacr.org/2015/769.pdf
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 40
[Hoffstein, Pipher, Silverman ANTS 1998]
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 41
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 42
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 43
[Lindner, Peikert. CT-RSA 2011]
Public key Secret key
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 44
[Lindner, Peikert. CT-RSA 2011]
e''
Receiver's public key Ciphertext Shared secret mask
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 45
[Lindner, Peikert. CT-RSA 2011]
Ciphertext Almost the same shared secret mask as the sender used Secret key
round
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 46
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 47
[Regev; STOC 2005]
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 48
[Regev; STOC 2005]
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 49
[Lindner, Peikert; CT-RSA 2011]
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 50
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 51
Indistinguishable against chosen plaintext attacks
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 52
[Lindner, Peikert; CT-RSA 2011]
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 53
→ Decision-LWE → → Rewrite →
[Lindner, Peikert; CT-RSA 2011]
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 54
→ Decision-LWE → → Rewrite → Independent of hidden bit
[Lindner, Peikert; CT-RSA 2011]
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 55
https://estimate-all-the-lwe-ntru-schemes.github.io/docs/
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 56
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 57
poly-time [Regev05, BLPRS13]
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 58
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 59
Diagram from http://www.cs.bris.ac.uk/pgrad/csjhvdp/files/bkz.pdf
Discrete additive subgroup of Equivalently, integer linear combinations
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 60
Diagram from http://www.cs.bris.ac.uk/pgrad/csjhvdp/files/bkz.pdf
There are many bases for the same lattice – some short and
some long and acute.
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 61
Diagram from http://www.cs.bris.ac.uk/pgrad/csjhvdp/files/bkz.pdf
Given some basis for the lattice and a target point in the space, find the closest lattice point.
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 62
Diagram from http://www.cs.bris.ac.uk/pgrad/csjhvdp/files/bkz.pdf
Given some basis for the lattice, find the shortest non-zero lattice point.
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 63
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 64
[Regev; STOC 2005]
LLL basis reduction algorithm
but basis quality (shortness/orthogonality) is poor Block Korkine Zolotarev (BKZ) algorithm
quality
cryptographically relevant scenarios
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 65
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 66
constraints in each reduction
GapSVP or SVP solvers or known lower bounds
would lead to very large parameters
LWE solvers relying on lattice solvers.
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 67
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 68
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 69
random.
all communications between parties; the parties are assumed to have authentically distributed trusted long-term keys out of band prior to the protocol.
protocol.
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 70
public: “big” A in Zq
n x m
Alice secret: random “small” s, e in Zq
m
Bob secret: random “small” s', e' in Zq
n
b = As + e b' = s'A + e' shared secret: b's = s'As + e's ≈ s'As shared secret: s'b ≈ s'As Based on Lindner–Peikert LWE public key encryption scheme These are only approximately equal need rounding ⇒
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 71
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 72
[Ding; eprint 2012] [Peikert; PQCrypto 2014]
q/4 q/2 3q/4 round to 0 round to 1
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 73
q/4 q/2 3q/4
q/4 q/2 3q/4 round to 0 round to 1
q/4 q/2 3q/4 r
n d t
n d t
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 74
[Peikert; PQCrypto 2014]
bob alice alice alice
q/4 q/2 3q/4 round to 0 round to 1
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 75
[Peikert; PQCrypto 2014]
public: “big” A in Zq
n x m
Alice secret: random “small” s, e in Zq
m
Bob secret: random “small” s', e' in Zq
n
b = As + e b' = s'A + e', or shared secret: round(b's) shared secret: round(s'b)
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 76
public: “big” a in Rq = Zq[x]/(xn+1) Alice secret: random “small” s, e in Rq Bob secret: random “small” s’, e’ in Rq b = a • s + e b’ = a • s’ + e’, or shared secret: round(s • b’) shared secret: round(b • s’)
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 77
Eprint 2017]
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 78
variant of the Fujisaki–Okamoto transform
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 79 [Bos, Costello, Ducas, Mironov, Naehrig, Nikolaenko, Raghunathan, Stebila. ACM CCS 2016] [Alkim, Bos, Ducas, Easterbrook, LaMacchia, Longa, Mironov, Naehrig, Nikolaenko, Peikert, Raghunathan, Stebila. FrodoKEM NIST Submission, 2017]
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 80
Basic LWE public key
Pseudorandom A to save space
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 81
Basic LWE ciphertext Shared secret Key transport using public key encryption
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 82
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 83
Targhi–Unruh Quantum Fujisaki–Okamoto (QFO) transform
Adds well-formedness checks Extra hash value Implicit rejection Requires negligible error rate
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 84
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 85
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 86
[Brakerski, Vaikuntanathan; FOCS 2011]
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 87
[Brakerski, Vaikuntanathan; FOCS 2011]
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 88
[Brakerski, Vaikuntanathan; FOCS 2011]
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 89
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 90
[Lyubashevsky; Eurocrypt 2012]
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 91
https://estimate-all-the-lwe-ntru-schemes.github.io/docs/
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 92
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 93
has only classical access to Enc & Dec
quantum (superposition) access to Enc and Dec
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 94
Symmetric crypto generally quantum-resistant, unless in fully quantum security models.
[Kaplan et al., CRYPTO 2016]
hash function) that can implement itself in practice, so the adversary could implement it quantumly.
topic right now
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 95
[Boneh et al, ASIACRYPT 2011 https://eprint.iacr.org/2010/428]
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 96
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 97
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 98
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 99
Nikolaenko, Raghunathan, Stebila, ACM CCS 2016
nting-with-post-quantum.html
html
t/microsoft-adds-post-quantum-cryptography-to-
nssl/tree/OQS-master
ls13-06
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 100
X.509 certificates
Theory
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 101
[Bindel, Herath, McKague, Stebila. PQCrypto 2017]
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 102
https://openquantumsafe.org/
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 103
https://openquantumsafe.org/, https://github.com/open-quantum-safe/
master branch, nist-branch
key exchange / KEMs signatures
code- based hash- based isogenies lattice- based multi- variate quadratic
OpenSSL
OpenSSH Language SDKs
Apache httpd OpenVPN
C language library, common API
Windows)
Two versions:
quality audited code; MIT licensed
NIST submissions as possible Integration into forks of widely used open-source projects Potential and reported uses (outside the OQS project)
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 104
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 105
Stebila • Intro to PQ crypto & LWE Summer school on real-world crypto & privacy • 2018-06-11 106