TLS handshake benchmarks: what a new connection really costs

NetworkingSecurity

Every HTTPS connection starts with a TLS handshake: the client and the server agree on keys, the server proves who it is with its certificate, and only then does the first request go out. The MQTT vs HTTPS benchmarks found that on a new connection the handshake is almost all of the cost, and that about 2.5 KB of it came from one new thing: the post-quantum key exchange that Go now offers by default. This benchmark takes the handshake apart. It measures the bytes, packets, round trips and CPU of each kind of handshake, and of the certificate the server sends, so you can tell which of them matter for your connections.

The handshake is the layer between TCP and the application (the network protocol dependencies article shows where TLS sits). Five handshakes are compared:

To separate what the protocol costs from what one implementation costs, every cell runs on two stacks that share no code: Go (crypto/tls client against a Go net/http server) and OpenSSL (a small client on libssl against nginx). Bytes and round trips are the protocol’s, so the two stacks should agree; CPU is the implementation’s. Every connection fetches a path derived from its sequence number and checks that the server echoes it exactly: 7,094,594 connections, 0 corrupted responses.

SetupDetails
Go stackGo 1.25.14 crypto/tls: the client, and a net/http server with GOMAXPROCS=1 · library defaults: TLS 1.2–1.3, default groups (X25519MLKEM768 first), session tickets on · no 0-RTT: Go does not implement early data
OpenSSL stackOpenSSL 3.5.7 (Debian trixie): a C client on libssl, and nginx 1.26.3 with one worker · OpenSSL defaults (groups auto, X25519MLKEM768 first; stateless session tickets) plus ssl_early_data on · client sets TCP_NODELAY, as curl and browsers do
HandshakesTLS 1.2 ECDHE · TLS 1.3 full · TLS 1.3 resumption (PSK with a fresh key exchange) · TLS 1.3 0-RTT (OpenSSL only) · key exchange X25519, or X25519MLKEM768 as each stack offers it by default (it sends key shares for both X25519MLKEM768 and X25519) · TLS 1.2 offers X25519 then P-256, because an ECDSA certificate’s curve must be offered (RFC 8422); X25519 is still the one used
CertificatesThrowaway chains, one key type end to end, roots not sent: ECDSA P-256 with 1 intermediate (831 B of certificates, used everywhere unless named) or 2 intermediates (1,247 B), RSA-2048 (1,623 B) and RSA-4096 (2,646 B), each with 1 intermediate · every full handshake verifies the chain and the host name
One connectionTCP handshake, TLS handshake, GET /<run>-<seq>-<hash> over HTTP/1.1 with Connection: close, a 22-byte echo, close_notify and FIN both ways
NetworkOne network namespace, IPv4 loopback at a 1,500-byte MTU (and 1,280 for one check) with segmentation offloads off, so packets have real Ethernet sizes · links emulated with tc netem: LAN (nothing added), 50 ms round trip (25 ms each way), 200 ms round trip with 1 % random loss in each direction · bytes and packets from nftables counters on the server ports, each direction separately, IP headers included
CPUAMD Ryzen AI Max+ 395 · cores 0–7 and their SMT siblings reserved for the benchmark · both servers on core 2 (one loaded at a time) · serial clients on core 4 · load clients on the other reserved cores
MethodEvery cell is a fresh client process, run 5 times · reported value: median of the 5 run values, with the min–max across runs in the tables; a run’s value is the median of its connections (100 on the LAN, 20 on the slow links) · server CPU: 64 concurrent clients for 4 s after 1 s of warm-up, the server container’s CPU counter divided by completed connections; a run counts only if the server core was at least 90 % busy · client CPU: the client process’s own user + kernel time over 100 serial connections · a wait for a quiet link before every cell

The scoreboard

Scoreboard, median per handshake type and stack. Bytes per connection, Go: TLS 1.2 2,596 B, TLS 1.3 full 2,645 B, 1.3 PQ 5,059 B, 1.3 resumed 1,970 B. First byte, 50 ms link, Go: TLS 1.2 201 ms, TLS 1.3 full 152 ms, 1.3 PQ 152 ms, 1.3 resumed 152 ms. Server CPU, Go: TLS 1.2 103 µs, TLS 1.3 full 105 µs, 1.3 PQ 167 µs, 1.3 resumed 91 µs. Client CPU, Go: TLS 1.2 232 µs, TLS 1.3 full 233 µs, 1.3 PQ 332 µs, 1.3 resumed 114 µs. Bytes per connection, OpenSSL: TLS 1.2 2,802 B, TLS 1.3 full 3,393 B, 1.3 PQ 5,804 B, 1.3 resumed 2,362 B, 1.3 0-RTT 1,967 B. First byte, 50 ms link, OpenSSL: TLS 1.2 203 ms, TLS 1.3 full 153 ms, 1.3 PQ 153 ms, 1.3 resumed 152 ms, 1.3 0-RTT 101 ms. Server CPU, OpenSSL: TLS 1.2 113 µs, TLS 1.3 full 147 µs, 1.3 PQ 189 µs, 1.3 resumed 123 µs, 1.3 0-RTT 101 µs. Client CPU, OpenSSL: TLS 1.2 322 µs, TLS 1.3 full 372 µs, 1.3 PQ 472 µs, 1.3 resumed 141 µs, 1.3 0-RTT 143 µs. Best in every run, out of 8 measures: 1.3 resumed on 3 · 1.3 0-RTT on 3; 2 have no fixed order Eight measures from the sections below · each handshake as a multiple of the best TLS 1.2 TLS 1.3 full 1.3 PQ 1.3 resumed 1.3 0-RTT 1× = the best median; grey line: lowest to highest run 1× (best) 2× 3× Bytes per connection, Go TLS 1.2 2,596 B TLS 1.3 full 2,645 B 1.3 PQ 5,059 B 1.3 resumed 1,970 B 1.3 0-RTT Go has no 0-RTT First byte, 50 ms link, Go TLS 1.2 201 ms TLS 1.3 full 152 ms 1.3 PQ 152 ms 1.3 resumed 152 ms 1.3 0-RTT Go has no 0-RTT Server CPU, Go TLS 1.2 103 µs TLS 1.3 full 105 µs 1.3 PQ 167 µs 1.3 resumed 91 µs 1.3 0-RTT Go has no 0-RTT Client CPU, Go TLS 1.2 232 µs TLS 1.3 full 233 µs 1.3 PQ 332 µs 1.3 resumed 114 µs 1.3 0-RTT Go has no 0-RTT Bytes per connection, OpenSSL TLS 1.2 2,802 B TLS 1.3 full 3,393 B 1.3 PQ 5,804 B 1.3 resumed 2,362 B 1.3 0-RTT 1,967 B First byte, 50 ms link, OpenSSL TLS 1.2 203 ms TLS 1.3 full 153 ms 1.3 PQ 153 ms 1.3 resumed 152 ms 1.3 0-RTT 101 ms Server CPU, OpenSSL TLS 1.2 113 µs TLS 1.3 full 147 µs 1.3 PQ 189 µs 1.3 resumed 123 µs 1.3 0-RTT 101 µs Client CPU, OpenSSL TLS 1.2 322 µs TLS 1.3 full 372 µs 1.3 PQ 472 µs 1.3 resumed 141 µs 1.3 0-RTT 143 µs Each bar is that handshake's median as a multiple of the best median for the measure, log scale: 1× is the best, a bar twice as long is twice as costly. Grey line: lowest to highest of the 5 process runs; the median is printed after each bar.
Eight headline measures from the sections below, each handshake's median as a multiple of the best median for that measure (1×; log scale, a longer bar is worse), labelled with the measured value. Median of 5 process runs; grey line: lowest to highest run. ECDSA P-256 certificate with one intermediate; PQ: the X25519MLKEM768 key exchange. Bytes: both directions, all headers, LAN. First byte: connect() to the first response byte on the 50 ms link. CPU: per connection, one core. Go's crypto/tls has no 0-RTT.
Scoreboard, median per handshake type and stack. Bytes per connection, Go: TLS 1.2 2,596 B, TLS 1.3 full 2,645 B, 1.3 PQ 5,059 B, 1.3 resumed 1,970 B. First byte, 50 ms link, Go: TLS 1.2 201 ms, TLS 1.3 full 152 ms, 1.3 PQ 152 ms, 1.3 resumed 152 ms. Server CPU, Go: TLS 1.2 103 µs, TLS 1.3 full 105 µs, 1.3 PQ 167 µs, 1.3 resumed 91 µs. Client CPU, Go: TLS 1.2 232 µs, TLS 1.3 full 233 µs, 1.3 PQ 332 µs, 1.3 resumed 114 µs. Bytes per connection, OpenSSL: TLS 1.2 2,802 B, TLS 1.3 full 3,393 B, 1.3 PQ 5,804 B, 1.3 resumed 2,362 B, 1.3 0-RTT 1,967 B. First byte, 50 ms link, OpenSSL: TLS 1.2 203 ms, TLS 1.3 full 153 ms, 1.3 PQ 153 ms, 1.3 resumed 152 ms, 1.3 0-RTT 101 ms. Server CPU, OpenSSL: TLS 1.2 113 µs, TLS 1.3 full 147 µs, 1.3 PQ 189 µs, 1.3 resumed 123 µs, 1.3 0-RTT 101 µs. Client CPU, OpenSSL: TLS 1.2 322 µs, TLS 1.3 full 372 µs, 1.3 PQ 472 µs, 1.3 resumed 141 µs, 1.3 0-RTT 143 µs. Best in every run, out of 8 measures: 1.3 resumed on 3 · 1.3 0-RTT on 3; 2 have no fixed order Eight measures from the sections below · each handshake as a multiple of the best TLS 1.2 TLS 1.3 full 1.3 PQ 1.3 resumed 1.3 0-RTT 1× = the best median; grey line: lowest to highest run 1× (best) 2× 3× Bytes per connection, Go TLS 1.2 2,596 B TLS 1.3 full 2,645 B 1.3 PQ 5,059 B 1.3 resumed 1,970 B 1.3 0-RTT Go has no 0-RTT First byte, 50 ms link, Go TLS 1.2 201 ms TLS 1.3 full 152 ms 1.3 PQ 152 ms 1.3 resumed 152 ms 1.3 0-RTT Go has no 0-RTT Server CPU, Go TLS 1.2 103 µs TLS 1.3 full 105 µs 1.3 PQ 167 µs 1.3 resumed 91 µs 1.3 0-RTT Go has no 0-RTT Client CPU, Go TLS 1.2 232 µs TLS 1.3 full 233 µs 1.3 PQ 332 µs 1.3 resumed 114 µs 1.3 0-RTT Go has no 0-RTT Bytes per connection, OpenSSL TLS 1.2 2,802 B TLS 1.3 full 3,393 B 1.3 PQ 5,804 B 1.3 resumed 2,362 B 1.3 0-RTT 1,967 B First byte, 50 ms link, OpenSSL TLS 1.2 203 ms TLS 1.3 full 153 ms 1.3 PQ 153 ms 1.3 resumed 152 ms 1.3 0-RTT 101 ms Server CPU, OpenSSL TLS 1.2 113 µs TLS 1.3 full 147 µs 1.3 PQ 189 µs 1.3 resumed 123 µs 1.3 0-RTT 101 µs Client CPU, OpenSSL TLS 1.2 322 µs TLS 1.3 full 372 µs 1.3 PQ 472 µs 1.3 resumed 141 µs 1.3 0-RTT 143 µs Each bar is that handshake's median as a multiple of the best median for the measure, log scale: 1× is the best, a bar twice as long is twice as costly. Grey line: lowest to highest of the 5 process runs; the median is printed after each bar.
Eight headline measures from the sections below, each handshake's median as a multiple of the best median for that measure (1×; log scale, a longer bar is worse), labelled with the measured value. Median of 5 process runs; grey line: lowest to highest run. ECDSA P-256 certificate with one intermediate; PQ: the X25519MLKEM768 key exchange. Bytes: both directions, all headers, LAN. First byte: connect() to the first response byte on the 50 ms link. CPU: per connection, one core. Go's crypto/tls has no 0-RTT.
MeasureTLS 1.2TLS 1.3 full1.3 PQ1.3 resumed1.3 0-RTT
Bytes per connection, Go2,596 B
2,592–2,602 B · same
2,645 B
2,640–2,647 B
5,059 B
5,049–5,062 B · 0.52×
1,970 B
1,966–1,974 B · 1.3×
Go has no 0-RTT
First byte, 50 ms link, Go201 ms
201–203 ms · 0.75×
152 ms
151–152 ms
152 ms
151–153 ms · same
152 ms
151–152 ms · same
Go has no 0-RTT
Server CPU, Go103 µs
102–104 µs · same
105 µs
105–106 µs
167 µs
166–169 µs · 0.63×
91 µs
90–91 µs · 1.2×
Go has no 0-RTT
Client CPU, Go232 µs
231–249 µs · same
233 µs
233–252 µs
332 µs
330–347 µs · 0.70×
114 µs
113–118 µs · 2.0×
Go has no 0-RTT
Bytes per connection, OpenSSL2,802 B
2,802–2,803 B · 1.2×
3,393 B
3,374–3,396 B
5,804 B
5,791–5,805 B · 0.58×
2,362 B
2,334–2,364 B · 1.4×
1,967 B
1,965–1,967 B · 1.7×
First byte, 50 ms link, OpenSSL203 ms
201–203 ms · 0.75×
153 ms
152–153 ms
153 ms
152–153 ms · same
152 ms
151–152 ms · same
101 ms
101–102 ms · 1.5×
Server CPU, OpenSSL113 µs
113–114 µs · 1.3×
147 µs
145–147 µs
189 µs
188–190 µs · 0.77×
123 µs
122–123 µs · 1.2×
101 µs
100–102 µs · 1.5×
Client CPU, OpenSSL322 µs
320–352 µs · 1.2×
372 µs
356–387 µs
472 µs
457–476 µs · 0.79×
141 µs
137–144 µs · 2.6×
143 µs
137–148 µs · 2.6×

Median of 5 process runs, lowest to highest run beneath; bold: best in every run; after the range, the factor against TLS 1.3 full: above 1× better than TLS 1.3 full, below 1× worse, same: rounds to 1×.

Counting a measure only where every run agrees, against TLS 1.3 full: TLS 1.2 is better on 3 (up to 1.3× on server CPU, OpenSSL), worse on 2 (down to 0.75× on first byte, 50 ms link, OpenSSL) and ties on 3; 1.3 PQ is never better: worse on 6 (down to 0.52× on bytes per connection, Go) and ties on 2; 1.3 resumed is better on 6 (up to 2.6× on client CPU, OpenSSL) and ties on 2; 1.3 0-RTT is better on all of its 4 (up to 2.6× on client CPU, OpenSSL). The sections below take each measure in turn, with each direction of the bytes, the ClientHello size, the LAN and the lossy link, the certificate chains and the runs behind every median.

Factor against the full TLS 1.3 handshake per measure, above 1 is better. Bytes per connection, Go: TLS 1.2 1.0×, 1.3 PQ 0.52×, 1.3 resumed 1.3×. First byte, 50 ms link, Go: TLS 1.2 0.75×, 1.3 PQ 1.00×, 1.3 resumed 1.0×. Server CPU, Go: TLS 1.2 1.0×, 1.3 PQ 0.63×, 1.3 resumed 1.2×. Client CPU, Go: TLS 1.2 1.0×, 1.3 PQ 0.70×, 1.3 resumed 2.0×. Bytes per connection, OpenSSL: TLS 1.2 1.2×, 1.3 PQ 0.58×, 1.3 resumed 1.4×, 1.3 0-RTT 1.7×. First byte, 50 ms link, OpenSSL: TLS 1.2 0.75×, 1.3 PQ 1.00×, 1.3 resumed 1.0×, 1.3 0-RTT 1.5×. Server CPU, OpenSSL: TLS 1.2 1.3×, 1.3 PQ 0.77×, 1.3 resumed 1.2×, 1.3 0-RTT 1.5×. Client CPU, OpenSSL: TLS 1.2 1.2×, 1.3 PQ 0.79×, 1.3 resumed 2.6×, 1.3 0-RTT 2.6×. Against TLS 1.3 full, 8 measures: TLS 1.2 better on 3 · 1.3 resumed on 6 · 1.3 0-RTT on all of its 4; never better: 1.3 PQ Medians of 5 process runs · log scale · above 1× is better than TLS 1.3 full TLS 1.2 1.3 PQ 1.3 resumed 1.3 0-RTT 0.5× 1× (parity) 2× 3× Bytes per connection, Go TLS 1.2 same 1.3 PQ 0.52× 1.3 resumed 1.3× 1.3 0-RTT Go has no 0-RTT First byte, 50 ms link, Go TLS 1.2 0.75× 1.3 PQ same 1.3 resumed same 1.3 0-RTT Go has no 0-RTT Server CPU, Go TLS 1.2 same 1.3 PQ 0.63× 1.3 resumed 1.2× 1.3 0-RTT Go has no 0-RTT Client CPU, Go TLS 1.2 same 1.3 PQ 0.70× 1.3 resumed 2.0× 1.3 0-RTT Go has no 0-RTT Bytes per connection, OpenSSL TLS 1.2 1.2× 1.3 PQ 0.58× 1.3 resumed 1.4× 1.3 0-RTT 1.7× First byte, 50 ms link, OpenSSL TLS 1.2 0.75× 1.3 PQ same 1.3 resumed same 1.3 0-RTT 1.5× Server CPU, OpenSSL TLS 1.2 1.3× 1.3 PQ 0.77× 1.3 resumed 1.2× 1.3 0-RTT 1.5× Client CPU, OpenSSL TLS 1.2 1.2× 1.3 PQ 0.79× 1.3 resumed 2.6× 1.3 0-RTT 2.6× ← TLS 1.3 full better the others better →
Each handshake's median against the full TLS 1.3 handshake's (X25519) on the same measure, log scale; above 1× it is better (fewer bytes, an earlier first byte or less CPU). Median of 5 process runs.
Factor against the full TLS 1.3 handshake per measure, above 1 is better. Bytes per connection, Go: TLS 1.2 1.0×, 1.3 PQ 0.52×, 1.3 resumed 1.3×. First byte, 50 ms link, Go: TLS 1.2 0.75×, 1.3 PQ 1.00×, 1.3 resumed 1.0×. Server CPU, Go: TLS 1.2 1.0×, 1.3 PQ 0.63×, 1.3 resumed 1.2×. Client CPU, Go: TLS 1.2 1.0×, 1.3 PQ 0.70×, 1.3 resumed 2.0×. Bytes per connection, OpenSSL: TLS 1.2 1.2×, 1.3 PQ 0.58×, 1.3 resumed 1.4×, 1.3 0-RTT 1.7×. First byte, 50 ms link, OpenSSL: TLS 1.2 0.75×, 1.3 PQ 1.00×, 1.3 resumed 1.0×, 1.3 0-RTT 1.5×. Server CPU, OpenSSL: TLS 1.2 1.3×, 1.3 PQ 0.77×, 1.3 resumed 1.2×, 1.3 0-RTT 1.5×. Client CPU, OpenSSL: TLS 1.2 1.2×, 1.3 PQ 0.79×, 1.3 resumed 2.6×, 1.3 0-RTT 2.6×. Against TLS 1.3 full, 8 measures: TLS 1.2 better on 3 · 1.3 resumed on 6 · 1.3 0-RTT on all of its 4; never better: 1.3 PQ Medians of 5 process runs · log scale · above 1× is better than TLS 1.3 full TLS 1.2 1.3 PQ 1.3 resumed 1.3 0-RTT 0.5× 1× (parity) 2× 3× Bytes per connection, Go TLS 1.2 same 1.3 PQ 0.52× 1.3 resumed 1.3× 1.3 0-RTT Go has no 0-RTT First byte, 50 ms link, Go TLS 1.2 0.75× 1.3 PQ same 1.3 resumed same 1.3 0-RTT Go has no 0-RTT Server CPU, Go TLS 1.2 same 1.3 PQ 0.63× 1.3 resumed 1.2× 1.3 0-RTT Go has no 0-RTT Client CPU, Go TLS 1.2 same 1.3 PQ 0.70× 1.3 resumed 2.0× 1.3 0-RTT Go has no 0-RTT Bytes per connection, OpenSSL TLS 1.2 1.2× 1.3 PQ 0.58× 1.3 resumed 1.4× 1.3 0-RTT 1.7× First byte, 50 ms link, OpenSSL TLS 1.2 0.75× 1.3 PQ same 1.3 resumed same 1.3 0-RTT 1.5× Server CPU, OpenSSL TLS 1.2 1.3× 1.3 PQ 0.77× 1.3 resumed 1.2× 1.3 0-RTT 1.5× Client CPU, OpenSSL TLS 1.2 1.2× 1.3 PQ 0.79× 1.3 resumed 2.6× 1.3 0-RTT 2.6× ← TLS 1.3 full better the others better →
Each handshake's median against the full TLS 1.3 handshake's (X25519) on the same measure, log scale; above 1× it is better (fewer bytes, an earlier first byte or less CPU). Median of 5 process runs.

Bytes on the wire

Start with what one new connection puts on the network, in each direction. Everything is counted: TCP’s handshake and teardown, TLS, the request and the response.

IP bytes per new connection, client to server and server to client, all headers included, LAN. TLS 1.2, ECDHE X25519: Go 871 up, 1726 down, OpenSSL 855 up, 1948 down. TLS 1.3 full, X25519: Go 842 up, 1801 down, OpenSSL 894 up, 2499 down. TLS 1.3 full, X25519MLKEM768: Go 2115 up, 2943 down, OpenSSL 2187 up, 3616 down. TLS 1.3 resumption (PSK): Go 994 up, 976 down, OpenSSL 1186 up, 1176 down. resumption, X25519MLKEM768: Go 2275 up, 2111 down, OpenSSL 2412 up, 2296 down. TLS 1.3 0-RTT: OpenSSL 1124 up, 843 down. 0-RTT, X25519MLKEM768: OpenSSL 2358 up, 1961 down. no TLS: TCP + HTTP only: Go 351 up, 405 down, OpenSSL 342 up, 434 down. The post-quantum key exchange adds 2.4 KB to every new connection, and resumption does not remove it Bytes per new connection, both directions, all headers · bar = up + down, darker part = client to server Go crypto/tls OpenSSL 3.5 light part: server to client TLS 1.2, ECDHE X25519 2.6 KB · ↑871 ↓1,726 · 16 pkts 2.8 KB · ↑855 ↓1,948 · 16 pkts TLS 1.3 full, X25519 2.6 KB · ↑842 ↓1,801 · 15 pkts 3.4 KB · ↑894 ↓2,499 · 18 pkts TLS 1.3 full, X25519MLKEM768 5.1 KB · ↑2,115 ↓2,943 · 17 pkts 5.8 KB · ↑2,187 ↓3,616 · 20 pkts TLS 1.3 resumption (PSK) 2.0 KB · ↑994 ↓976 · 15 pkts 2.4 KB · ↑1,186 ↓1,176 · 16 pkts resumption, X25519MLKEM768 4.4 KB · ↑2,275 ↓2,111 · 17 pkts 4.7 KB · ↑2,412 ↓2,296 · 17 pkts TLS 1.3 0-RTT Go: no 0-RTT 2.0 KB · ↑1,124 ↓843 · 14 pkts 0-RTT, X25519MLKEM768 Go: no 0-RTT 4.3 KB · ↑2,358 ↓1,961 · 15 pkts no TLS: TCP + HTTP only 0.8 KB · ↑351 ↓405 · 10 pkts 0.8 KB · ↑342 ↓434 · 10 pkts X25519MLKEM768 key shares: 1,273 B more up and 1,142 B more down (Go). Resumption skips the certificate, not the key exchange: a resumed connection with the post-quantum key share still costs 4.4 KB, more than a full X25519 handshake (2.6 KB).
One connection: TCP handshake, TLS handshake, one HTTP/1.1 GET with a 22-byte response, close (close_notify and FIN both ways). ECDSA P-256 certificate with one intermediate (831 B of certificates). Median of 5 process runs × 100 connections, from nftables counters on the server port; the runs agree within 23 B. Go's crypto/tls has no 0-RTT.
IP bytes per new connection, client to server and server to client, all headers included, LAN. TLS 1.2, ECDHE X25519: Go 871 up, 1726 down, OpenSSL 855 up, 1948 down. TLS 1.3 full, X25519: Go 842 up, 1801 down, OpenSSL 894 up, 2499 down. TLS 1.3 full, X25519MLKEM768: Go 2115 up, 2943 down, OpenSSL 2187 up, 3616 down. TLS 1.3 resumption (PSK): Go 994 up, 976 down, OpenSSL 1186 up, 1176 down. resumption, X25519MLKEM768: Go 2275 up, 2111 down, OpenSSL 2412 up, 2296 down. TLS 1.3 0-RTT: OpenSSL 1124 up, 843 down. 0-RTT, X25519MLKEM768: OpenSSL 2358 up, 1961 down. no TLS: TCP + HTTP only: Go 351 up, 405 down, OpenSSL 342 up, 434 down. The post-quantum key exchange adds 2.4 KB to every new connection, and resumption does not remove it Bytes per new connection, both directions, all headers · bar = up + down, darker part = client to server Go crypto/tls OpenSSL 3.5 light part: server to client TLS 1.2 2.6 KB 2.8 KB 1.3 full 2.6 KB 3.4 KB 1.3 full, PQ 5.1 KB 5.8 KB resumed 2.0 KB 2.4 KB resumed, PQ 4.4 KB 4.7 KB 0-RTT Go: no 0-RTT 2.0 KB 0-RTT, PQ Go: no 0-RTT 4.3 KB no TLS 0.8 KB 0.8 KB X25519MLKEM768 key shares: 1,273 B more up and 1,142 B more down (Go). Resumption skips the certificate, not the key exchange: a resumed connection with the post-quantum key share still costs 4.4 KB, more than a full X25519 handshake (2.6 KB).
One connection: TCP handshake, TLS handshake, one HTTP/1.1 GET with a 22-byte response, close (close_notify and FIN both ways). ECDSA P-256 certificate with one intermediate (831 B of certificates). Median of 5 process runs × 100 connections, from nftables counters on the server port; the runs agree within 23 B. Go's crypto/tls has no 0-RTT.

A full TLS 1.3 handshake with X25519 costs 2,642 B in Go and 3,393 B in OpenSSL, against 756 B for the same request with no TLS at all. Most of the difference flows from the server: its certificate chain, the signature over the handshake, and the session tickets it hands out for later. Here the stacks differ by policy, not protocol: OpenSSL sends 2 tickets after every full handshake and Go one, which is most of OpenSSL’s extra 698 B downstream.

Post-quantum key exchange is the biggest single item. X25519MLKEM768 adds 2,416 B per connection in Go (1,273 B up, 1,142 B down) and 2,411 B in OpenSSL: the two key shares (2,336 bytes together), a little TLS framing, and the headers of the extra packets they need. That agrees with the MQTT vs HTTPS benchmarks, where switching the key exchange off cut a new HTTPS connection from 4,722 bytes to about 2.2 KB, roughly 2.5 KB, also on Go (1.24 there, 1.25 here). The two measurements came from different harnesses, Go versions and requests, and land within about 0.1 KB of each other.

Resumption removes the certificate, not the key exchange. A resumed connection’s server flight drops to 976 B (Go), but the ClientHello grows by the ticket it carries, so with X25519 a resumption costs 1,970 B in all against 2,642 B for a full handshake. With the post-quantum key share it costs 4,386 B, more than a full X25519 handshake: TLS 1.3 resumption runs a fresh key exchange so that every connection gets new keys, and the post-quantum share comes with it.

The post-quantum ClientHello takes two packets

A ClientHello used to fit comfortably in one packet. With a 1,216-byte key share it no longer does:

ClientHello size against one TCP segment (1448 B at MTU 1500, 1228 B at MTU 1280). Go: full, X25519 255 B, full, X25519MLKEM768 1483 B, resumed 417 B, resumed, PQ 1645 B. OpenSSL: full, X25519 243 B, full, X25519MLKEM768 1477 B, resumed 546 B, resumed, PQ 1780 B, 0-RTT 550 B, 0-RTT, PQ 1784 B. Every post-quantum ClientHello is larger than one 1,448-byte segment, so it always takes two packets ClientHello record size · dashed lines: the data one TCP segment carries at a 1,500 and a 1,280-byte MTU Go crypto/tls OpenSSL 3.5 full, X25519 255 B · 1 pkt 243 B · 1 pkt full, X25519MLKEM768 1,483 B · 2 pkts 1,477 B · 2 pkts resumed 417 B · 1 pkt 546 B · 1 pkt resumed, PQ 1,645 B · 2 pkts 1,780 B · 2 pkts 0-RTT 550 B · 1 pkt 0-RTT, PQ 1,784 B · 2 pkts 1,448 B · MTU 1,500 1,228 B · MTU 1,280 The post-quantum ClientHello is 1,228 B larger in Go and 1,234 B in OpenSSL; the X25519MLKEM768 share alone is 1,216 of those bytes. A second packet costs no extra round trip (TCP may send 10 segments before its first acknowledgement), but it is one more packet that a middlebox expecting a one-packet ClientHello can drop.
Size of the TLS record carrying the ClientHello (record header included), first connection of each run. A TCP segment carries at most 1,448 bytes of data at a 1,500-byte MTU (20 B IPv4 + 32 B TCP with timestamps), 1,228 at 1,280. 0-RTT: the early-data request travels in a separate record behind it. Resumed and 0-RTT ClientHellos carry the session ticket.
ClientHello size against one TCP segment (1448 B at MTU 1500, 1228 B at MTU 1280). Go: full, X25519 255 B, full, X25519MLKEM768 1483 B, resumed 417 B, resumed, PQ 1645 B. OpenSSL: full, X25519 243 B, full, X25519MLKEM768 1477 B, resumed 546 B, resumed, PQ 1780 B, 0-RTT 550 B, 0-RTT, PQ 1784 B. Every post-quantum ClientHello is larger than one 1,448-byte segment, so it always takes two packets ClientHello record size · dashed lines: the data one TCP segment carries at a 1,500 and a 1,280-byte MTU Go crypto/tls OpenSSL 3.5 full, X25519 255 B · 1 pkt 243 B · 1 pkt full, PQ 1,483 B · 2 pkts 1,477 B · 2 pkts resumed 417 B · 1 pkt 546 B · 1 pkt resumed, PQ 1,645 B · 2 pkts 1,780 B · 2 pkts 0-RTT 550 B · 1 pkt 0-RTT, PQ 1,784 B · 2 pkts 1,448 B · MTU 1,500 1,228 B · MTU 1,280 The post-quantum ClientHello is 1,228 B larger in Go and 1,234 B in OpenSSL; the X25519MLKEM768 share alone is 1,216 of those bytes. A second packet costs no extra round trip (TCP may send 10 segments before its first acknowledgement), but it is one more packet that a middlebox expecting a one-packet ClientHello can drop.
Size of the TLS record carrying the ClientHello (record header included), first connection of each run. A TCP segment carries at most 1,448 bytes of data at a 1,500-byte MTU (20 B IPv4 + 32 B TCP with timestamps), 1,228 at 1,280. 0-RTT: the early-data request travels in a separate record behind it. Resumed and 0-RTT ClientHellos carry the session ticket.

At a 1,500-byte MTU one TCP segment carries 1,448 bytes of data; Go’s post-quantum ClientHello is 1,483 B and OpenSSL’s 1,477 B, so TCP splits it in two. Resumed and 0-RTT ClientHellos are larger still, because they also carry the ticket. A smaller path MTU, such as IPv6’s minimum of 1,280 bytes, changes nothing for these sizes: still two packets.

Key exchangeStackClientHelloSegments at MTU 1,500Segments at MTU 1,280Up bytes, MTU 1,500Up bytes, MTU 1,280
X25519Go255 B1 (1,448 B each)1 (1,228 B each)842824
X25519OpenSSL243 B1 (1,448 B each)1 (1,228 B each)894961
X25519MLKEM768Go1,483 B2 (1,448 B each)2 (1,228 B each)2,1152,114
X25519MLKEM768OpenSSL1,477 B2 (1,448 B each)2 (1,228 B each)2,1872,191

The segment counts follow from the ClientHello’s size and the connection’s measured segment size; a connection’s total packet count also depends on how acknowledgements happen to combine, so it moves by a packet either way between runs. The second packet does not cost a round trip. TCP may send ten segments before it waits for an acknowledgement, so both halves leave together, and the time-to-first-byte figures below show post-quantum handshakes taking exactly as many round trips as X25519. What it costs is robustness on old networks: a middlebox that expects the whole ClientHello in the first packet, to read the server name from it, sees half of one. That is why browsers that turned the hybrid key exchange on in 2024 hit broken firewalls; neither stack here works around it, and on loopback nothing is in the way.

Round trips and time to first byte

On a slow link, time is counted in round trips, and the TLS version decides how many:

Time from connect() to the first byte of the HTTP response, median. LAN, no added delay: Go TLS 1.2 310 µs, OpenSSL TLS 1.2 400 µs, Go 1.3 full 316 µs, OpenSSL 1.3 full 457 µs, Go 1.3 full, PQ 471 µs, OpenSSL 1.3 full, PQ 590 µs, Go resumed 181 µs, OpenSSL resumed 220 µs, Go resumed, PQ 340 µs, OpenSSL resumed, PQ 346 µs, OpenSSL 0-RTT 212 µs, OpenSSL 0-RTT, PQ 339 µs, Go no TLS 22 µs, OpenSSL no TLS 12 µs. 50 ms round trip: Go TLS 1.2 201 ms, OpenSSL TLS 1.2 203 ms, Go 1.3 full 152 ms, OpenSSL 1.3 full 153 ms, Go 1.3 full, PQ 152 ms, OpenSSL 1.3 full, PQ 153 ms, Go resumed 152 ms, OpenSSL resumed 152 ms, Go resumed, PQ 152 ms, OpenSSL resumed, PQ 152 ms, OpenSSL 0-RTT 101 ms, OpenSSL 0-RTT, PQ 101 ms, Go no TLS 101 ms, OpenSSL no TLS 100 ms. 200 ms round trip, 1 % loss: Go TLS 1.2 802 ms, OpenSSL TLS 1.2 802 ms, Go 1.3 full 602 ms, OpenSSL 1.3 full 603 ms, Go 1.3 full, PQ 602 ms, OpenSSL 1.3 full, PQ 603 ms, Go resumed 602 ms, OpenSSL resumed 602 ms, Go resumed, PQ 602 ms, OpenSSL resumed, PQ 603 ms, OpenSSL 0-RTT 402 ms, OpenSSL 0-RTT, PQ 402 ms, Go no TLS 401 ms, OpenSSL no TLS 400 ms. Round trips set the time: TLS 1.2 waits 4 before the first byte, TLS 1.3 3, 0-RTT 2; the post-quantum key exchange and resumption change nothing: still 3 Time from connect() to the first response byte, TCP handshake included · each link has its own scale · dashed lines: whole round trips · grey line: lowest to highest run Go crypto/tls OpenSSL 3.5 LAN, no added delay TLS 1.2 310 µs 400 µs 1.3 full 316 µs 457 µs 1.3 full, PQ 471 µs 590 µs resumed 181 µs 220 µs resumed, PQ 340 µs 346 µs 0-RTT 212 µs 0-RTT, PQ 339 µs no TLS 22 µs 12 µs 50 ms round trip 1 2 3 4 round trips TLS 1.2 201 ms 203 ms 1.3 full 152 ms 153 ms 1.3 full, PQ 152 ms 153 ms resumed 152 ms 152 ms resumed, PQ 152 ms 152 ms 0-RTT 101 ms 0-RTT, PQ 101 ms no TLS 101 ms 100 ms 200 ms round trip, 1 % loss 1 2 3 4 round trips TLS 1.2 802 ms 802 ms 1.3 full 602 ms 603 ms 1.3 full, PQ 602 ms 603 ms resumed 602 ms 602 ms resumed, PQ 602 ms 603 ms 0-RTT 402 ms 0-RTT, PQ 402 ms no TLS 401 ms 400 ms On the 50 ms link: 201 ms for TLS 1.2, 152 ms for TLS 1.3, 101 ms for 0-RTT, 101 ms without TLS. On the LAN the handshake's CPU time is the cost instead.
New connection each time, one GET, until the first response byte arrives. Median of 5 process runs × 100 connections (LAN) or × 20 (slow links); grey line: lowest to highest run median. On the lossy link 96 of the 1,400 connections (7 %) waited for a retransmission, 200 ms to 2,030 ms over their run's median; the medians do not see them, and 20 connections a run are too few to order the handshakes by them.
Time from connect() to the first byte of the HTTP response, median. LAN, no added delay: Go TLS 1.2 310 µs, OpenSSL TLS 1.2 400 µs, Go 1.3 full 316 µs, OpenSSL 1.3 full 457 µs, Go 1.3 full, PQ 471 µs, OpenSSL 1.3 full, PQ 590 µs, Go resumed 181 µs, OpenSSL resumed 220 µs, Go resumed, PQ 340 µs, OpenSSL resumed, PQ 346 µs, OpenSSL 0-RTT 212 µs, OpenSSL 0-RTT, PQ 339 µs, Go no TLS 22 µs, OpenSSL no TLS 12 µs. 50 ms round trip: Go TLS 1.2 201 ms, OpenSSL TLS 1.2 203 ms, Go 1.3 full 152 ms, OpenSSL 1.3 full 153 ms, Go 1.3 full, PQ 152 ms, OpenSSL 1.3 full, PQ 153 ms, Go resumed 152 ms, OpenSSL resumed 152 ms, Go resumed, PQ 152 ms, OpenSSL resumed, PQ 152 ms, OpenSSL 0-RTT 101 ms, OpenSSL 0-RTT, PQ 101 ms, Go no TLS 101 ms, OpenSSL no TLS 100 ms. 200 ms round trip, 1 % loss: Go TLS 1.2 802 ms, OpenSSL TLS 1.2 802 ms, Go 1.3 full 602 ms, OpenSSL 1.3 full 603 ms, Go 1.3 full, PQ 602 ms, OpenSSL 1.3 full, PQ 603 ms, Go resumed 602 ms, OpenSSL resumed 602 ms, Go resumed, PQ 602 ms, OpenSSL resumed, PQ 603 ms, OpenSSL 0-RTT 402 ms, OpenSSL 0-RTT, PQ 402 ms, Go no TLS 401 ms, OpenSSL no TLS 400 ms. Round trips set the time: TLS 1.2 waits 4 before the first byte, TLS 1.3 3, 0-RTT 2; the post-quantum key exchange and resumption change nothing: still 3 Time from connect() to the first response byte, TCP handshake included · each link has its own scale · dashed lines: whole round trips · grey line: lowest to highest run Go crypto/tls OpenSSL 3.5 LAN, no added delay TLS 1.2 310 µs 400 µs 1.3 full 316 µs 457 µs 1.3 full, PQ 471 µs 590 µs resumed 181 µs 220 µs resumed, PQ 340 µs 346 µs 0-RTT 212 µs 0-RTT, PQ 339 µs no TLS 22 µs 12 µs 50 ms round trip 1 2 3 4 round trips TLS 1.2 201 ms 203 ms 1.3 full 152 ms 153 ms 1.3 full, PQ 152 ms 153 ms resumed 152 ms 152 ms resumed, PQ 152 ms 152 ms 0-RTT 101 ms 0-RTT, PQ 101 ms no TLS 101 ms 100 ms 200 ms round trip, 1 % loss 1 2 3 4 round trips TLS 1.2 802 ms 802 ms 1.3 full 602 ms 603 ms 1.3 full, PQ 602 ms 603 ms resumed 602 ms 602 ms resumed, PQ 602 ms 603 ms 0-RTT 402 ms 0-RTT, PQ 402 ms no TLS 401 ms 400 ms On the 50 ms link: 201 ms for TLS 1.2, 152 ms for TLS 1.3, 101 ms for 0-RTT, 101 ms without TLS. On the LAN the handshake's CPU time is the cost instead.
New connection each time, one GET, until the first response byte arrives. Median of 5 process runs × 100 connections (LAN) or × 20 (slow links); grey line: lowest to highest run median. On the lossy link 96 of the 1,400 connections (7 %) waited for a retransmission, 200 ms to 2,030 ms over their run's median; the medians do not see them, and 20 connections a run are too few to order the handshakes by them.

Before the first byte of the response arrives, TLS 1.2 needs four round trips (TCP, two for its handshake, the request) and TLS 1.3 three: 201 ms against 152 ms on the 50 ms link (Go; OpenSSL 203 ms and 153 ms). Resumption saves CPU and bytes, but no time: it still waits for the server’s reply before sending the request, 152 ms. Only 0-RTT removes a round trip: the request rides in the first flight, and the response comes back with the server’s handshake, 101 ms, the same two round trips as plain TCP with no TLS (100 ms). The post-quantum key exchange adds no round trip anywhere.

On the lossy link a lost packet costs a retransmission wait: 96 of the 1,400 connections there (7 %) finished 200 ms to 2,030 ms later than their run’s median. The medians above do not see them, and with 20 connections a run which handshake drew the most losses changed from run to run, so the handshakes are not ranked by their slow tail. With 1 % loss each way, 3 of the 1,400 connections on that link failed to complete: 3 × OpenSSL 0-RTT, X25519; a failed connection counts as a loss and is left out of the times. Every failure, here and in development runs, was a 0-RTT connection that the OpenSSL client saw end in a broken pipe (EPIPE) while it was still finishing the handshake; its request had gone out as early data, and no response reached it.

On the LAN, round trips cost microseconds and the handshake’s CPU time is the cost instead: 316 µs to the first byte for a full TLS 1.3 handshake in Go, 471 µs with the post-quantum key exchange, 22 µs without TLS.

Server CPU per handshake

How many new connections can one server core take? Each connection here is a whole one: TCP accept, handshake, request, response, close. The first rows are the handshake types with the P-256 certificate; the last three swap the certificate.

Server CPU per connection on one core, and connections per second. TLS 1.2, ECDHE X25519: Go 103 µs, 9713/s, OpenSSL 113 µs, 8807/s. TLS 1.3 full, X25519: Go 105 µs, 9481/s, OpenSSL 147 µs, 6816/s. TLS 1.3 full, X25519MLKEM768: Go 167 µs, 6001/s, OpenSSL 189 µs, 5280/s. TLS 1.3 resumption (PSK): Go 91 µs, 11037/s, OpenSSL 123 µs, 8154/s. resumption, X25519MLKEM768: Go 152 µs, 6576/s, OpenSSL 161 µs, 6222/s. TLS 1.3 0-RTT: OpenSSL 101 µs, 9937/s. 0-RTT, X25519MLKEM768: OpenSSL 139 µs, 7185/s. no TLS: TCP + HTTP only: Go 12 µs, 82093/s, OpenSSL 6 µs, 154807/s. ECDSA P-256, 2 intermediates: Go 108 µs, 9267/s, OpenSSL 151 µs, 6629/s. RSA-2048, 1 intermediate: Go 674 µs, 1483/s, OpenSSL 311 µs, 3220/s. RSA-4096, 1 intermediate: Go 3934 µs, 254/s, OpenSSL 1209 µs, 827/s. Server CPU per connection: the certificate's key matters more than the TLS version; RSA-4096 costs 37× ECDSA P-256 in Go and 8× in OpenSSL Server CPU per connection on one core · label: µs and connections per second · each panel has its own scale · grey line: lowest to highest run Go crypto/tls OpenSSL 3.5 Handshake type, ECDSA P-256 certificate TLS 1.2, ECDHE X25519 103 µs · 9,713/s 113 µs · 8,807/s TLS 1.3 full, X25519 105 µs · 9,481/s 147 µs · 6,816/s TLS 1.3 full, X25519MLKEM768 167 µs · 6,001/s 189 µs · 5,280/s TLS 1.3 resumption (PSK) 91 µs · 11,037/s 123 µs · 8,154/s resumption, X25519MLKEM768 152 µs · 6,576/s 161 µs · 6,222/s TLS 1.3 0-RTT 101 µs · 9,937/s 0-RTT, X25519MLKEM768 139 µs · 7,185/s no TLS: TCP + HTTP only 12 µs · 82,093/s 6 µs · 154,807/s Certificate chain, full TLS 1.3 handshake ECDSA P-256, 1 intermediate 105 µs · 9,481/s 147 µs · 6,816/s ECDSA P-256, 2 intermediates 108 µs · 9,267/s 151 µs · 6,629/s RSA-2048, 1 intermediate 674 µs · 1,483/s 311 µs · 3,220/s RSA-4096, 1 intermediate 3,934 µs · 254/s 1,209 µs · 827/s Resumption cuts the server's work to 86 % of a full handshake (Go), 84 % (OpenSSL); the post-quantum key exchange adds +61 µs (Go), +43 µs (OpenSSL).
One server process on one pinned core (Go: GOMAXPROCS=1; nginx: one worker), 64 concurrent clients on other cores for 4 s after 1 s of warm-up; server CPU from its cgroup's usage counter (user + kernel) divided by completed connections. Every connection: TCP, TLS, one GET, close. The server core was at least 99 % busy in every run. Median of 5 runs, grey line: lowest to highest run. The certificate panel uses the full TLS 1.3 handshake with X25519.
Server CPU per connection on one core, and connections per second. TLS 1.2, ECDHE X25519: Go 103 µs, 9713/s, OpenSSL 113 µs, 8807/s. TLS 1.3 full, X25519: Go 105 µs, 9481/s, OpenSSL 147 µs, 6816/s. TLS 1.3 full, X25519MLKEM768: Go 167 µs, 6001/s, OpenSSL 189 µs, 5280/s. TLS 1.3 resumption (PSK): Go 91 µs, 11037/s, OpenSSL 123 µs, 8154/s. resumption, X25519MLKEM768: Go 152 µs, 6576/s, OpenSSL 161 µs, 6222/s. TLS 1.3 0-RTT: OpenSSL 101 µs, 9937/s. 0-RTT, X25519MLKEM768: OpenSSL 139 µs, 7185/s. no TLS: TCP + HTTP only: Go 12 µs, 82093/s, OpenSSL 6 µs, 154807/s. ECDSA P-256, 2 intermediates: Go 108 µs, 9267/s, OpenSSL 151 µs, 6629/s. RSA-2048, 1 intermediate: Go 674 µs, 1483/s, OpenSSL 311 µs, 3220/s. RSA-4096, 1 intermediate: Go 3934 µs, 254/s, OpenSSL 1209 µs, 827/s. Server CPU per connection: the certificate's key matters more than the TLS version; RSA-4096 costs 37× ECDSA P-256 in Go and 8× in OpenSSL Server CPU per connection on one core · label: µs and connections per second · each panel has its own scale · grey line: lowest to highest run Go crypto/tls OpenSSL 3.5 Handshake type, ECDSA P-256 certificate TLS 1.2 103 µs · 9,713/s 113 µs · 8,807/s 1.3 full 105 µs · 9,481/s 147 µs · 6,816/s 1.3 full, PQ 167 µs · 6,001/s 189 µs · 5,280/s resumed 91 µs · 11,037/s 123 µs · 8,154/s resumed, PQ 152 µs · 6,576/s 161 µs · 6,222/s 0-RTT 101 µs · 9,937/s 0-RTT, PQ 139 µs · 7,185/s no TLS 12 µs · 82,093/s 6 µs · 154,807/s Certificate chain, full TLS 1.3 handshake P-256, 1 int. 105 µs · 9,481/s 147 µs · 6,816/s P-256, 2 int. 108 µs · 9,267/s 151 µs · 6,629/s RSA-2048 674 µs · 1,483/s 311 µs · 3,220/s RSA-4096 3,934 µs · 254/s 1,209 µs · 827/s Resumption cuts the server's work to 86 % of a full handshake (Go), 84 % (OpenSSL); the post-quantum key exchange adds +61 µs (Go), +43 µs (OpenSSL).
One server process on one pinned core (Go: GOMAXPROCS=1; nginx: one worker), 64 concurrent clients on other cores for 4 s after 1 s of warm-up; server CPU from its cgroup's usage counter (user + kernel) divided by completed connections. Every connection: TCP, TLS, one GET, close. The server core was at least 99 % busy in every run. Median of 5 runs, grey line: lowest to highest run. The certificate panel uses the full TLS 1.3 handshake with X25519.

With an ECDSA certificate, one core of the Go server completed 9,481 full TLS 1.3 connections per second and nginx 6,816; without TLS the same cores did 82,093 and 154,807. TLS is most of the server’s work for a short connection: 89 % of the CPU per connection in Go, 96 % in nginx.

Client CPU per handshake

The client pays too, and it verifies the certificate chain on every full handshake, which a server never does:

Client CPU per connection, serial, one core. TLS 1.2, ECDHE X25519: Go 232 µs, OpenSSL 322 µs. TLS 1.3 full, X25519: Go 233 µs, OpenSSL 372 µs. TLS 1.3 full, X25519MLKEM768: Go 332 µs, OpenSSL 472 µs. TLS 1.3 resumption (PSK): Go 114 µs, OpenSSL 141 µs. resumption, X25519MLKEM768: Go 216 µs, OpenSSL 232 µs. TLS 1.3 0-RTT: OpenSSL 143 µs. 0-RTT, X25519MLKEM768: OpenSSL 235 µs. no TLS: TCP + HTTP only: Go 23 µs, OpenSSL 17 µs. ECDSA P-256, 2 intermediates: Go 274 µs, OpenSSL 409 µs. RSA-2048, 1 intermediate: Go 177 µs, OpenSSL 276 µs. RSA-4096, 1 intermediate: Go 538 µs, OpenSSL 377 µs. A full TLS 1.3 handshake costs the client 233 µs of CPU in Go and 372 µs in OpenSSL; resumption 114 µs and 141 µs Client CPU per connection, certificate chain verified · one core · each panel has its own scale · grey line: lowest to highest run Go crypto/tls OpenSSL 3.5 Handshake type, ECDSA P-256 certificate TLS 1.2, ECDHE X25519 232 µs 322 µs TLS 1.3 full, X25519 233 µs 372 µs TLS 1.3 full, X25519MLKEM768 332 µs 472 µs TLS 1.3 resumption (PSK) 114 µs 141 µs resumption, X25519MLKEM768 216 µs 232 µs TLS 1.3 0-RTT 143 µs 0-RTT, X25519MLKEM768 235 µs no TLS: TCP + HTTP only 23 µs 17 µs Certificate chain, full TLS 1.3 handshake ECDSA P-256, 1 intermediate 233 µs 372 µs ECDSA P-256, 2 intermediates 274 µs 409 µs RSA-2048, 1 intermediate 177 µs 276 µs RSA-4096, 1 intermediate 538 µs 377 µs The same connection without TLS: 23 µs (Go) and 17 µs (OpenSSL). With an RSA-4096 certificate the client pays 538 µs and 377 µs.
One client process on one core, 100 connections one after another on the LAN, its own user + kernel CPU time divided by the connections; certificate chain verified against the root on every full handshake. Median of 5 process runs, grey line: lowest to highest run. The certificate panel uses the full TLS 1.3 handshake with X25519.
Client CPU per connection, serial, one core. TLS 1.2, ECDHE X25519: Go 232 µs, OpenSSL 322 µs. TLS 1.3 full, X25519: Go 233 µs, OpenSSL 372 µs. TLS 1.3 full, X25519MLKEM768: Go 332 µs, OpenSSL 472 µs. TLS 1.3 resumption (PSK): Go 114 µs, OpenSSL 141 µs. resumption, X25519MLKEM768: Go 216 µs, OpenSSL 232 µs. TLS 1.3 0-RTT: OpenSSL 143 µs. 0-RTT, X25519MLKEM768: OpenSSL 235 µs. no TLS: TCP + HTTP only: Go 23 µs, OpenSSL 17 µs. ECDSA P-256, 2 intermediates: Go 274 µs, OpenSSL 409 µs. RSA-2048, 1 intermediate: Go 177 µs, OpenSSL 276 µs. RSA-4096, 1 intermediate: Go 538 µs, OpenSSL 377 µs. A full TLS 1.3 handshake costs the client 233 µs of CPU in Go and 372 µs in OpenSSL; resumption 114 µs and 141 µs Client CPU per connection, certificate chain verified · one core · each panel has its own scale · grey line: lowest to highest run Go crypto/tls OpenSSL 3.5 Handshake type, ECDSA P-256 certificate TLS 1.2 232 µs 322 µs 1.3 full 233 µs 372 µs 1.3 full, PQ 332 µs 472 µs resumed 114 µs 141 µs resumed, PQ 216 µs 232 µs 0-RTT 143 µs 0-RTT, PQ 235 µs no TLS 23 µs 17 µs Certificate chain, full TLS 1.3 handshake P-256, 1 int. 233 µs 372 µs P-256, 2 int. 274 µs 409 µs RSA-2048 177 µs 276 µs RSA-4096 538 µs 377 µs The same connection without TLS: 23 µs (Go) and 17 µs (OpenSSL). With an RSA-4096 certificate the client pays 538 µs and 377 µs.
One client process on one core, 100 connections one after another on the LAN, its own user + kernel CPU time divided by the connections; certificate chain verified against the root on every full handshake. Median of 5 process runs, grey line: lowest to highest run. The certificate panel uses the full TLS 1.3 handshake with X25519.

A full TLS 1.3 handshake with the P-256 chain cost the client 233 µs in Go, where the server spent 105 µs per connection, and 372 µs in OpenSSL against nginx’s 147 µs. The client checks three signatures on every full handshake (the root’s over the intermediate, the intermediate’s over the server certificate, and the server’s over the handshake), while the server makes one. With RSA chains the client paid 177 µs (RSA-2048) and 538 µs (RSA-4096) in Go, 276 µs and 377 µs in OpenSSL. Resumption skips the certificate entirely: 114 µs in Go, 141 µs in OpenSSL. The post-quantum key exchange added 99 µs (Go) and 100 µs (OpenSSL) to the client.

Certificate choice

The chain is sent on every full handshake, and its key decides the signing cost:

Certificate chainCertificates sentStackDown: bytes · packetsFirst byte, LANServer CPU · conn./sClient CPU
ECDSA P-256, 1 intermediate831 BGo1,801 · 8316 µs (315 µs–343 µs)105 (105–106) µs · 9,481233 (233–252) µs
ECDSA P-256, 1 intermediate831 BOpenSSL2,499 · 9457 µs (434 µs–473 µs)147 (145–147) µs · 6,816372 (356–387) µs
ECDSA P-256, 2 intermediates1,247 BGo2,223 · 8359 µs (358 µs–386 µs)108 (108–108) µs · 9,267274 (274–293) µs
ECDSA P-256, 2 intermediates1,247 BOpenSSL2,919 · 9493 µs (492 µs–520 µs)151 (149–152) µs · 6,629409 (409–433) µs
RSA-2048, 1 intermediate1,623 BGo2,777 · 8834 µs (833 µs–859 µs)674 (674–675) µs · 1,483177 (176–182) µs
RSA-2048, 1 intermediate1,623 BOpenSSL3,477 · 9518 µs (516 µs–549 µs)311 (310–316) µs · 3,220276 (273–294) µs
RSA-4096, 1 intermediate2,646 BGo4,045 · 74.44 ms (4.42 ms–4.60 ms)3,934 (3,777–3,956) µs · 254538 (536–555) µs
RSA-4096, 1 intermediate2,646 BOpenSSL4,755 · 91.50 ms (1.49 ms–1.50 ms)1,209 (1,207–1,220) µs · 827377 (374–381) µs

A second intermediate adds 416 B of certificate and 422 B on the wire (Go), and one more signature for the client to verify. RSA-4096 sends 2,244 B more than ECDSA P-256 per connection and is by far the most expensive for the server. None of the chains costs a round trip: the largest server flight, 4,755 B with RSA-4096 on OpenSSL, is well inside the ten segments TCP may send before waiting. On the 50 ms link an RSA-4096 connection took 157 ms (Go) and 153 ms (OpenSSL) to the first byte, the same three round trips as P-256. A chain long enough to pass about 14 KB would need a fourth.

What 0-RTT asks in return

0-RTT is the only handshake here that is faster on a slow link, and it comes with conditions that showed up while building this benchmark:

All the numbers

All rows use the P-256 certificate; first-byte times and CPU per connection are medians of the run values, min–max across runs in brackets.

HandshakeStackUp: bytes · packetsDown: bytes · packetsFirst byte, LAN50 ms200 ms + 1 % lossServer CPU · conn./sClient CPU
TLS 1.2, ECDHE X25519Go871 · 81,726 · 8310 µs (309 µs–332 µs)201 ms (201 ms–203 ms)802 ms (802 ms–802 ms)103 (102–104) µs · 9,713232 (231–249) µs
TLS 1.2, ECDHE X25519OpenSSL855 · 81,948 · 8400 µs (397 µs–436 µs)203 ms (201 ms–203 ms)802 ms (802 ms–803 ms)113 (113–114) µs · 8,807322 (320–352) µs
TLS 1.3 full, X25519Go842 · 81,801 · 8316 µs (315 µs–343 µs)152 ms (151 ms–152 ms)602 ms (601 ms–602 ms)105 (105–106) µs · 9,481233 (233–252) µs
TLS 1.3 full, X25519OpenSSL894 · 92,499 · 9457 µs (434 µs–473 µs)153 ms (152 ms–153 ms)603 ms (602 ms–603 ms)147 (145–147) µs · 6,816372 (356–387) µs
TLS 1.3 full, X25519MLKEM768Go2,115 · 82,943 · 9471 µs (468 µs–494 µs)152 ms (151 ms–153 ms)602 ms (602 ms–603 ms)167 (166–169) µs · 6,001332 (330–347) µs
TLS 1.3 full, X25519MLKEM768OpenSSL2,187 · 103,616 · 10590 µs (578 µs–603 µs)153 ms (152 ms–153 ms)603 ms (602 ms–604 ms)189 (188–190) µs · 5,280472 (457–476) µs
TLS 1.3 resumption (PSK)Go994 · 7976 · 8181 µs (180 µs–186 µs)152 ms (151 ms–152 ms)602 ms (601 ms–602 ms)91 (90–91) µs · 11,037114 (113–118) µs
TLS 1.3 resumption (PSK)OpenSSL1,186 · 81,176 · 8220 µs (216 µs–224 µs)152 ms (151 ms–152 ms)602 ms (602 ms–602 ms)123 (122–123) µs · 8,154141 (137–144) µs
resumption, X25519MLKEM768Go2,275 · 82,111 · 9340 µs (332 µs–347 µs)152 ms (151 ms–152 ms)602 ms (601 ms–602 ms)152 (152–152) µs · 6,576216 (211–222) µs
resumption, X25519MLKEM768OpenSSL2,412 · 82,296 · 9346 µs (345 µs–352 µs)152 ms (151 ms–153 ms)603 ms (602 ms–603 ms)161 (160–162) µs · 6,222232 (230–235) µs
TLS 1.3 0-RTTOpenSSL1,124 · 7843 · 7212 µs (204 µs–219 µs)101 ms (101 ms–102 ms)402 ms (401 ms–402 ms)101 (100–102) µs · 9,937143 (137–148) µs
0-RTT, X25519MLKEM768OpenSSL2,358 · 71,961 · 8339 µs (338 µs–346 µs)101 ms (101 ms–102 ms)402 ms (401 ms–402 ms)139 (138–140) µs · 7,185235 (233–240) µs
no TLS: TCP + HTTP onlyGo351 · 5405 · 522 µs (21 µs–23 µs)101 ms (100 ms–101 ms)401 ms (400 ms–401 ms)12 (12–12) µs · 82,09323 (23–24) µs
no TLS: TCP + HTTP onlyOpenSSL342 · 5434 · 512 µs (11 µs–12 µs)100 ms (100 ms–100 ms)400 ms (400 ms–401 ms)6 (6–6) µs · 154,80717 (17–18) µs

What this does not show

What the numbers say

Reproduce it

The harness is a Go program (the Go client and server, and the driver for both stacks), a C client for libssl, an nginx configuration and a driver script. It builds one image, starts both servers in the client’s network namespace and runs every cell as a fresh client process:

./certs.sh                    # throwaway PKI: the four chains and the roots the clients trust
docker build -t tlsb .        # Go 1.25 + OpenSSL 3.5 client, nginx 1.26, nftables
./up.sh 4-7 2                 # client cores, server core
docker exec tb-net tc qdisc replace dev lo root netem delay 25ms limit 100000   # the 50 ms link
docker exec tb-net tb run -stack openssl -addr 127.0.0.1:9443 -mode zrtt -kx pq -n 20 -link l50

Each run prints one JSON line with every connection’s timings, the bytes and packets counted each way, the client’s CPU time, the ClientHello size and the checks: responses verified, connections resumed, early data accepted, and the key exchange that was negotiated.

Questions? Let's Chat :)

protocols