Log inStart free
LESSON 33.23 · 5 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

The TLS handshake

Watch a client and a gateway agree on a secret key in one round trip.


Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 3 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 33.23 · PROTOCOL BAYTLS 1.3 · A = 753
01
Stage 1 of 5 · Client hello
After TCP, the client starts TLS with a hello. It sends its key share A and keeps its secret a.
Explain it simply

The client has opened a TCP connection to the gateway. Now it starts TLS, the lock on the connection. It picks a secret number a and never sends it. It sends 753, a public number made from a.

The client lane sends a hello arrow to the gateway lane at 80 ms, after the TCP arrows. It carries the key share A, 753.

in the clearencryptedsecrets, keysattacker, failed checkTCPTLS round trips
0 ms80 ms160 ms240 msclientR25 · chat appAPI gatewayapi.llm.exampleTCP SYNSYN-ACKClientHello · A = 753clientsecret a = 897 (never sent)A = 7897 mod 2,039 = 753client random 6864TLS between client and gateway0 ms80 ms160 ms240 msclientR25 · chat appAPI gatewayapi.llm.exampleTCP SYNSYN-ACKClientHello · A = 753clientsecret a = 897 (never sent)A = 7897 mod 2,039 = 753client random 6864TLS between client and gateway
Toy: R25's connection from 33.C4; toy-size keys (p = 2,039, n = 3,233)
STAGE 1 / 5
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
A=ga mod p\sy{A}{data}{A} = g^{\sy{a}{param}{a}} \bmod p
A=7897 mod 2039=753A = 7^{897} \bmod 2039 = 753

The public share A comes from the secret a, which never leaves.

Common mix-ups

MYTHEncryption alone stops an attacker in the middle.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01At a 200 ms round trip, how much later does TLS 1.2 send the request than TLS 1.3?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
  • 4 more stages and 3 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.