Skip to content

ML-DSA certificates

Why private PKI first. Chrome isn’t adding post-quantum X.509 certificates to its root store. The public web is moving to Merkle Tree Certificates instead. ML-DSA X.509 matters where MTC doesn’t reach: internal mTLS, service-to-service authentication, private CAs, non-browser clients and embedded devices. Those are also the systems facing the 2031 signature deadline.

Every number pqdoctor prints says what it rests on:

Basis Meaning
observed Collected from a real endpoint
measured Reproduced with real certificates, real implementations and real handshakes (the lab)
projected Calculated from a model. Crossing a modelled budget may add a round trip; it isn’t an observed penalty
Terminal window
pqdoctor pki profiles
pqdoctor pki chainfit # every preset, server side
pqdoctor pki chainfit --mtls # both directions
pqdoctor pki chainfit --profile ml-dsa-87/ml-dsa-65/ml-dsa-44@7d
pqdoctor pki issue ./pki --profile mldsa44-flat --host api.internal

A profile is a hierarchy plus an algorithm per role, either flat (the root issues leaves; the server sends only the leaf) or two-level. Typical choices: ML-DSA-87 or -65 for a long-lived root, ML-DSA-44 for short-lived leaves. chainfit issues each hierarchy for real with pqdoctor’s CA, sizes the DER (measured), checks that the chain verifies, and runs the result through the budget model (projected). pki issue writes the same hierarchy for use:

  • root.pem to distribute;
  • root.key to keep offline;
  • issuing.pem and issuing.key;
  • chain.pem (leaf plus issuing CA, what a server sends) and leaf.key.
Terminal window
pqdoctor pki budget 16000 [--quic-client 2400]

How much fits in a server’s first flight is a range, not a constant:

  • TCP: the initial window times the MSS, reported for IW 4, 10 and 32 at MSS 1220, 1360 and 1460.
  • QUIC: three times what the client sent before address validation. That’s 1,200 bytes for one Initial, and more when a hybrid ML-KEM ClientHello takes two datagrams. The proxy measures that number from real clients.

The verdict wording is “fits”, “fits under some assumptions”, or “may add a round trip under this model”.

QUIC, observed. Each HTTP/3 listener of pqdoctor proxy counts what every client sent before the server’s first flight (/status → quicClientInitial). Chrome 157 and Edge 157 sent 2,500 bytes in two datagrams, because their X25519MLKEM768 ClientHello doesn’t fit one. That gives the server 7,500 bytes before address validation, more than twice the textbook 3,600.

TCP, measured from packets. pqdoctor pki iw HOST:PORT --hold-acks runs on Linux as root. It captures the server’s segments (AF_PACKET) while nftables drops the client’s pure ACKs, so the server sends exactly one initial window and then retransmits. The window is read from sequence numbers before the first retransmission. If the whole flight fits, it reports “at least N” and never invents a window.

Terminal window
pqdoctor pki waste example.com
pqdoctor pki waste --chain chain.pem --name api.internal --trust private-root.pem --trust mozilla

A certificate is called removable only after the chain is validated again without it against every trust store given (rustls’ WebPKI path building, any order). A cross-signed intermediate that a legacy store needs is reported as needed, naming the store that needs it. The detector also reports:

  • roots sent in the chain;
  • duplicate certificates;
  • an out-of-order chain (TLS 1.3 accepts it, some older clients don’t).
Terminal window
pqdoctor pki transition api.internal:443 --admin 127.0.0.1:9477

It reads today’s chain and the clients a pqdoctor proxy has observed: who offers ML-DSA signature algorithms, who sends certificate_authorities, and who sends Trust Anchor IDs. Every option lands in one of three bins, and each carries its readiness (standardized / experimental with implementations / projection only):

  • do this: every client it affects can negotiate it, by observation.
  • test this: implementations exist, but this population hasn’t shown it.
  • not possible here: no observed client can negotiate it, or nothing implements it.

Nothing is recommended on hope. MTC and abridged certificates go to “not possible here”: no implementation negotiates them. Trust Anchor IDs are “do this” only when observed clients both send them and offer ML-DSA. When no clients have been observed yet, nothing about ML-DSA is “do this”.

A client that sends the trust_anchors extension (draft-ietf-tls-trust-anchor-ids) says which roots it trusts, so the server can pick the chain the client will verify. pqdoctor proxy selects by it when the listener names each chain’s anchor:

[listener.tls]
cert = "classical/chain.pem"
key = "classical/leaf.key"
pq_cert = "mldsa/chain.pem"
pq_key = "mldsa/leaf.key"
pq_trust_anchor_id = "32473.1" # the ML-DSA root's ID (a relative OID)
trust_anchor_id = "32473.2" # the classical root's ID
  • A client that asks for the ML-DSA anchor gets the ML-DSA chain, but only if it also offers an ML-DSA signature algorithm. Otherwise it gets the classical chain, so nobody is locked out.
  • A client that asks only for the classical anchor gets the classical chain, even with pq_all.
  • No extension, or an anchor the listener doesn’t know: the usual selection (pq_sni, certificate_authorities, pq_all).
  • /status → chainsServed.byTrustAnchorId counts the handshakes the extension decided.

Experimental: the draft has no IANA code point yet, so this uses 0xca34, the one BoringSSL implements. The server doesn’t send the draft’s acknowledgement or its anchor list (rustls has no hook for either; clients don’t need them to verify). It works over TCP only, not HTTP/3.

Checked on the Ubuntu lab VM with a BoringSSL client (lab/tai/), 8 of 8:

  • Asks for the ML-DSA anchor: it gets the ML-DSA-44 chain and verifies it against the ML-DSA root.
  • No request, classical anchor only, or an unknown anchor: it gets the classical chain.
  • Asks for the ML-DSA anchor but can’t verify ML-DSA: it gets the classical chain.
  • Telemetry and client doctor: the counts match, and the client is marked as sending trust anchor IDs.
Terminal window
pqdoctor pki grade api.internal:443
  • Security (observed): post-quantum key exchange, and whether the certificate is ML-DSA.
  • Deployment (projected): whether the first flight fits the modelled budgets.

A large chain isn’t weaker, so size never lowers the security grade.

pqdoctor pki snapshot hosts.txt --out chains.jsonl appends one dated record per host: the chain’s certificates (key, signature, size), whether it validates against Mozilla’s roots, and the bytes that are removable. It runs over the same host lists as pqdoctor scan, including Tranco CSV, for the classical public-web baseline.

  • lab/compat/: the client compatibility matrix. Every profile (classical control, ML-DSA-44 flat and two-level, ML-DSA-65, mixed 87/65/44, an oversized ~25 KB flight) and ML-DSA mTLS. Two servers: pqdoctor (rustls + aws-lc) and OpenSSL 3.5 s_server. Every client stack on the lab VM: OpenSSL, curl, Python, Node, Go, rustls, GnuTLS, Java, .NET, wolfSSL, mbedTLS, BoringSSL. Each cell is pass, fail with the exact error, or blocked (not available on the VM).
  • lab/chainlab/: real chains and real handshakes between two network namespaces over veth, with netem RTT and loss, initcwnd 4/10/32 on the server’s route, and offloads off. pki iw is checked against the window it set.

chainlab, measured (Ubuntu lab VM; handshake p50 in round trips; RTT 100 ms; no loss; TCP connect plus full TLS 1.3 with X25519MLKEM768):

Profile (chain.pem size) IW4 IW10 IW32
classical P-256, 2-level (1.5 KB) 2.47 2.40 2.60
ML-DSA-44 flat (5.6 KB) 3.68 2.73 2.64
ML-DSA-44 2-level (11 KB) 3.99 3.79 3.03
ML-DSA-65 2-level (15 KB) 5.14 4.32 2.89
ML-DSA-87/65/44 (16 KB) 3.90 4.04 3.06
ML-DSA-87 all the way (21 KB) 4.97 5.56 2.99

The server’s first flight ranges from 2.4 KB (classical) to 21.2 KB (ML-DSA-87). At the default IW10, the two-level and larger ML-DSA chains cost one to three extra round trips; IW32 takes them back to about three. All 72 cells (6 profiles × IW 4/10/32 × RTT 20/100 ms × loss 0/1%) completed every handshake.

pki iw against the initcwnd set, 3 of 3, on the 21 KB flight with ACKs held:

  • IW4: 4 segments (4,117 B).
  • IW10: 10 segments (12,805 B).
  • IW32: the whole flight fit, reported as “at least”.

Running it found and fixed three measurement bugs:

  • pki iw counted GSO packets as single segments.
  • It took a retransmission as proof the window was full. The RTO fires either way: only new data after the first burst (for example a tail loss probe) proves it.
  • Its ACK filter let SACK ACKs through.

Checked on Windows:

  • Dual chains. A client that offers ML-DSA gets the ML-DSA chain and verifies it. A client limited to classical signatures gets the classical chain, so there’s no lockout. chainsServed counts both, and the client doctor records each client’s ML-DSA support.
  • Every profile serves and verifies over real TLS.
  • Every pki command works against a live ML-DSA server.

The client compatibility matrix (Ubuntu lab VM, 288 cells, none blocked):

Client ML-DSA server chains (44, 65, 87, mixed, ~25 KB) ML-DSA mTLS Classical
OpenSSL 3.5.5, curl 8.18, Python 3.14, Node 24 (OpenSSL 3.5.9) ✓ ✓ ✓
rustls (pqdoctor), .NET 10 (on OpenSSL), BoringSSL (2026-11-13) ✓ ✓ ✓
Go 1.26 ✗ doesn’t offer ML-DSA in TLS: the server refuses it ✗ ✓
Java 25 ✗ doesn’t offer ML-DSA in TLS ✗ ✓
GnuTLS 3.8.12 (Ubuntu) ✗ no ML-DSA in this build: certtool rejects the signature too ✗ can’t load the key ✓
wolfSSL 5.9.1, mbedTLS 3.6.5 (Ubuntu packages) ✗ can’t parse an ML-DSA root (unsupported OID) ✗ ✓

The results are the same against pqdoctor proxy and OpenSSL 3.5 s_server.

  • BoringSSL verifies ML-DSA only when it’s told to offer it: its default signature list leaves ML-DSA out.
  • The five stacks that fail ML-DSA are exactly the clients a dual-chain listener keeps on the classical chain.
  • lab/compat/results/ holds matrix.csv, with every failure’s exact error.

Running it also found a real bug: two-level hierarchies issued their root with pathLenConstraint 0, so an intermediate below it was invalid under RFC 5280. BoringSSL refused those chains (“path length constraint exceeded”); rustls doesn’t check a trust anchor’s constraints, so the earlier tests passed. A two-level root now allows one CA below it.