The TLS handshake, 1.2 and 1.3
The named messages of the TLS Handshake Protocol, how TLS 1.2's handshake actually runs, and what TLS 1.3 changed, including its 1-RTT and 0-RTT modes.
- Name TLS's subprotocols and state which one is the base that the others run on top of.
- Reproduce the TLS Handshake Protocol's message names in order and what each one carries.
- List TLS 1.3's major differences from TLS 1.2, including the cipher restriction and the 1-RTT improvement.
- Explain what TLS 1.3's 0-RTT mode trades away, and when it may safely be used.
20 min read
Intuition
The previous page’s flow was abstract: nonces, a certificate, Diffie-Hellman values, MACs, with no names attached. Real TLS gives each of those messages a name, and ships two versions in active use, 1.2 and 1.3, that differ in exactly how that handshake runs.
Mechanism
Negotiation. TLS negotiates concrete ciphers, hash functions and MACs between the two parties, a practice common across many cryptographic protocols. The TLS standard defines codepoints for supported mechanisms: the client proposes a suite, and the server either picks its preference from that suite or rejects the connection. TLS also supports extensions, including Server Name Indication (SNI), which states the domain name a connection is meant for, plus mechanisms that identify the protocol being protected, indicate use of an application-layer protocol, or add features like Certificate Transparency.
Mechanism
Subprotocols. TLS is message-based; its subprotocols define the message exchanges. The Record Protocol embeds messages and maps them onto TCP, and is the base the others run on top of. The Handshaking Protocols are a group consisting of the Handshake Protocol (a specific protocol name, not the name of the group), Change CipherSpec (signals a transition to different cryptography), and Alert (signals errors). Separately, TLS Application Data carries the secured payloads.
Pitfall
“Handshake Protocol” names one specific protocol within TLS, not the broader category of protocols involved in the handshake phase. That broader category is the “Handshaking Protocols” group, which also includes Change CipherSpec and Alert. An answer that treats the two names as interchangeable will lose the distinction the lecture explicitly calls out.
Mechanism
The Handshake Protocol’s messages. These map directly onto the abstract flow from the previous page:
- ClientHello: version number, nonce, cipher suites.
- ServerHello: version number, nonce, cipher suites, session ID.
- ServerCertificate: the certificate.
- ServerKeyExchange: the Diffie-Hellman parameter.
- ClientKeyExchange: the Diffie-Hellman value.
- Finished: the MACs.
Change CipherSpec messages may appear before or after Handshake Protocol messages; they signal that the messages that follow use (different) encryption.
Mechanism
TLS 1.2’s handshake, in order. The client first establishes its security capabilities: protocol version, session ID, cipher suite, compression method, and an initial random number. The server may then send its certificate, a key exchange message, and a certificate request, before signalling the end of the hello phase. The client sends its certificate if one was requested, sends its key exchange message, and may send a certificate verification message. The server then switches cipher suite and finishes the handshake protocol. Only after all of this does the client send the application payload.
EXTRACTION DEFECT: Figure 17 (the TLS 1.2 protocol flow diagram) did not survive extraction. The message sequence above is the surrounding text that describes it; the visual diagram itself is not reproduced.
Mechanism
TLS 1.3. TLS 1.2 was already the product of many improvements over TLS 1.0 and 1.1, but it kept weaknesses from relatively old cryptography: MAC-then-encrypt instead of encrypt-then-MAC, and the use of compression. From around 2008, pressure on the protocol became serious enough that a redesign was needed.
Compare
EXTRACTION DEFECT: Figure 18 (the general TLS 1.3 protocol flow diagram) did not survive extraction, and no further descriptive text accompanies it beyond the differences listed above.
Mechanism
TLS 1.3’s 1-RTT handshake, in outline: the client sends a TLS hello message proposing a key-agreement protocol, parameters, and the cipher suites it supports. The server sends its own hello, choosing the key agreement protocol, parameters, cipher suite, and a server-signed certificate. The client then checks that certificate, generates its key, and can immediately make an application request, e.g. an HTTPS GET.
EXTRACTION DEFECT: Figure 19 (the detailed TLS 1.3 1-RTT handshake diagram) did not survive extraction. The three-step outline above is the only description of it that survived.
Mechanism
TLS 1.3’s 0-RTT. TLS 1.2 offered two session-resumption features, both achieving resumption in just one RTT: a Session Identifier, letting the server look up a previous key, and a Session Ticket, a token the client holds and sends back to resume the connection. TLS 1.3 deprecates both and replaces them with a pre-shared key mode, conceptually similar to a session ticket, signalled using the Early Data extension. This is an intentional design choice that acknowledges the weaknesses it brings.
Threat
0-RTT trades away two properties. The session key it reuses is not forward-secure: if it is later compromised, all data encrypted under it becomes readable. It also has no replay protection, so a captured 0-RTT request can be resent. The lecture restricts 0-RTT to idempotent application-layer messages, such as an HTTP GET, for exactly this reason, and notes it is unknown whether operators will actually implement that restriction correctly.
EXTRACTION DEFECT: Figure 20 (the 0-RTT diagram) did not survive extraction; the description above is reconstructed only from the surrounding text, not from the figure itself.
Exam detail
Keep three things exact: the six Handshake Protocol message names in order, the two properties TLS 1.3 gives up in 0-RTT (forward secrecy and replay protection) and why that restricts it to idempotent requests, and which two TLS 1.2 features (Session Identifier, Session Ticket) TLS 1.3 replaces with the pre-shared key mode.
Aside
The lecture notes point to Cloudflare’s own TLS 1.3 write-up for further, non-examinable reading: blog.cloudflare.com/tls-1-3-overview-and-q-and-a.
Recall
- The Record Protocol is the base; the Handshake Protocol, Change CipherSpec, Alert, and Application Data all run on top of it.
- Handshake message order: ClientHello, ServerHello, ServerCertificate, ServerKeyExchange, ClientKeyExchange, Finished.
- TLS 1.3 mandates AEAD ciphers, encrypts the handshake from right after ServerHello, and reaches 1-RTT.
- TLS 1.3’s 0-RTT mode is not forward-secure and has no replay protection, so it is restricted to idempotent requests.
Source
Week 8 slides PDF