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:
TLS 1.2 with ECDHE: two round trips of handshake before the request can go.
TLS 1.3, full: one round trip; the server’s certificate travels encrypted in its first reply.
TLS 1.3 with X25519MLKEM768: the same handshake with a hybrid key exchange, classical X25519 plus ML-KEM-768, which is meant to stay secure against a future quantum computer. Its key shares are 1,216 bytes from the client and 1,120 from the server, against 32 each for X25519.
TLS 1.3 resumption (PSK): the client presents a session ticket from an earlier connection, and the server skips the certificate and its signature. A fresh key exchange still runs.
TLS 1.3 0-RTT: resumption, with the request sent as early data in the very first flight, before the handshake has finished.
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.
Setup
Details
Go stack
Go 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 stack
OpenSSL 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
Handshakes
TLS 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
Certificates
Throwaway 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 connection
TCP handshake, TLS handshake, GET /<run>-<seq>-<hash> over HTTP/1.1 with Connection: close, a 22-byte echo, close_notify and FIN both ways
Network
One 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
CPU
AMD 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
Method
Every 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
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.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.
Measure
TLS 1.2
TLS 1.3 full
1.3 PQ
1.3 resumed
1.3 0-RTT
Bytes per connection, Go
2,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, Go
201 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, Go
103 µ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, Go
232 µ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, OpenSSL
2,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, OpenSSL
203 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, OpenSSL
113 µ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, OpenSSL
322 µ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.
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.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.
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.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:
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.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 exchange
Stack
ClientHello
Segments at MTU 1,500
Segments at MTU 1,280
Up bytes, MTU 1,500
Up bytes, MTU 1,280
X25519
Go
255 B
1 (1,448 B each)
1 (1,228 B each)
842
824
X25519
OpenSSL
243 B
1 (1,448 B each)
1 (1,228 B each)
894
961
X25519MLKEM768
Go
1,483 B
2 (1,448 B each)
2 (1,228 B each)
2,115
2,114
X25519MLKEM768
OpenSSL
1,477 B
2 (1,448 B each)
2 (1,228 B each)
2,187
2,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:
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.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.
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.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.
TLS 1.2 against 1.3: 103 µs against 105 µs (Go), 113 µs against 147 µs (OpenSSL). Same key exchange, same signature; TLS 1.3 saves round trips, not CPU. nginx also issues two session tickets per TLS 1.3 connection, Go one.
Post-quantum adds 62 µs per connection in Go and 42 µs in OpenSSL, 6,001 and 5,280 connections per second.
Resumption saves the certificate signature: 91 µs (Go) and 123 µs (OpenSSL) per connection, 11,037 and 8,154 per second. 0-RTT costs nginx 101 µs.
The certificate’s key matters most. An RSA-2048 signature cost the Go server 674 µs per connection and nginx 311 µs; RSA-4096 cost 3,934 µs and 1,209 µs, down to 254 and 827 connections per second. Here the stacks part ways: at 4,096 bits Go’s server needed 3.3× the CPU of OpenSSL’s, while with ECDSA the two were within 40 % of each other. That is implementation, not protocol.
Client CPU per handshake
The client pays too, and it verifies the certificate chain on every full handshake, which a server never does:
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.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 chain
Certificates sent
Stack
Down: bytes · packets
First byte, LAN
Server CPU · conn./s
Client CPU
ECDSA P-256, 1 intermediate
831 B
Go
1,801 · 8
316 µs (315 µs–343 µs)
105 (105–106) µs · 9,481
233 (233–252) µs
ECDSA P-256, 1 intermediate
831 B
OpenSSL
2,499 · 9
457 µs (434 µs–473 µs)
147 (145–147) µs · 6,816
372 (356–387) µs
ECDSA P-256, 2 intermediates
1,247 B
Go
2,223 · 8
359 µs (358 µs–386 µs)
108 (108–108) µs · 9,267
274 (274–293) µs
ECDSA P-256, 2 intermediates
1,247 B
OpenSSL
2,919 · 9
493 µs (492 µs–520 µs)
151 (149–152) µs · 6,629
409 (409–433) µs
RSA-2048, 1 intermediate
1,623 B
Go
2,777 · 8
834 µs (833 µs–859 µs)
674 (674–675) µs · 1,483
177 (176–182) µs
RSA-2048, 1 intermediate
1,623 B
OpenSSL
3,477 · 9
518 µs (516 µs–549 µs)
311 (310–316) µs · 3,220
276 (273–294) µs
RSA-4096, 1 intermediate
2,646 B
Go
4,045 · 7
4.44 ms (4.42 ms–4.60 ms)
3,934 (3,777–3,956) µs · 254
538 (536–555) µs
RSA-4096, 1 intermediate
2,646 B
OpenSSL
4,755 · 9
1.50 ms (1.49 ms–1.50 ms)
1,209 (1,207–1,220) µs · 827
377 (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:
Replay. Early data is sent before the server has proven anything, under keys derived from the ticket alone. With nginx’s default stateless tickets, OpenSSL issued no new ticket on a connection that accepted early data, and accepted the same ticket’s early data again on every later connection: every 0-RTT connection in a cell reused one ticket, 500 of them on the LAN alone, all accepted. An attacker who records such a request can replay it. nginx’s documentation leaves it to the application to accept only requests that are safe to repeat (it can pass $ssl_early_data to the backend for that).
Client handling. An OpenSSL session object that has been used once refuses to send early data again (an internal error), so the client must keep a fresh copy of the ticket for every connection.
Support. Go’s crypto/tls does not implement 0-RTT at all, for either side.
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.
Handshake
Stack
Up: bytes · packets
Down: bytes · packets
First byte, LAN
50 ms
200 ms + 1 % loss
Server CPU · conn./s
Client CPU
TLS 1.2, ECDHE X25519
Go
871 · 8
1,726 · 8
310 µs (309 µs–332 µs)
201 ms (201 ms–203 ms)
802 ms (802 ms–802 ms)
103 (102–104) µs · 9,713
232 (231–249) µs
TLS 1.2, ECDHE X25519
OpenSSL
855 · 8
1,948 · 8
400 µs (397 µs–436 µs)
203 ms (201 ms–203 ms)
802 ms (802 ms–803 ms)
113 (113–114) µs · 8,807
322 (320–352) µs
TLS 1.3 full, X25519
Go
842 · 8
1,801 · 8
316 µs (315 µs–343 µs)
152 ms (151 ms–152 ms)
602 ms (601 ms–602 ms)
105 (105–106) µs · 9,481
233 (233–252) µs
TLS 1.3 full, X25519
OpenSSL
894 · 9
2,499 · 9
457 µs (434 µs–473 µs)
153 ms (152 ms–153 ms)
603 ms (602 ms–603 ms)
147 (145–147) µs · 6,816
372 (356–387) µs
TLS 1.3 full, X25519MLKEM768
Go
2,115 · 8
2,943 · 9
471 µs (468 µs–494 µs)
152 ms (151 ms–153 ms)
602 ms (602 ms–603 ms)
167 (166–169) µs · 6,001
332 (330–347) µs
TLS 1.3 full, X25519MLKEM768
OpenSSL
2,187 · 10
3,616 · 10
590 µs (578 µs–603 µs)
153 ms (152 ms–153 ms)
603 ms (602 ms–604 ms)
189 (188–190) µs · 5,280
472 (457–476) µs
TLS 1.3 resumption (PSK)
Go
994 · 7
976 · 8
181 µs (180 µs–186 µs)
152 ms (151 ms–152 ms)
602 ms (601 ms–602 ms)
91 (90–91) µs · 11,037
114 (113–118) µs
TLS 1.3 resumption (PSK)
OpenSSL
1,186 · 8
1,176 · 8
220 µs (216 µs–224 µs)
152 ms (151 ms–152 ms)
602 ms (602 ms–602 ms)
123 (122–123) µs · 8,154
141 (137–144) µs
resumption, X25519MLKEM768
Go
2,275 · 8
2,111 · 9
340 µs (332 µs–347 µs)
152 ms (151 ms–152 ms)
602 ms (601 ms–602 ms)
152 (152–152) µs · 6,576
216 (211–222) µs
resumption, X25519MLKEM768
OpenSSL
2,412 · 8
2,296 · 9
346 µs (345 µs–352 µs)
152 ms (151 ms–153 ms)
603 ms (602 ms–603 ms)
161 (160–162) µs · 6,222
232 (230–235) µs
TLS 1.3 0-RTT
OpenSSL
1,124 · 7
843 · 7
212 µs (204 µs–219 µs)
101 ms (101 ms–102 ms)
402 ms (401 ms–402 ms)
101 (100–102) µs · 9,937
143 (137–148) µs
0-RTT, X25519MLKEM768
OpenSSL
2,358 · 7
1,961 · 8
339 µs (338 µs–346 µs)
101 ms (101 ms–102 ms)
402 ms (401 ms–402 ms)
139 (138–140) µs · 7,185
235 (233–240) µs
no TLS: TCP + HTTP only
Go
351 · 5
405 · 5
22 µs (21 µs–23 µs)
101 ms (100 ms–101 ms)
401 ms (400 ms–401 ms)
12 (12–12) µs · 82,093
23 (23–24) µs
no TLS: TCP + HTTP only
OpenSSL
342 · 5
434 · 5
12 µs (11 µs–12 µs)
100 ms (100 ms–100 ms)
400 ms (400 ms–401 ms)
6 (6–6) µs · 154,807
17 (17–18) µs
What this does not show
Real networks. Loopback with netem has no middleboxes, so the two-packet post-quantum ClientHello met nothing that could mishandle it. Real loss also comes in bursts, which hurts handshakes with more round trips more.
Initial congestion window limits. Every server flight here fits in TCP’s initial window of ten segments. A chain with several large RSA certificates, or a server with a smaller window, can add a round trip that this test never hits.
Hardware and libraries. One CPU, two stacks. CPU numbers move with the CPU’s instructions for big-number and vector arithmetic, and other TLS libraries (BoringSSL, rustls, AWS-LC) differ, especially for RSA.
Busy servers. One server process on one core with 64 clients. Session-ticket key rotation, a shared session cache, and many cores sharing work are not measured.
TCP Fast Open and QUIC. Both can remove the TCP round trip; QUIC folds the transport and TLS handshakes into one round trip (two to the first response, as the HTTP/3 benchmarks measure). Neither is part of this test.
Client behaviour across connections. Browsers keep connections open and resume sessions; these numbers are per new connection, the worst case for whatever you do between them.
What the numbers say
On a slow link count round trips: TLS 1.2 takes 4 to the first byte, TLS 1.3 3, 0-RTT 2. Resumption and post-quantum change nothing about that.
The post-quantum key exchange costs about 2.4 KB per new connection on both stacks, consistent with the MQTT vs HTTPS measurement, and pushes the ClientHello into two packets. Resumption does not avoid it.
The certificate key is the biggest CPU lever: RSA-4096 cut one core’s connections per second to 3 % of ECDSA P-256 in Go, 12 % in OpenSSL. An extra intermediate costs bytes, not time.
Resumption skips the server’s signature and the client’s certificate checks: a resumed connection cost 86 % of a full handshake’s server CPU and 49 % of its client CPU in Go, and no fewer round trips.
0-RTT saves a round trip and gives up replay protection; with nginx’s defaults the same ticket worked again and again.
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 trustdocker build -t tlsb . # Go 1.25 + OpenSSL 3.5 client, nginx 1.26, nftables./up.sh 4-7 2 # client cores, server coredocker exec tb-net tc qdisc replace dev lo root netem delay 25ms limit 100000 # the 50 ms linkdocker 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.