awesome-everything RU
↑ Back to the climb

Networking & Protocols

Integrated handshake and 1-RTT

Crux QUIC fuses the transport and TLS layers into one exchange — the client sends TLS ClientHello in the first packet and application data flows after just one round trip.
Your altitude — climbing toward senior
ZeroJuniorMiddleSenior
You are at middle altitude — in the sky
◷ 12 min

TCP finishes its handshake. Then TLS starts its own. These are separate protocols with separate round trips. Every new connection pays that double toll. QUIC refuses to accept that — it runs both handshakes in the same packet exchange.

The merged handshake

QUIC eliminates the separate transport handshake layer. Instead of TCP SYN/SYN-ACK (1 RTT) followed by TLS ClientHello/ServerHello (another RTT), QUIC carries the TLS handshake inside CRYPTO frames that travel in QUIC packets.

The sequence:

  1. Client sends an Initial packet containing a CRYPTO frame with the TLS ClientHello.
  2. Server responds with its own Initial packet containing a CRYPTO frame with ServerHello + EncryptedExtensions + Certificate + CertificateVerify — all in one packet burst.
  3. Client sends a Handshake packet with a CRYPTO frame containing Finished.
  4. Both sides transition to 1-RTT state. The client can send stream data immediately after step 1 completes.

Result: 1 RTT from client start to receiving server’s response, vs TCP+TLS’s 2 RTT.

QUIC handshake packet sequence
ClientServerInitial [CRYPTO: ClientHello] + Padding
ClientServerInitial [CRYPTO: ServerHello + EE + Cert + CertVerify]
ClientServerHandshake [CRYPTO: Finished]
ClientServerHandshake [CRYPTO: Finished] + 1-RTT [STREAM data]
Total: 1 RTT before client can send stream data. TCP+TLS = 2 RTT.

Four encryption levels

QUIC defines four distinct encryption levels, each with its own key:

  1. Initial — derived deterministically from the destination Connection ID. Both sides can compute these keys before exchanging any material, so the Initial packet is encryptable immediately.
  2. 0-RTT — derived from a session ticket cached from a previous connection. Allows the client to send application data in the ClientHello without waiting for the server’s response.
  3. Handshake — derived from the shared secrets after the ClientHello-ServerHello exchange. Used for Finished messages.
  4. 1-RTT — the final post-handshake keys. All subsequent stream data uses these.

Three packet-number spaces

The four encryption levels map to three packet-number spaces:

  • Initial/Handshake — each has its own packet-number sequence (0, 1, 2, …).
  • Application Data — 0-RTT and 1-RTT share one space.

Separation is critical: loss detection is independent per space. A lost Initial packet triggers PTO in the Initial space only — it does not shrink the congestion window for 1-RTT data.

Quiz

Why does QUIC have separate packet-number spaces for Initial/Handshake vs. 1-RTT?

Trace it
1/4

Trace a QUIC connection from client initiation to the first stream data.

1
Step 1 of 4
Client sends Initial packet with ClientHello in CRYPTO frame. What encryption key does it use?
2
Locked
Server receives Initial packet. What does it respond with?
3
Locked
Client receives server Initial. What state is the client in?
4
Locked
Client sends first stream data in a 1-RTT packet. What is the RTT elapsed since the Initial?
Order the steps

Order the packet types in a QUIC handshake from initial to completion:

  1. 1 Client sends Initial packet with ClientHello
  2. 2 Server sends Initial packet with ServerHello + EncryptedExtensions + Certificate + CertificateVerify
  3. 3 Server sends Handshake packet with Finished
  4. 4 Client sends Handshake packet with Finished
  5. 5 Both sides transition to 1-RTT state and can send Short Header packets with stream data
Why this works

QUIC’s Initial packet uses deterministic keys derived from the Connection ID — an apparently paradoxical choice. Why encrypt if both sides can compute the key? The goal is not secrecy at this stage but integrity: encrypting the Initial prevents passive observers from trivially tampering with the ClientHello. The Handshake and 1-RTT keys, derived from DH key exchange material, provide actual confidentiality.

QUIC handshake latency
QUIC new connection
1 RTT before first stream byte
TCP + TLS 1.3 new connection
2 RTT before first stream byte
QUIC 0-RTT resumption
0 RTT (data in ClientHello)
Saving on 100 ms link
100 ms per new connection
Saving on 150 ms link (Asia-US)
150 ms per new connection
Recall before you leave
  1. 01
    Why does QUIC's 1-RTT handshake save latency compared to TCP+TLS, and what do the numbers look like on intercontinental links?
  2. 02
    What are the four QUIC encryption levels and what is each used for?
  3. 03
    Why are packet-number spaces separated per encryption level?
Recap

QUIC’s handshake merges what TCP and TLS kept separate: a CRYPTO frame inside a QUIC Initial packet carries the TLS ClientHello so both transport and TLS complete in one round trip instead of two. The server responds with its full Certificate chain in the same burst, and the client can send stream data immediately after. Four encryption levels (Initial, 0-RTT, Handshake, 1-RTT) map to three packet-number spaces so that loss detection in each phase does not interfere with the others. On a 100 ms link this saves 100 ms per new connection — 150 ms on cross-Pacific paths. 0-RTT resumption goes further: a cached session ticket lets the client attach application data to the ClientHello itself, reaching zero round trips at the cost of replay vulnerability for non-idempotent requests.

Connected lessons
appears again in162
Continue the climb ↑Connection IDs and network migration
shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?
sources3
expand
  1. 01
  2. 02
  3. 03

Trademarks belong to their respective owners. Editorial reference only.