DECEMBER 2, 2019
Towards Post-Quantum TLS
ECC 2019 Kris Kwiatkowski
Towards Post-Quantum TLS ECC 2019 Kris Kwiatkowski DECEMBER 2, - - PowerPoint PPT Presentation
Towards Post-Quantum TLS ECC 2019 Kris Kwiatkowski DECEMBER 2, 2019 OVERVIEW OUR APPROACH TO REAL WORLD CRYPTOGRAPHY DESIGNING THE EXPERIMENT RESULTS QUESTIONS 2 INTRODUCTION: TEAM = Kris Dave Luke Nick Alan Adam
DECEMBER 2, 2019
Towards Post-Quantum TLS
ECC 2019 Kris Kwiatkowski
OVERVIEW
@_henrycase
Kris Kwiatkowski
@grittygrease
Nick Sullivan
@DistributedDave
Dave Levin
@amislove
Alan Mislove
3INTRODUCTION: TEAM
@lukevalenta
Luke Valenta
=
@agl__
Adam Langley
MOTIVATION
How best to contribute to the PQC standardization process? Pick an ecosystem and explore the upgrade path.
MOTIVATION
The cryptographic system should be widely deployed and relied on by millions of people for important communications.
Meaningful deployment and impact
Deployments with many different dependencies and complex moving parts are trickier to upgrade. Pick a project that helps uncover potential stumbling blocks.
Non-trivial complexity
There should be well-established requirements and norms for upgrading the ecosystem based on previous upgrades.
Methodology for migration established
MOTIVATION
HTTPS in browsers
The cryptographic system should be widely deployed and relied on by millions of people for important communications.
Meaningful deployment and impact
Deployments with many different dependencies and complex moving parts are trickier to upgrade. Pick a project that helps uncover potential stumbling blocks.
Non-trivial complexity
There should be well-established requirements and norms for upgrading the ecosystem based on previous upgrades.
Methodology for migration established
MOTIVATION
Online life is encrypted Web traffic is 75% HTTPS This includes almost all banking, eCommerce, social media, search, webmail, video streaming, news, and other
Cloudflare well positioned as a CDN
Meaningful deployment and impact
○ OS, vendor, devices
○ BoringSSL, NSS, CommonCrypto, sChannel…
Browser complexity
Other “hidden” participants
Server complexity
Non-trivial complexity
Methodology for migration established
10STICKER
Rule of thumb
Breakage rate should be comfortably below 1%
DEPLOYABLE PROTOCOLS
Publish the specification Use test population Detect various breakages
Measure
2012-13 2008 2012
Specify Deploy
Fix bad servers and middleboxes until breakage is low enough Insecure fallback
Adjust
2012-2014
Rule of thumb
Breakage rate should be comfortably below 1%
DEPLOYABLE PROTOCOLS
Develop draft specifications Use test population Detect various breakages
2016-2018 2014-2018 2016-2018
Change the specification to adjust for the reality of the world
2016-2018
Measure Specify Deploy Adjust
CPU Usage
DESIGNING THE EXPERIMENT
Protocol Shape Latency Key Size
DESIGNING THE EXPERIMENT
1-RTT The client initiates with its key share, the server responds with its key share, signature and potentially initial data. Post-quantum KEMs fit nicely into this model. No client challenge There is no current requirement for a proof-of-work to be done on the client side. Expensive key exchange is a DoS risk.
Protocol Shape
DESIGNING THE EXPERIMENT
Higher latency If an algorithm takes clock time on the order of network time (10ms+), it may noticeably delay the connection.
CPU Usage
Power consumption Mobile and lightweight devices optimize for battery life. Expensive computations hurt this. Asymmetry risk If an attacker can cause a lot of work using only a small amount of work, it is an amplification attack vector.
Hard-coded sizes in legacy systems Network congestion causes latency Unknowns
Key Size
17DESIGNING THE EXPERIMENT
Post-quantum confidentiality for TLS
Previous work
2018 experiment by Adam Langley to measure impact of key size on latency. Implemented “dummy” extension to simulate larger key sizes. Control group: no extension sent Supersingular isogenies (SI): 400 bytes Structured lattices (SL): 1 100 bytes Unstructured lattice standing (ULS): 3 300 bytes https://www.imperialviolet.org/2018/04/11/pqconftls.html
HRSS-SXY (NTRU) SIKE (Isogeny)
20OUR EXPERIMENT
Implement and deploy two realistic key agreement ciphers
CECPQ2
NTRU (Round 2)
CECPQ2b
SIKE/p434 (Round 2)
OUR EXPERIMENT
Integrate two PQ KEMs into TLS and deploy at scale
Characteristics
No SHA-3
SHA-256 instead of SHAKE for KEM
Combined mode with X25519
Concatenate and combine with HKDF
22OUR EXPERIMENT
Some tweaks
SIKE : https://github.com/post-quantum-cryptography/c-sike NTRU: https://github.com/google/boringssl/tree/master/crypto/hrss
algorithm ID and public keys in TLS ClientHello
draft-kiefer-tls-ecdhe-sidh
ephemeral keys
concatenation of X25519 and KEM secrets
TLS integration
OUR EXPERIMENT
Ensuring results quality
○ CONTROL: using X25519 for key exchange ○ CECPQ2: using NTRU combined with X25519 ○ CECPQ2b: using SIKE combined with X25519
exchanged between client and server to indicate participation in the experiment
OUR EXPERIMENT
DEPLOYMENT
Cloudflare edge Over 20 million Internet properties Both suites supported Located “close” to users Note: SIKE not cleared for Google servers due to DoS risk
Deployment
Chrome Canary A diverse group of beta testers usually using Intel-based desktop computers and ARM-based mobile devices
Biases of the population
○ population significantly biased towards powerful CPUs
networks than the Chrome user population as a whole”, A. Langley https://www.imperialviolet.org/2019/10/30/pqsivssl.html
performance
Duration
Data
sampled
Collected data
SERVER-SIDE RESULTS
NTRU SIKE NTRU SIKE
SERVER-SIDE RESULTS
NTRU SIKE NTRU SIKE
SERVER-SIDE RESULTS
Configuration Additional latency over control group w/ 95% confidence intervals (ms) X25519 NTRU SIKE Latency Difference Mobile, 50th [133,135] [138, 140] [196, 198] 29.44% Mobile, 95th [774, 818] [1001, 1060] [978, 1026] 2.77% Mobile, 99th [2783, 3097] [4057, 4478] [3276, 3646] 18.90% Desktop, 50th [55, 55] [58, 58] [74, 76] 22.67% Desktop, 95th [350, 354] [417, 421] [421, 425] 0.95% Desktop, 99th [1226 1246] [1481, 1509] [1344, 1368] 9.30%
SERVER-SIDE RESULTS
Maritz-Jarrett estimators
○ Send hardcoded ClientHello and drop connection just after ○ Distribute injectors on multiple machines
Challenges: pre-production testing
SIKE NTRU
NTRU
○ NTRU looks like better candidate for TLS ○ High-performance isogeny-based public key crypto less developed than lattice based
latency
○ Root cause not found
SIKE NTRU
Conclusion