TLS 1.3 Protocol Execution
Transcript
Made automatically from the video's sound, so it may contain mistakes. Click a line to play from there.
Welcome to this explainer. Now, I know you already understand the basics of the web threat model, so look, we're completely banning those tired padlock in a locked box analogies today. No fluff.
Instead, we're going to dismantle and trace the exact mechanics of modern web security protocols. We are diving straight into the cryptographic primitives of TLS 1.3, exactly as defined in RFC 8446.
Let's get right into it. Here's our agenda for today. One, the TLS 1.3 handshake. 2.
Zero RTT resumption risks. 3. Validating certificate trust. 4.
Closing the SSL stripping window. And five, client authentication and origin security. Right, let's kick things off with section one. The TLS 1.3 handshake.
So Legacy TLS 1.2 was honestly a massive bottleneck. It required this bulky, expensive two-round trip setup, literally eating up around 110 milliseconds just to negotiate a secure channel before a single bite of actual data could even be sent.
Well, TLS 1.3 fundamentally changes the maths here. It completely halves that connection latency, establishing a secure handshake in a single round trip. That one round trip, that is our new cryptographic floor.
Tracing the RFC 8446 spec, you can really see this highly condensed sequence in action. In step one, the client doesn't just say hello, it immediately fires off its ephemeral Diffie-Hellman key share right inside the initial packet.
And we're increasingly seeing post-quantum hybrids utilized here, like X25519 MLKEM768. Armed with this, step two allows the server to instantly reply with its encrypted extensions.
By step three, boom, the client sends its finished message right alongside the encrypted application data. It's incredibly efficient. But listen, to achieve this incredible speed without sacrificing security, TLS 1.3 had to aggressively shed some serious dead weight.
It completely deprecated vulnerable legacy ciphers across the board. Out went static RSA and static Diffie Hellman. Why? Because they fundamentally fail to provide mandatory forward secrecy.
Think about it. If a server's key is compromised years from now, your past traffic absolutely must remain unreadable. So it stripped those out alongside CBC mode, SHAR-1, and those frankly ancient export ciphers.
So the big takeaway here is that only authenticated encryption with associated data, or AEAD, cipher suites actually survive in this modern protocol. We're talking about highly secure suites like AESGCM and Chacha 20 Poly1305. These modern ciphers are fantastic because they ensure both confidentiality and integrity at the record layer, meaning an attacker cannot tamper with even a single byte of ciphertext without instantly invalidating the cryptographic Mac and forcing the connection to just instantly drop.
Zero RTT resumption risks. Now this begs a really interesting architectural question. If one round trip is the absolute minimum for a brand new connection, how on earth do we optimise performance for, say, mobile users who are connecting to an endpoint they've already securely communicated with in the recent past?
Well, the answer is zero round trip time resumption, or zero RTT early data. This brilliant protocol feature lets clients send encrypted payload data alongside their very first client hello message by leveraging a pre shared key, or PSK, from a previous session ticket.
It completely eliminates handshake latency, but it introduces a very specific and severe structural risk. The inherent threat here is network replay for non-idempotent post requests. Because an attacker can't actually read the zero RTT data, what they can do is blindly intercept and replay that exact same encrypted packet to the server over and over again.
Imagine if that payload is a financial transfer or a critical database right. You've got a massive issue on your hands. This absolutely demands strict back-end mitigations. You either need single-use tickets, which requires a globally shared database to delete a ticket the millisecond it's used, or you need strict client hello recording windows.
Without enforcing these anti-replay mechanisms, zero RTT is honestly incredibly dangerous. Alright, section three, validating certificate trust. So, the connection is encrypted.
Great. But how does a client actually trust the server's identity in the first place? Well, trust is anchored by X.509 authentication. To defeat active spoofing, the server provides a digital certificate containing its public asymmetric key.
But this must be signed by an implicitly trusted certificate authority. And, crucially in modern infrastructure, it must be verifiable against public certificate transparency logs to ensure it wasn't issued maliciously in the dark. But what happens if that identity is forged, or the certificate itself has been compromised and revoked?
In older legacy setups, browsers had to make a separate, annoyingly slow query to the CA to check that revocation status. Well, TLS 1.3 fundamentally changes how online certificate status protocol, or OCSP messages, are handled.
It securely staples these status checks directly inside the handshake right on the fly. This prevents that extra latency and provides a massive privacy boost, all while completely guaranteeing the certificate's integrity.
Closing the SSL stripping window. Let's examine a temporal vulnerability that exists before the TLS handshake even has a chance to begin. If a user simply types a standard domain into their browser without explicitly typing HTTPS, a really dangerous window opens up.
Within the first 50 milliseconds, an on path attacker can intercept that initial clear text packet. By a hundred milliseconds, they drop the HTTPS upgrade entirely, silently forcing the browser into an unencrypted session without the user ever even realizing it's happening.
And this temporal gap is exactly why the strict transport security or HSTS header is an absolute mandate. HSTS literally slams that initial SSL stripping window completely shut. It basically instructs the browser to strictly and exclusively enforce HTTPS connections.
When you combine this with browser preload lists, your application ensures that the client will never, under any circumstances, even attempt a clear text connection. Finally, section 5. Client authentication and origin security.
Typical web traffic relies on one-way TLS, right? The server proves its identity, but the client remains totally unauthenticated at the network layer. Now, for back-end infrastructure, that is a glaring vulnerability.
RFC 8446 enables robust mutual authentication, or MTLS. Here, the server essentially sends a certificate request, enforcing the client to prove its own identity via its own signed certificate. When you pair this with RFC 8705, certificate bound tokens, this becomes the absolute ultimate cryptographic lock for zero trust service to service communication.
And this is exactly why you cannot rely purely on perimeter defenses. Cloudflare explicitly warns us that weaker server to edge security represents a major vulnerability. Think about it.
If you have a beautifully optimized, highly secure TLS 1.3 connection at the CDN edge, but you're still running a legacy SSL connection between your CDN and your back-end origin server, your entire threat model is completely compromised. You're basically leaving the back door wide open.
So I'll leave you with this final provocative thought to take back to your engineering teams. Are your origin servers relying on legacy perimeter security, or are you actually enforcing mutual authentication at every single node?
I highly recommend you review your architecture today. Map out your service to service traffic, and please ensure you are strictly enforcing these cryptographic primitives at every single layer of your stack. Thank you so much for joining me on this explainer.
Catch you next time.