Overview of TLS v1.3
Overview of TLS v1.3
3
What’s new, what’s removed and
what’s changed?
About Me
• Andy Brodie
– Solution Architect / Principal Design Engineer.
– On Worldpay eCommerce Payment Gateways.
– Based in Cambridge, UK.
4
How SSL became TLS
• Confidentiality
– Conversation needs to be encrypted.
– Stop interception of conversations.
• Integrity
– Client & Server must be able to detect message tampering.
– Prevent MITM attacks.
• Authentication
– Client needs to trust they’re talking to the intended server.
– Stop impersonation attacks.
TLS achieves this using various
techniques…
• Confidentiality
– Symmetric key encryption for application data.
– Typically Advanced Encryption Standard (AES).
• Integrity
– Authenticated Encryption with Additional Data (AEAD).
– Usually AES-GCM (Galois/Counter Mode).
• Authentication
– X509 certificates signed by a mutually trusted third party.
– Typically server authenticated only.
Flow of messages in a TLS
conversation
Open Socket
Handshake
Application Data
Alert
Close Socket
9
Flow of messages in a TLS
conversation
• Handshake
– Agree a cipher suite. Open Socket
– Agree a master secret.
– Authentication using certificate(s).
Handshake
• Application Data
– Symmetric key encryption. Application Data
– AEAD cipher modes.
– Typically HTTP.
Alert
• Alerts
– Graceful closure, or Close Socket
– Problem detected.
10
https://tlswg.github.io/tls13-spec/draft-ietf-tls-tls13.html
TLS V1.3
Key Goals of TLS v1.3
12
WHAT’S REMOVED IN TLS V1.3?
13
What’s removed in TLS v1.3
• Key Exchange
– RSA
• Encryption algorithms:
– RC4, 3DES, Camellia.
• Cipher Modes:
– AES-CBC.
• Other features:
– TLS Compression & Session Renegotiation.
– DSA Signatures (ECDSA ≥ 224 bit).
– ChangeCipherSpec message type & “Export” strength ciphers.
– Arbitrary/Custom (EC)DHE groups and curves.
14
This has mitigated quite a few
attacks…
RC4 3DES
• Roos’s Bias 1995 • Sweet32
• Fluhrer, Martin & Shamir 2001
• Klein 2005 AES-CBC
• Combinatorial Problem 2001
• Vaudenay 2002
• Royal Holloway 2013
• Boneh/Brumley 2003
• Bar-mitzvah 2015
• BEAST 2011
• NOMORE 2015
• Lucky13 2013
RSA PKCS#1 v1.5 • POODLE 2014
• Lucky Microseconds 2015
• Bleichenbacher 1998
• Jager 2015
• DROWN 2016 Compression
• CRIME 2012
Renegotiation
• Marsh Ray Attack 2009 MD5 & SHA1
• Renegotiation DoS 2011 • SLOTH 2016
• Triple Handshake 2014 • SHAttered 2017 15
WHAT’S NEW AND CHANGED?
16
What’s New and Changed?
17
TLS v1.2 provides 37 Cipher
Suites
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_AES_128_GCM_SHA256
AEAD Cipher
Protocol HKDF Hash
Mode
Algorithm
• TLS v1.3 supports 5 cipher suites.
– TLS_AES_128_GCM_SHA256
– TLS_AES_256_GCM_SHA384
– TLS_CHACHA20_POLY1305_SHA256
– TLS_AES_128_CCM_SHA256
– TLS_AES_128_CCM_8_SHA256
19
What happens to key exchange
and authentication then?
20
TLS Handshake
Key Exchange
Server Parameters
Authentication
22
Client now makes assumptions
about server support.
• Client sends:
– Cipher Suite options.
– List of supported groups/curves.
– (EC)DHE Key Share(s).
• Server sends:
– Cipher suite selection.
– (EC)DHE Key Share
23
Client now makes assumptions
about server support.
• Server sends:
– Encrypted Extensions
• Server Name
• Message Length
• …and optionally many more
– Certificate Request
• Supported signature algorithms.
24
Client now makes assumptions
about server support.
• Server sends:
– Certificate.
– Proof of private key possession.
– Finished.
– Application Data
• Client responds:
– Certificate.
– Proof of private key possession.
– Finished.
25
GENERATING KEYS USING HKDF
26
HKDF (RFC5869)
HMAC-based Key Derivation
Function
• TLS <= v1.2 defines PRF algorithm.
• Provides 2 functions:
– Extract - create a pseudo-random key from inputs.
– Expand - create more keys from the extract output.
27
TLS <= v1.2 Creating Key
Material from a master secret
Client Write IV
PRF
Server Write IV
TLS v1.3 Key Schedule
Generation
Derive-Secret
(EC)DHE Handshake Secret
HKDF-Expand-Label
Derive-Secret Fixed
Client Traffic Server Traffic
Derive Secret HKDF-Extract
Handshake Secret Handshake Secret
0 Master Secret
30
Why do we need sessions?
31
How do we establish a PSK?
• Out-of-band
– Added to TLS in 2006 via RFC4279.
• During Handshake
– Client announces it supports session resumption.
– Provides a PSK identity during handshake.
32
So, TLS v1.3 supports PSK-
based session resumption
vs.
33
What about Zero Round Trip
Time (0-RTT)?
Yes, we can!
• But…
– No forward secrecy for the “early data” sent by client.
– No guarantees of non-replay.
34
So, TLS v1.3 supports PSK-
based session resumption
35
How to set up 0-RTT
36
Extensions… Extensions everywhere!
BACKWARDS COMPATIBILITY
37
Backwards Compatibility
38
All the extensions
40
And that’s TLS v1.3!
• Removed
– Anything that was unused, unsafe or didn’t offer value.
– Mitigated lots of attacks.
• Added
– Handshake encryption.
– 1-RTT and 0-RTT PSK / Session Resumption.
• Changed
– Cipher Suites.
– PSK / Sessions.
– Post-Handshake Client Authentication.
– PRF now HKDF.
41
THANK YOU FOR LISTENING!