TLS 1.3 Handshake Step by Step
Walk through ClientHello, ServerHello, key derivation, and Finished.
TLS 1.3 Handshake Step by Step is a free Cryptology Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cryptology Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Why TLS?
TLS (Transport Layer Security) protects data in transit over the internet. Every HTTPS connection uses TLS. TLS 1.3, standardized in RFC 8446 (2018), eliminated legacy algorithms and reduced handshake round trips from 2 to 1.
ClientHello
The client sends: TLS version (1.3), a random 32-byte nonce, a list of supported cipher suites (e.g., TLS_AES_256_GCM_SHA384), and key share extensions containing ECDH public keys for supported groups (X25519, P-256).
ServerHello
The server selects a cipher suite and key share group, generates its own ECDH ephemeral key pair, and replies with its public key. At this point both sides can compute the shared secret via ECDH.
Key Derivation via HKDF
TLS 1.3 uses HKDF (HMAC-based Key Derivation Function) in a schedule: early secret → handshake secret → master secret. Each stage derives separate keys for client/server handshake traffic and application data.
Server Finished
The server sends its Certificate, CertificateVerify (a signature over the handshake transcript using its private key), and Finished (an HMAC over the transcript). All encrypted under the handshake traffic key.
Client Finished
The client verifies the certificate chain, checks the CertificateVerify signature, verifies the Finished MAC, then sends its own Finished message. The handshake is now complete in 1 round trip (1-RTT).
0-RTT Resumption
TLS 1.3 supports 0-RTT (zero round-trip) resumption using a pre-shared key (PSK) from a previous session. The client can send application data immediately, but 0-RTT data lacks replay protection and should be idempotent.
TLS 1.3 Cipher Suites
TLS 1.3 mandates AEAD ciphers only: AES-128-GCM-SHA256, AES-256-GCM-SHA384, ChaCha20-Poly1305-SHA256. All use ECDHE or DHE for key exchange. Weak suites (RC4, 3DES, CBC) are gone.
Record Layer
After the handshake, all data is wrapped in TLS records: 5-byte header (content type, version, length) + AEAD-encrypted payload. The sequence number is implicit, used as part of the AEAD nonce to prevent replay.
Forward Secrecy
Because TLS 1.3 always uses ephemeral key exchange (ECDHE), compromising the server's long-term private key does not decrypt past sessions. Each session has a unique ephemeral key pair destroyed after the handshake.
Wireshark View
In Wireshark: ClientHello shows random + key_share; ServerHello shows selected group; subsequent records show as "Application Data" (encrypted). Export SSLKEYLOGFILE to decrypt with the session keys.
Quick Check
How many round trips does a TLS 1.3 full handshake require?
Recap
TLS 1.3 combines ECDHE, HKDF, AEAD ciphers, and certificate-based authentication into a 1-RTT handshake with mandatory forward secrecy. Next: TLS record layer and cipher suites in depth.
Frequently asked questions
Is the “TLS 1.3 Handshake Step by Step” lesson free?
Yes — the full text of “TLS 1.3 Handshake Step by Step” is free to read here on the web, and the Cryptology Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cryptology Academy course, upgrade to CoddyKit PRO.
What will I learn in “TLS 1.3 Handshake Step by Step”?
Walk through ClientHello, ServerHello, key derivation, and Finished. You practise Cryptology Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Cryptology Academy?
No prior experience is required. Cryptology Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “TLS 1.3 Handshake Step by Step” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Cryptology Academy lesson?
Yes. Every Cryptology Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- TLS 1.3 Handshake Step by Step
- TLS Record Layer & Cipher Suites
- Certificate Validation in TLS
- TLS Attacks: BEAST, POODLE & Downgrade