{"id":29370,"date":"2025-07-09T09:01:51","date_gmt":"2025-07-09T07:01:51","guid":{"rendered":"https:\/\/tremhost.com\/blog\/?p=29370"},"modified":"2026-11-05T18:03:53","modified_gmt":"2026-11-05T16:03:53","slug":"benchmark-post-quantum-tls","status":"publish","type":"post","link":"https:\/\/tremhost.com\/blog\/benchmark-post-quantum-tls\/","title":{"rendered":"How to Benchmark Post-Quantum TLS Performance"},"content":{"rendered":"<p>To benchmark post-quantum TLS, compare a classical key exchange (such as X25519) with a hybrid one (such as X25519 combined with ML-KEM-768) on the same server, client and network, and measure handshake time, handshake size, server CPU per handshake and throughput after the connection is set up. The extra cost of post-quantum key exchange sits almost entirely in the handshake, because the keys and ciphertexts are larger; bulk data is still encrypted with the same symmetric ciphers. This guide explains what changes, what to measure and how to run a fair test on your own infrastructure.<\/p>\n<h2>What changes when TLS goes post-quantum<\/h2>\n<p>In August 2024, NIST published <a href=\"https:\/\/csrc.nist.gov\/pubs\/fips\/203\/final\" rel=\"nofollow noopener\" target=\"_blank\">FIPS 203<\/a>, the Module-Lattice-Based Key-Encapsulation Mechanism (ML-KEM). NIST describes it as the primary standard for general encryption, and it is based on the algorithm previously called CRYSTALS-Kyber. FIPS 203 defines three parameter sets: ML-KEM-512, ML-KEM-768 and ML-KEM-1024, in increasing order of security strength.<\/p>\n<p>In TLS 1.3, the most common deployment is a <strong>hybrid key exchange<\/strong>: the client and server combine a classical elliptic-curve exchange with ML-KEM, so the connection stays secure as long as either one holds. The practical differences are:<\/p>\n<ul>\n<li><strong>Bigger messages:<\/strong> an X25519 public key is 32 bytes. Under FIPS 203, an ML-KEM-768 encapsulation key is 1,184 bytes and its ciphertext 1,088 bytes. The client&#8217;s first message (ClientHello) and the server&#8217;s reply grow by roughly a kilobyte each.<\/li>\n<li><strong>Extra computation:<\/strong> both sides do the classical and the post-quantum operations.<\/li>\n<li><strong>Unchanged bulk encryption:<\/strong> once the handshake completes, data is protected with symmetric ciphers such as AES-GCM or ChaCha20-Poly1305, exactly as before.<\/li>\n<\/ul>\n<p>Certificates and signatures are a separate migration. Most current deployments change the key exchange first and keep classical certificates.<\/p>\n<h2>Define the question first<\/h2>\n<p>Decide what you need to know before you measure anything. Typical questions are:<\/p>\n<ul>\n<li>How much longer does a new connection take for our users on their real network paths?<\/li>\n<li>How many more servers or cores do we need at peak connection rates?<\/li>\n<li>Do any clients, proxies or firewalls on our paths fail with the larger handshake?<\/li>\n<\/ul>\n<p>Each question needs a different test. Latency questions need realistic network paths; capacity questions need load tests close to the server.<\/p>\n<h2>Set up a fair test environment<\/h2>\n<ul>\n<li><strong>One variable at a time.<\/strong> Use the same server, client, software build, certificate and network path for both configurations. Change only the key-exchange group.<\/li>\n<li><strong>Record versions.<\/strong> Note the operating system, TLS library and version, web server and version, and CPU model. Results are not comparable across builds.<\/li>\n<li><strong>Choose a capable library.<\/strong> OpenSSL 3.5 and later include ML-KEM; older versions need the Open Quantum Safe provider. Confirm which groups your build offers before testing.<\/li>\n<li><strong>Use realistic paths.<\/strong> For latency, run clients from where your users are, for example from an office network in Harare to a server in Johannesburg. A test on the same machine hides network effects.<\/li>\n<li><strong>Isolate the server.<\/strong> Run load tests on a server with dedicated CPU cores and nothing else running, so neighbouring workloads do not distort CPU figures.<\/li>\n<\/ul>\n<h2>What to measure<\/h2>\n<h3>Handshake latency<\/h3>\n<p>Measure the time from starting the connection to completing the TLS handshake, separately from time to first byte, which also includes application work. With curl, the <strong>time_appconnect<\/strong> value reports when the TLS handshake finished. Take many samples, alternate between configurations, and report the median and 95th percentile rather than a single average.<\/p>\n<h3>Handshake size<\/h3>\n<p>Capture packets with tcpdump or Wireshark and record the size of the ClientHello and the server&#8217;s first flight. Note whether the ClientHello now spans more than one TCP segment, since this is where some middleboxes misbehave.<\/p>\n<h3>Server CPU per handshake<\/h3>\n<p>Generate a steady rate of new connections with a load tool such as h2load, with connection reuse disabled, and record CPU use at fixed connection rates. Then find the rate at which each configuration saturates the CPU.<\/p>\n<h3>Throughput after the handshake<\/h3>\n<p>Download a large file over an established connection in both configurations. You should expect no meaningful difference; if you see one, look for another variable that changed.<\/p>\n<h3>Failure rate<\/h3>\n<p>Count handshake failures and fallbacks to classical key exchange, especially from older clients and corporate networks.<\/p>\n<h2>Interpreting the results<\/h2>\n<ul>\n<li><strong>Latency is a per-connection cost.<\/strong> If your users make one connection and reuse it, the impact on page load is small. If your architecture opens many short connections, it adds up.<\/li>\n<li><strong>Reduce new handshakes.<\/strong> HTTP\/2 and HTTP\/3 connection reuse, keep-alive and TLS session resumption all reduce how often a full handshake happens.<\/li>\n<li><strong>Plan capacity at peak connection rate,<\/strong> not average traffic.<\/li>\n<li><strong>Edge termination helps.<\/strong> If a CDN or reverse proxy terminates TLS close to users, the larger handshake travels a shorter distance.<\/li>\n<\/ul>\n<h2>Reporting results honestly<\/h2>\n<p>Publish your environment, versions, sample sizes, percentiles and raw data, and state the limits of the test. A result from one path, one server size and one library build is evidence about that setup, not a universal figure.<\/p>\n<h2>Frequently asked questions<\/h2>\n<h3>Does post-quantum TLS slow down my whole website?<\/h3>\n<p>The extra work is in the handshake. Data transfer after the handshake uses the same symmetric encryption as before.<\/p>\n<h3>Do I need new SSL certificates for hybrid key exchange?<\/h3>\n<p>No. Hybrid key exchange works with existing certificates. Post-quantum signatures in certificates are a separate, later step. Tremhost supplies <a href=\"https:\/\/tremhost.com\/ssl\">SSL certificates<\/a> from DigiCert, Sectigo and others if you need paid certificates today.<\/p>\n<h3>Where can I run a test server near Southern African users?<\/h3>\n<p>A VPS in Johannesburg is usually the nearest major location for users in Zimbabwe and South Africa.<\/p>\n<h2>Next step<\/h2>\n<p>Tremhost <a href=\"https:\/\/tremhost.com\/vps\">KVM VPS plans<\/a> start at $15 a month with dedicated cores, NVMe storage and full root access, in Johannesburg, New York, Miami, Limburg or Roubaix, which makes them suitable for controlled TLS tests.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Post-quantum TLS mainly changes the handshake, with larger keys and more computation. Here is what changes and how to benchmark it fairly on your own infrastructure.<\/p>\n","protected":false},"author":979,"featured_media":29356,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[212,213,208],"tags":[],"class_list":["post-29370","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-reports","category-tremhost-labs","category-whitepapers"],"_links":{"self":[{"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/posts\/29370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/users\/979"}],"replies":[{"embeddable":true,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/comments?post=29370"}],"version-history":[{"count":2,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/posts\/29370\/revisions"}],"predecessor-version":[{"id":81159,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/posts\/29370\/revisions\/81159"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/media\/29356"}],"wp:attachment":[{"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/media?parent=29370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/categories?post=29370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/tags?post=29370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}