Skip to content

How to Implement Post-Quantum Cryptography Without Designing Your Own Protocol

Plan quantum-safe migration with ML-KEM, ML-DSA and SLH-DSA. Compare maintained libraries, inspect protocol support, and test key handling, signatures and fallback.

BY AISECURITYINTERVIEWS EDITORIAL · EDITORIAL TEAM · UPDATED NOVEMBER 15, 2026 · 5 MIN READ

PRACTICE THIS:Post-quantum implementation course ·Understand the quantum threat

Implement post-quantum cryptography at a maintained protocol or library boundary. Start by identifying what that boundary protects: a session secret, a backup key, a software release signature or a device's update authority. Installing a library with a new algorithm name does not migrate every dependency on the old one.

This guide concerns defensive migration on systems you own or are authorized to test. The six-lesson course supplies local primitive exercises and a fictional migration review packet. It does not implement a new cryptographic scheme.

Why the migration cannot wait for a calendar prediction

A passive observer can retain encrypted traffic today. If the exchange depends on RSA or discrete-logarithm security, a sufficiently capable future quantum computer could expose the session secret. That can defeat strong symmetric data encryption without attacking the symmetric cipher directly. Reconfiguring tomorrow's connections does not erase yesterday's recordings.

A signature dependency has a different timeline. Devices shipped today may still verify software years later. If they cannot accept a new verifier or trust anchor, an apparently distant signature problem becomes a present hardware-design decision. Treat transport confidentiality and long-lived verification roots as parallel workstreams.

The quantum-threat concept separates Shor's algorithm, generic quantum search, forward secrecy and harvest-now-decrypt-later. It also explains why “all security is broken” is the wrong premise for an implementation plan.

Choose the operation before choosing a library

ORIGINAL WORKFLOW · PQC IMPLEMENTATION
Migrate the cryptographic dependency, then verify its use

Inventory

Protocol, owner, data lifetime

Select a profile

KEM, signature and trust policy

Test the integration

Negative cases and old peers

Observe rollout

Negotiation and fallback evidence

Use the final ML-KEM standard for the KEM role and ML-DSA or SLH-DSA for a signature role where the selected application profile supports them. Earlier names such as Kyber and Dilithium identify the research lineage; do not assume draft wire formats or stored keys are interchangeable with the final schemes.

For a web service, prefer the maintained TLS implementation's supported hybrid group over assembling two exchanges in application code. For signed update metadata, choose a format that explicitly identifies the algorithm, signed fields, context, trusted key and verification policy. A requirement to validate two signatures must require both; accepting either one can preserve the weaker path.

Library routes, checked November 2026

RouteAppropriate starting pointCheck before relying on it
OpenSSL 3.5 family or a supported successorNative ML-KEM, ML-DSA and SLH-DSA primitives; supported hybrid TLS groupsExact patch, provider, build flags, application linkage and enabled protocol profile
Go standard library crypto/mlkemApplications that need its ML-KEM API within a reviewed designCompiler/runtime version and the enclosing authenticated protocol; a KEM package is not a signature suite
Open Quantum Safe liboqs and integrationsResearch, algorithm comparisons and interoperability experimentsThe project's production limitations; experimental availability is not a deployment endorsement

Primary documentation: OpenSSL key operations, OpenSSL group configuration, Go ML-KEM, and liboqs limitations. These are options with different responsibilities, not interchangeable certifications.

A Python binding or a Java wrapper may use a different provider than the system command. Inspect the library actually loaded by the process. A dependency's marketing page, an operating-system version and openssl version in an unrelated terminal are not equivalent evidence. Avoid unofficial packages that simply borrow a standardized algorithm's name.

Inspect capability without changing a live service

In a local lab with a maintained OpenSSL build, the following commands list available implementations. They neither enable a production protocol nor demonstrate that an application uses it.

openssl version
openssl list -providers
openssl list -kem-algorithms
openssl list -signature-algorithms
openssl list -tls-groups

Record the output with the package provenance and application configuration. In the course, a controlled local KEM exchange checks that both sides obtain the same secret and that a wrong recipient key does not. The signature exercise checks valid metadata, changed bytes, wrong keys and an incorrect signing context. These tests inspect integration behavior; they do not prove the mathematics or certify a cryptographic module.

Keep lab secrets out of logs and source control. Real applications need an established protocol key schedule, memory and error handling appropriate to the runtime, maintained entropy sources, key rotation and a custody design. Never reuse a tutorial's generated key material in production.

Test the path that carries real traffic

Suppose a CDN negotiates a hybrid group with a browser while the origin connection remains classical. The browser's success says nothing about the second leg. Record each TLS termination, client cohort, certificate trust store, negotiated group and policy. Include batch clients, service meshes, proxies and recovery systems.

Test the intended group with compatible peers, incompatible peers under strict policy, and old peers under an explicitly allowed compatibility policy. Observe negotiation rather than just HTTP success. Review timeouts, retry requests, message-size effects and middleboxes. The OpenSSL group documentation specifically discusses larger key shares and handshake disruption; the effect on your network needs measurement.

Do not silently relax a strict confidentiality policy after a handshake failure. If a transitional cohort permits classical fallback, isolate it, give it an owner and expiry, and retain evidence that it actually used the exception. Unknown negotiation is an observation gap, not a quantum-resistant success.

Plan the stored-data and signature transitions separately

A storage system may encrypt object bytes with an adequate symmetric key while wrapping that key under an exposed public-key scheme. Inventory envelopes, historical recipients, backups and offline recovery keys. A new wrapper helps only where old exposed material is no longer available to the adversary; it does not revoke a copied old envelope. Re-encryption and rewrapping need a threat-specific plan.

For signing, update the verifier before relying on a new signer. Include trust-anchor distribution, old firmware, timestamp interpretation, algorithm identifiers, dual-signature policy and archival verification. Larger signatures can exceed parser or transport limits. Measure a representative chain and message rather than treating a successful primitive benchmark as a rollout test.

The acceptance record

For each dependency, retain the selected profile, supported peers, trusted identities, expected negative outcomes, measured negotiation, exceptions and recovery boundary. A release owner should be able to explain why an incompatible client was blocked, why a compatibility client was permitted, and why neither result covers an unobserved internal leg.

NIST IR 8547, published October 2026, provides transition guidance. Its scope and your applicable obligations need review; it is not a substitute for the dependency inventory. Follow the course's final project to turn mixed test results into a bounded pilot decision.

PRACTICE THIS

Continue with the product workflow, lesson or reference that fits your next step. Each resource shows its access terms.

FAQ

No. These algorithms run on classical computers and are designed to resist known classical and quantum attacks. They are different from quantum key distribution.