TLS/DTLS Handshake Workbench

TLS/DTLS Handshake Workbench

animation
security
tls
dtls

TLS and DTLS handshake narrated tour

Play silently with captions on provisional storyboard timing; narration audio is pending. Production pacing is not protocol time. Choose Reduced motion for a complete still at each beat.

Play the tour to open the workbench. Pause, replay a beat, or read the full transcript below. Situations marked CANNOT SHOW keep the existing frame and provide captions only.

Full transcript — TLS and DTLS handshake (8 beats)

B1 — Meter identity question
You are the engineer connecting a building's water meter to its service. A usage reading needs to reach the intended service without being exposed to an impostor. Before sending that reading, how does the meter establish who will receive it?

Model caption: Your water meter must reach its intended service.

B2 — TLS 1.3 scope
Transport Layer Security, or TLS, protects a connection over a reliable, ordered stream. Its handshake negotiates protection, sets up fresh keys, and checks the other endpoint's identity. Follow the certificate handshake for TLS version one point three. The normal handshake completes in one round trip.

Model caption: TLS version one point three: a normal full handshake takes one round trip.

B3 — Certificate handshake
The meter's Client Hello offers security options. The service's Server Hello selects compatible options and supplies information for calculating handshake keys. The following handshake messages are encrypted. The meter validates the server certificate, including its expected name. A signature ties the server's identity to the handshake. Finished messages check that both sides derived the right secrets and saw the same handshake messages. Then protected application data can flow.

Model caption: Options, fresh keys, identity validation, and Finished verification lead to protected application data.

B4 — DTLS loss and MTU
Now give your meter a datagram connection: separate messages that can be lost. Datagram Transport Layer Security, or DTLS, protects that kind of transport. The loss example uses DTLS version one point three. Use a certificate chain: linked digital identity documents. Set a budget of one hundred sixty bytes per datagram. These are teaching estimates, rather than measured traffic sizes.

Model caption: DTLS version one point three; certificate chain; one hundred sixty bytes per datagram. Sizes are teaching estimates.

B5 — Fragment budget arithmetic
Start with seven hundred sixty bytes. Add two thousand six hundred for the certificate choice, giving three thousand three hundred sixty. Add two hundred twenty for datagram handling, giving three thousand five hundred eighty; the TLS version one point two addition is zero. Compare the datagram budget with the model's minimum of sixty-four bytes; one hundred sixty is larger. Divide three thousand five hundred eighty by one hundred sixty: twenty-two, with sixty bytes remaining. Round up to twenty-three. The model requires at least one fragment, so the result stays twenty-three message pieces, called fragments.

Model caption: Seven hundred sixty plus two thousand six hundred plus two hundred twenty plus zero gives three thousand five hundred eighty bytes. The larger of sixty-four and one hundred sixty is one hundred sixty. Division gives twenty-two with sixty bytes remaining; rounding up gives twenty-three, already greater than the minimum of one.

B6 — Conditional retransmission
The group of certificate messages can be split into fragments and put back together before verification. If that group is missing, the loss path includes acknowledgments and retransmission when a timer expires. Recovery gets handshake messages delivered so verification can continue.

Model caption: A missing group of certificate messages can trigger retransmission when a timer expires.

B7 — Encryption before trust
One misconception is that encrypted handshake messages already mean the intended server is trusted. After Server Hello, encryption is active while identity is still being checked. Accepting any certificate could leave your meter talking privately to an impostor. Certificate validation and Finished verification establish the authenticated connection.

Model caption: Encryption is active before server identity validation and Finished checks are complete.

B8 — Authenticated data
Establish who shares the keys before trusting the protected reading.

Model caption: Establish who shares the keys before trusting the protected reading.

Back to the chapter