← Back to section · Tutorials & Labs
Deployment in Practice: Issuing a PQC Test Certificate Chain for Internal Services
Build an ML-DSA root and intermediate CA with OpenSSL 3.5, issue certificates for internal services, and verify the chain; with clear applicability boundaries and the right dual-track posture alongside classical PKI.
When internal services also need post-quantum authentication, the first skill to rehearse is issuing a real PQC certificate. This article builds a complete ML-DSA certificate chain with OpenSSL 3.5: a root CA, an intermediate CA, and a service leaf certificate, finishing with chain verification. First, fix the positioning: this chain is for internal research, interoperability testing, and rehearsal. The public Web PKI still has no issuance path for ML-DSA, and browsers will not trust your self-built root; pushing this chain straight into public production yields site-wide certificate errors, not post-quantum security.
Prerequisites and Overall Structure
Prepare an offline or quasi-offline machine for the root CA and an issuing machine for the intermediate. The tool requirement is OpenSSL ≥ 3.5 (openssl list -signature-algorithms | grep -i ml-dsa should list ML-DSA-44/65/87). The structure keeps the classical PKI three-tier division of labor, for the same reasons: if the root key leaks, everything collapses, so the root only signs the intermediate and then goes offline into storage; day-to-day issuance is the intermediate’s job, and an intermediate can be revoked and rebuilt if something goes wrong. The real changes PQC brings are only two: keys and signatures grow substantially (an ML-DSA-65 public key is about 1.9 KB and a signature about 3.3 KB, so a full chain’s handshake bytes grow by an order of magnitude — measure this specifically in later performance testing); and many off-the-shelf PKI products (including some commercial CA software) do not yet offer ML-DSA in their algorithm dropdowns — this article uses the command line precisely to route around that maturity gap.
Steps: Build the Root, Sign the Intermediate, Issue the Leaf
Root CA (run on the offline machine):
openssl genpkey -algorithm ML-DSA-65 -out root.key
openssl req -new -x509 -key root.key -out root.crt -days 3650 \
-subj "/CN=PQC Lab Root CA" -addext basicConstraints=critical,CA:TRUE,pathlen:1
Intermediate CA (generate key and CSR, have the root sign it):
openssl genpkey -algorithm ML-DSA-65 -out inter.key
openssl req -new -key inter.key -out inter.csr -subj "/CN=PQC Lab Issuing CA"
openssl x509 -req -in inter.csr -CA root.crt -CAkey root.key -CAcreateserial \
-out inter.crt -days 1825 -extfile <(echo -e "basicConstraints=critical,CA:TRUE,pathlen:0\nkeyUsage=critical,keyCertSign,cRLSign")
Leaf certificate (for an internal service):
openssl genpkey -algorithm ML-DSA-65 -out svc.key
openssl req -new -key svc.key -out svc.csr -subj "/CN=api.internal.example"
openssl x509 -req -in svc.csr -CA inter.crt -CAkey inter.key -CAcreateserial \
-out svc.crt -days 397 -extfile <(echo "subjectAltName=DNS:api.internal.example")
Day-to-day issuance also needs rules set up front. Certificate requests go through the same approval flow as the classical chain; do not let “it’s just a test chain” become an excuse for casual issuance — who requested, for which service, for how long must all be recorded, or the test chain quickly becomes a shadow PKI nobody can account for, and an audit problem in its own right. Private keys are always generated on the target service’s own machine, with only the CSR sent out for signing — carry this old classical-PKI rule over to the PQC chain; ML-DSA private keys are much larger than classical ones (the 65 parameter set’s private key encoding is on the order of 4 KB), which is even less reason to move them over a network. Issuance records and certificate serial numbers go into the asset ledger, managed together with the ledger from this section’s monitoring article, with expiry reminders on the same alerting channel.
If some internal component cannot yet handle ML-DSA keys, the ML-DSA CA can sign a leaf certificate with a classical subject key (such as Ed25519 or ECDSA P-256) as a transition — in X.509 the signature algorithm and the subject key algorithm are separate, and chain verification only requires each signature to verify against the next level’s public key. This leaves a door for phased migration.
Verification: Check the Chain, the Algorithm, and the Size
openssl verify -CAfile <(cat root.crt inter.crt) svc.crt
openssl x509 -in svc.crt -noout -text | grep -E "Signature Algorithm|Public-Key"
The first command should output svc.crt: OK; the second confirms the signature algorithm really is ML-DSA-65 rather than having quietly fallen back to a classical algorithm. Also run a negative test on purpose: alter the service name in the leaf certificate (or try verifying against another chain’s intermediate) and confirm verification fails as expected — a PKI where only the success path was tested is effectively untested, because the most common outcome of a misconfiguration is precisely “everything verifies.” Archive the commands and outputs of both the positive and negative tests as this chain’s acceptance record. Then install the chain on a real internal service (certificate placement as in this section’s nginx article), complete a handshake with an equally OpenSSL 3.5-based client, and record handshake bytes and latency against the classical chain — that dataset is what later decides which systems switch first and which switch later. Finally, rehearse revocation once: generate a CRL with the CA, have the verifier load it, and confirm the revoked certificate indeed fails — the revocation flow cannot be absent on the PQC chain either.
Operations: Rotation, Overlap Periods, and Consumer Adaptation
Building the chain is only the first step; settle three operations questions early. First, rotation: the example rhythm above is root ten years, intermediate five, leaf one. When the intermediate is eventually replaced, old and new intermediate chains coexist for a period — consumer trust stores should carry both intermediates (the root unchanged), and the old intermediate is retired once old leaves expire naturally. The flow is identical to classical PKI; reuse existing procedure, but rehearse it once on the PQC chain before writing it into the manual. Second, consumer adaptation: not every component can consume ML-DSA certificates — some language runtimes, old proxy versions, and embedded TLS stacks fail outright when parsing large certificates or new algorithm OIDs, so every service type to be onboarded must first complete the full “install certificate, start service, get called” flow in a test environment before joining the rollout list; services that fail stay on the classical chain rather than dragging down the PQC chain’s design. Third, coordination with key-exchange migration: the most pragmatic full-PQ combination for internal service TLS today is “hybrid key exchange (deployable now) + ML-DSA certificate chain (this article, in testing)” advanced in separate steps, never bound into a single change — traffic confidentiality gets protected first, identity authentication follows, and when something breaks you can tell which layer is at fault.
Rollback and Management Discipline
Rollback for this chain is simple: internal services keep using the existing classical chain; the PQC chain is a parallel addition that replaces and deletes nothing. Three management rules: first, the test root certificate may only enter test trust stores — its appearance in a production device’s trust store is an incident. Second, the three tiers’ private keys are stored separately: root key offline, intermediate key on the issuing machine protected by a passphrase (after openssl genpkey, encrypt with openssl pkey). Third, put the whole chain on an expiry calendar; ML-DSA certificates’ validity fields are no different from classical ones, and expiry breaks service just the same. Once this chain runs smoothly, your organization owns the minimal PQC PKI loop: issuance, verification, revocation, and rotation, all rehearsed once.
Tags: PKIML-DSACertificatesInternal Services