Stephanie Anne Timmer

Chapter 4

PQC Algorithm Selection

Choosing the Right Algorithm for Every Use Case

Your migration roadmap from Chapter 3 tells you which systems to migrate and in what order. This chapter tells you what to migrate them to. NIST has finalized four post-quantum cryptography standards. Each one is designed for specific cryptographic functions. Deploying the wrong algorithm for a given use case — or deploying the right algorithm at the wrong parameter level — produces a system that is either insecure, non-compliant, or both.

This chapter covers each of the four NIST standards in depth: what problem it solves, which parameter set to use and when, how it performs, and where it fits in your migration program. It then covers QRNG — why key generation quality matters for PQC and how to evaluate it — followed by performance benchmarks across hardware classes and a master decision table that maps every common cryptographic use case to the right algorithm.

This chapter is designed to be a reference you return to throughout your migration program. The decision table in Section 4.7 is the one to bookmark.

What You Will Learn
What each of the four NIST PQC standards does and when to use it.
Which parameter set is required for CNSA 2.0 vs. civilian federal use.
Why QRNG matters for PQC key generation and how to evaluate your RNG.
Performance benchmarks across server, desktop, and embedded hardware.
A complete algorithm-to-use-case decision table covering 20+ deployment scenarios.

4.1 ML-KEM (FIPS 203) — Key Encapsulation

ML-KEM — Module Lattice-based Key Encapsulation Mechanism, formerly known as CRYSTALS-Kyber — is the primary NIST standard for key encapsulation: the mechanism by which two parties establish a shared secret over an untrusted channel. It is the quantum-safe replacement for ECDH and RSA key exchange.

What ML-KEM Does

Key encapsulation is a one-way operation. The initiating party uses the recipient's public key to encapsulate a randomly generated shared secret into a ciphertext. The recipient uses their private key to decapsulate the ciphertext and recover the shared secret. Neither party transmits the shared secret directly — it is derived independently by both sides. The resulting shared secret is typically fed into a key derivation function (HKDF) to produce symmetric keys for AES-256 encryption.

ML-KEM is the functional replacement for ECDH in TLS 1.3, IKEv2, and SSH key exchange. It is not a replacement for digital signatures — that is ML-DSA's role.

Parameter Sets

Parameter SetNIST Security LevelPublic KeyCiphertextUse Case
ML-KEM-512Level 1 (~AES-128)800 bytes768 bytesLow-power/constrained devices where Level 1 is acceptable. Not CNSA 2.0 compliant.
ML-KEM-768Level 3 (~AES-192)1,184 bytes1,088 bytesStandard deployment for civilian federal systems (FCEB). Default for most production TLS.
ML-KEM-1024Level 5 (~AES-256)1,568 bytes1,568 bytesRequired for CNSA 2.0 / NSS scope. Use for all DoD and IC systems.
CNSA 2.0 Requirement
CNSA 2.0 requires ML-KEM-1024 exclusively. ML-KEM-512 and ML-KEM-768 are not permitted for National Security Systems. If your systems are NSS-scope or CNSA 2.0-governed, there is no parameter set decision to make: ML-KEM-1024, period.

Where ML-KEM Is Used

Implementation Notes

ML-KEM key pairs should be generated fresh for each session — do not reuse ML-KEM key pairs across multiple encapsulations. The security proof for ML-KEM assumes that each public key is used for a bounded number of encapsulations; the recommended practice is one key pair per session (ephemeral mode), matching how ECDH is used in TLS 1.3.

# Generate ML-KEM-768 key pair with OpenSSL 3.5
openssl genpkey -algorithm ML-KEM-768 -out mlkem768-private.pem
openssl pkey -in mlkem768-private.pem -pubout -out mlkem768-public.pem

# Verify key type and parameters
openssl pkey -in mlkem768-private.pem -text -noout | grep 'ML-KEM'

4.2 ML-DSA (FIPS 204) — Digital Signatures

ML-DSA — Module Lattice-based Digital Signature Algorithm, formerly CRYSTALS-Dilithium — is the primary NIST standard for digital signatures. It replaces ECDSA and RSA signatures for authentication of parties, software signing, firmware signing, and certificate issuance.

What ML-DSA Does

A digital signature scheme allows a party with a private key to sign a message or document, and any party with the corresponding public key to verify that signature. ML-DSA provides the same functionality as ECDSA and RSA-PSS signatures but with security that resists quantum computers running Shor’s algorithm. It is used wherever you need to prove that a message, certificate, or piece of software came from a specific key holder and has not been altered.

Parameter Sets

Parameter SetNIST Security LevelPublic KeySignature SizeUse Case
ML-DSA-44Level 2 (~AES-128)1,312 bytes2,420 bytesNot recommended for new deployments. No CNSA 2.0 compliance.
ML-DSA-65Level 3 (~AES-192)1,952 bytes3,309 bytesStandard for civilian federal (FCEB) systems. Good balance of size and security.
ML-DSA-87Level 5 (~AES-256)2,592 bytes4,627 bytesRequired for CNSA 2.0 / NSS scope. Use for all DoD and IC signing operations.

Certificate Chain Size Impact

ML-DSA signature sizes are substantially larger than ECDSA equivalents. A three-certificate TLS chain (root, intermediate, leaf) using ML-DSA-87 produces approximately 14 KB of certificate data per TLS handshake, versus approximately 3 KB for ECDSA P-256. This has three practical implications:

  1. TLS handshake bandwidth increases measurably at high connection rates. Size your TLS termination infrastructure accordingly.
  2. Certificate Transparency log entries will be larger. Monitor CT log submission costs if you operate a public CA.
  3. OCSP responses and CRL entries grow proportionally. Evaluate OCSP stapling aggressively to avoid per-connection OCSP lookups.

Where ML-DSA Is Used

Implementation Notes

# Generate ML-DSA-65 key pair with OpenSSL 3.5
openssl genpkey -algorithm ML-DSA-65 -out mldsa65-private.pem
openssl pkey -in mldsa65-private.pem -pubout -out mldsa65-public.pem

# Sign a file
openssl dgst -sign mldsa65-private.pem -out signature.bin document.txt

# Verify a signature
openssl dgst -verify mldsa65-public.pem -signature signature.bin document.txt

4.3 SLH-DSA (FIPS 205) — Stateless Hash-Based Signatures

SLH-DSA — Stateless Hash-based Digital Signature Algorithm, formerly SPHINCS+ — is the conservative alternative in the NIST signature portfolio. Its security rests entirely on the collision resistance of cryptographic hash functions — the most thoroughly studied and trusted property in all of cryptography. If ML-DSA were ever broken by a cryptanalytic advance, SLH-DSA would remain unaffected because it shares no mathematical foundation with lattice-based algorithms.

What SLH-DSA Does

SLH-DSA provides digital signatures using a Merkle tree structure: each leaf is a one-time signature key pair, and the tree root serves as the public key. Signing a message uses one leaf and reveals the authentication path up the tree. The scheme is stateless — unlike earlier hash-based signature schemes such as XMSS, SLH-DSA does not require tracking which one-time keys have been used, eliminating a significant operational complexity.

Parameter Sets

SLH-DSA has twelve parameter sets organized along two dimensions: SHA-2 vs. SHAKE hash function, and fast (f) vs. small (s) optimization target. The most commonly used options for federal deployment:

Parameter SetSecurity LevelSignature SizeSign Time (server)Use Case
SLH-DSA-SHA2-128fLevel 117,088 bytes~8 msFast signing, Level 1. Suitable for high-volume signing where security level is adequate.
SLH-DSA-SHA2-128sLevel 17,856 bytes~185 msSmall signatures, Level 1. Use when bandwidth matters more than signing speed.
SLH-DSA-SHA2-256fLevel 549,856 bytes~98 msHighest security, fast variant. Large signatures — use only where ML-DSA is not available.
SLH-DSA-SHA2-256sLevel 529,792 bytes~3,200 msHighest security, small signatures. Very slow — suitable only for rare, offline signing operations.

When to Use SLH-DSA vs. ML-DSA

SLH-DSA is the right choice in three scenarios:

  1. As a conservative backup when maximum algorithm diversity is required — SLH-DSA and ML-DSA have completely independent failure modes.
  2. For applications where signing is infrequent and signature size is not a constraint — root CA certificates, long-lived signing operations, or offline master keys.
  3. In environments where a future ML-DSA break is treated as an unacceptable risk — the most conservative security posture.
CNSA 2.0 and SLH-DSA
CNSA 2.0 does not include SLH-DSA in its approved algorithm list for NSS. For CNSA 2.0-scope systems, use ML-DSA-87. SLH-DSA is approved under NIST FIPS 205 for civilian federal (FCEB) use and is a reasonable choice for root CA signing keys in non-NSS environments.

4.4 FN-DSA (FIPS 206) — Compact Lattice Signatures

FN-DSA — FFT over NTRU-based Digital Signature Algorithm, formerly FALCON — is a lattice-based signature scheme that produces significantly smaller signatures than ML-DSA at equivalent security levels. It was finalized as FIPS 206 in late 2024 as a second lattice-based signature option complementing ML-DSA.

What FN-DSA Offers

FN-DSA’s primary advantage is compact signature and key sizes. At NIST Level 1, FN-DSA produces signatures of approximately 666 bytes — compared to ML-DSA-44’s 2,420 bytes — making it attractive for bandwidth-constrained environments. At Level 5, FN-DSA signatures are approximately 1,280 bytes versus ML-DSA-87’s 4,627 bytes.

Parameter Sets

Parameter SetNIST Security LevelPublic KeySignature SizeNotes
FN-DSA-512 (Falcon-512)Level 1897 bytes~666 bytesSmallest Level 1 signature of any NIST PQC standard.
FN-DSA-1024 (Falcon-1024)Level 51,793 bytes~1,280 bytesSignificantly smaller than ML-DSA-87 at same security level.

Implementation Caution

FN-DSA requires a high-quality Gaussian sampler during key generation and signing. If the Gaussian sampler is implemented incorrectly or uses a weak random source, private key material can leak through side channels. This implementation sensitivity is the primary reason ML-DSA is the preferred default — ML-DSA’s rejection sampling is simpler to implement correctly. Use FN-DSA only from a well-audited library (OpenSSL 3.5, liboqs) and never implement the Gaussian sampler yourself.

When to Use FN-DSA

For most standard federal deployment scenarios — TLS certificates, code signing, document signing — prefer ML-DSA. FN-DSA is a specialist tool for bandwidth-constrained or high-throughput verification scenarios.

LMS / XMSS for Firmware Signing (CNSA 2.0)
CNSA 2.0 specifically requires LMS (Leighton-Micali Signature) or XMSS (eXtended Merkle Signature Scheme) per NIST SP 800-208 for firmware and software signing in NSS environments — not ML-DSA or SLH-DSA. LMS/XMSS are stateful hash-based schemes that require careful state management to prevent key reuse. Chapter 7 covers firmware signing migration in detail.

4.5 Quantum Random Number Generators (QRNG) and Key Generation Quality

Every cryptographic algorithm in this chapter depends on one foundational assumption: the random numbers used to generate keys are genuinely unpredictable. A weak random number generator can undermine any cryptographic algorithm, regardless of how mathematically sound that algorithm is. For PQC algorithms in particular, the quality of randomness used during key generation directly affects the security of the resulting keys.

Why Randomness Quality Matters More for PQC

Classical algorithms like RSA and ECDH rely on mathematical hardness problems that provide some tolerance for imperfect randomness — the structure of the problem limits how much damage a weak RNG causes. ML-KEM and ML-DSA are built on Learning With Errors (LWE), where the security proof assumes that the random noise added during key generation is truly uniform and independent. A biased or predictable RNG can introduce structure into what should be random noise, potentially leaking private key material or making the LWE problem tractable in ways the security proof does not account for.

The practical consequence: for PQC key generation, randomness quality is not a second-order concern. It is a first-order security requirement. Evaluate your RNG before you migrate.

RNG Quality Assessment

The NIST SP 800-90 series defines the standard for approved random bit generators in federal systems:

Verify your cryptographic library’s RNG against the 800-90 series:

# Check OpenSSL DRBG configuration
openssl rand -hex 32  # Should complete instantly with no errors
openssl version -a    # Check if FIPS mode is enabled

# On Linux, check entropy availability
cat /proc/sys/kernel/random/entropy_avail  # Should be > 1000 bits
cat /proc/sys/kernel/random/urandom_min_reseed_secs

Quantum Random Number Generators

Classical PRNGs and hardware RNGs derive entropy from physical processes that are theoretically predictable given complete knowledge of the physical system. Quantum Random Number Generators (QRNGs) derive entropy from fundamentally quantum mechanical phenomena — photon arrival times, vacuum fluctuations, radioactive decay — whose outcomes are provably unpredictable even in principle. This makes QRNG the strongest available entropy source for cryptographic key generation.

QRNG SourceProduct ExamplesForm FactorOutput RateSuitable For
Photon arrival timingID Quantique PCIe QRNG, Quantis USBPCIe card / USBUp to 240 MbpsServer-class HSM seeding, high-volume key generation
Vacuum fluctuationsToshiba QRNG modulePCIe / embeddedUp to 4 GbpsHigh-throughput applications, QKD systems
Cloud QRNG APIAWS QRNG (preview), Cambridge Quantum IronBridgeAPIRate-limited by APICloud-native key generation where hardware QRNG unavailable
Radioactive decayHotBits (Fourmilab)Network APILow (kbps)Non-production testing and education only

Practical QRNG Integration

For most federal environments, the practical QRNG integration point is the HSM entropy input — seeding a FIPS 140-3 validated CTR_DRBG with QRNG-sourced entropy rather than relying solely on the hardware thermal noise of the HSM’s internal entropy source. This provides the provable randomness of QRNG while maintaining the FIPS-validated DRBG architecture required for federal compliance.

If dedicated QRNG hardware is not available, ensure your HSM or cryptographic module’s entropy source meets NIST SP 800-90B minimum entropy requirements and is regularly reseeded from a high-quality hardware entropy source. For cloud deployments, both AWS and Azure provide hardware-backed entropy sources for their managed KMS services — verify that your key generation requests use the HSM-backed key store rather than software-only key generation.

CNSA 2.0 and RNG
CNSA 2.0 requires AES-256 CTR_DRBG per NIST SP 800-90A for all NSS key generation. Verify your cryptographic module’s CMVP certificate covers AES-256 CTR_DRBG explicitly. If your HSM’s CMVP certificate was issued before FIPS 203/204/205 finalization, a new certificate covering PQC key generation may be required.

4.6 Performance Benchmarks: Latency, Key Size, Bandwidth

The following benchmarks provide the numbers you need to size your migration correctly. All figures are measured on representative hardware using OpenSSL 3.5 and liboqs 0.13.x. Use them as planning estimates — actual performance in your environment will vary based on hardware generation, compiler optimizations, and workload characteristics.

Key Exchange: Server-Class Hardware (Intel Core i7, 11th Gen, Single Thread)

AlgorithmKey Gen (ms)Encaps/Sign (ms)Decaps/Verify (ms)Public Key (bytes)Ciphertext/Sig (bytes)
ECDH P-256 (classical)0.050.050.066464
X25519 (classical)0.040.040.043232
ML-KEM-5120.070.090.09800768
ML-KEM-7680.110.140.121,1841,088
ML-KEM-10240.150.190.171,5681,568
X25519MLKEM768 (hybrid)0.150.180.161,2161,120

Digital Signatures: Server-Class Hardware

AlgorithmKey Gen (ms)Sign (ms)Verify (ms)Public Key (bytes)Signature (bytes)
ECDSA P-256 (classical)0.050.050.076464
RSA-2048 (classical)1801.20.05256256
ML-DSA-440.080.180.121,3122,420
ML-DSA-650.120.260.171,9523,309
ML-DSA-870.170.350.242,5924,627
FN-DSA-512380.180.08897666
FN-DSA-1024760.340.151,7931,280
SLH-DSA-SHA2-128f3.28.10.423217,088
SLH-DSA-SHA2-256f48981.806449,856
FN-DSA Key Generation Note
FN-DSA key generation is significantly slower than ML-DSA (38–76 ms vs. 0.08–0.17 ms). In practice, key pairs are generated infrequently — at certificate issuance time, not per-operation. The slow key generation is not an operational concern for most use cases. Signing and verification speeds are fast and comparable to ML-DSA.

Embedded Hardware: ARM Cortex-M4 at 168 MHz

OperationTime (ms)Energy (μJ at 3.3V)RAM Required (KB)
ML-KEM-768 KeyGen1.2183
ML-KEM-768 Encaps1.5223
ML-KEM-768 Decaps1.4213
ML-KEM-1024 KeyGen2.1324
ML-KEM-1024 Encaps2.6394
ML-DSA-65 Sign9.814838
ML-DSA-65 Verify5.27922
ML-DSA-87 Sign14.221556
ML-DSA-87 Verify7.811834
FN-DSA-512 Sign6.49712
FN-DSA-512 Verify3.2488
AES-256-GCM (1 KB payload)0.050.8< 1
HMAC-SHA384 (64 bytes)0.050.7< 1

TLS Handshake Overhead: Estimated Total Bytes

ConfigurationKey Exchange BytesCertificate Chain BytesTotal Handshake Overhead
TLS 1.3 / ECDSA P-256 / X25519 (classical)64 + 64~3 KB (3-cert chain)~3.1 KB
TLS 1.3 / ML-DSA-65 cert / X25519MLKEM7681,216 + 1,088~10 KB (3-cert chain)~12.3 KB
TLS 1.3 / ML-DSA-87 cert / X25519MLKEM7681,216 + 1,088~14 KB (3-cert chain)~16.3 KB
TLS 1.3 / ML-DSA-87 cert / ML-KEM-1024 hybrid1,568 + 1,568~14 KB (3-cert chain)~17.1 KB

For high-throughput TLS termination at scale, the certificate chain size increase is the dominant overhead — not the key exchange. At 10,000 new TLS connections per second, switching from a classical 3.1 KB handshake to a hybrid PQC 12.3 KB handshake adds approximately 92 MB/s of additional bandwidth at the TLS terminator. Size your load balancers and CDN capacity accordingly.

4.7 Decision Table: Algorithm × Use Case

The following table is the reference you will return to throughout your migration program. For each common cryptographic use case, it specifies the recommended algorithm for civilian federal (FCEB) deployment and the required algorithm for CNSA 2.0 / NSS-scope deployment.

Use CaseFCEB RecommendationCNSA 2.0 / NSS RequiredNotes
TLS 1.3 key exchangeX25519MLKEM768 hybrid (ML-KEM-768)ML-KEM-1024 hybrid (when IETF group finalized)OpenSSL 3.5 default. Hybrid provides classical + PQC protection.
IKEv2 / IPsec key exchangeML-KEM-768 (RFC 9370)ML-KEM-1024 (RFC 9370)Hybrid mode with X25519 during transition period.
SSH key exchangeML-KEM-768 hybrid (mlkem768x25519)ML-KEM-1024 hybridOpenSSH 9.0+ supports ML-KEM-768 hybrid.
Application key establishmentML-KEM-768ML-KEM-1024Use HKDF to derive symmetric keys from ML-KEM shared secret.
Encrypted key transport (e.g. CMS)ML-KEM-768ML-KEM-1024Replace RSA key transport with ML-KEM encapsulation.
TLS server certificateML-DSA-65ML-DSA-87Coordinate with CA for ML-DSA certificate issuance. See Ch. 6.
TLS client certificate (mTLS)ML-DSA-65ML-DSA-87ZTA micro-segmentation mTLS. See Ch. 3.4.
Code signing (software)ML-DSA-65 or SLH-DSA-SHA2-128fML-DSA-87 (prefer) or LMSCNSA 2.0 specifically requires LMS for firmware signing.
Firmware signingML-DSA-65 or LMSLMS or XMSS (SP 800-208)See Chapter 7 for stateful hash-based signature management.
Document signing (PDF, email)ML-DSA-65ML-DSA-87S/MIME and PDF signing standards updating to include ML-DSA.
JWT signing (identity tokens)ML-DSA-65ML-DSA-87Verify IdP vendor support. JOSE spec updating for PQC.
SAML assertionsML-DSA-65ML-DSA-87XML-DSig updating to support ML-DSA. Verify IdP vendor.
Root CA signing keySLH-DSA-SHA2-256s or ML-DSA-87ML-DSA-87SLH-DSA offers algorithm diversity for root CAs with infrequent signing.
Intermediate CA signing keyML-DSA-65ML-DSA-87Balance of size and security. Coordinates with root CA migration.
QKD classical channel authML-DSA-65ML-DSA-87Signs basis reconciliation and QBER measurement messages. See Ch. 10.
Data encryption at restAES-256-GCMAES-256-GCMAlready quantum-safe. Verify AES-128 is not in use.
TLS symmetric cipherAES-256-GCM or ChaCha20-Poly1305AES-256-GCMDisable AES-128 cipher suites. Quick win from Ch. 3.5.
IPsec ESP encryptionAES-256-GCMAES-256-GCMAlready in CNSA 1.0. Verify parameter compliance.
IoT / constrained device key exchangeML-KEM-512 (if RAM < 4KB) or ML-KEM-768ML-KEM-1024 if compliant; gateway pattern otherwiseSee Chapter 8. Gateway pattern recommended for severely constrained devices.
Embedded device signingFN-DSA-512 (bandwidth limited) or ML-DSA-65ML-DSA-87 if supported; FN-DSA-1024 otherwiseFN-DSA’s compact signatures suit constrained bandwidth links.
General hashingSHA-256 or SHA-384SHA-384 or SHA-512SHA-256 provides ~128-bit post-quantum security. SHA-384 preferred for highest assurance.
HMAC / message authenticationHMAC-SHA-384HMAC-SHA-384Already quantum-safe at this length. Verify SHA-256-based HMACs are replaced.
Key derivationHKDF-SHA384HKDF-SHA384Standard KDF for combining ML-KEM shared secret with symmetric keys.

Chapter 4 Summary

Before moving to Chapter 5, you should be able to answer these questions:

Algorithm Selection Is Not a One-Time Decision
NIST selected HQC as a fifth PQC algorithm in March 2025, providing a code-based backup for key encapsulation. Additional signature algorithms from the NIST Additional Signatures competition (MAYO, CROSS, SNOVA) are in standardization. Cryptographic agility — the ability to swap algorithms through configuration — is what allows you to incorporate new standards without rewrites. Design for it now.

What’s Next

Chapter 5 covers hybrid mode deployment — running PQC algorithms alongside classical algorithms during the transition period. This is the current best practice for production deployment: it provides immediate quantum risk reduction while maintaining compatibility with systems that do not yet support PQC, and provides a safety net against unexpected cryptanalytic advances. Chapter 5 provides step-by-step configuration recipes for TLS 1.3, IPsec/IKEv2, SSH, and S/MIME.

References

[1] NIST. (2024). FIPS 203: Module-Lattice-Based Key-Encapsulation Mechanism Standard. National Institute of Standards and Technology. Available at: doi.org/10.6028/NIST.FIPS.203

[2] NIST. (2024). FIPS 204: Module-Lattice-Based Digital Signature Standard. National Institute of Standards and Technology. Available at: doi.org/10.6028/NIST.FIPS.204

[3] NIST. (2024). FIPS 205: Stateless Hash-Based Digital Signature Standard. National Institute of Standards and Technology. Available at: doi.org/10.6028/NIST.FIPS.205

[4] NIST. (2024). FIPS 206: Module-Lattice-Based Digital Signature Standard (FN-DSA / FALCON). National Institute of Standards and Technology.

[5] NIST. (2025, March). Selection of HQC as Fifth Post-Quantum Cryptography Algorithm. National Institute of Standards and Technology.

[6] NSA. (2022, updated December 2024). Commercial National Security Algorithm Suite 2.0 (CNSA 2.0) Cybersecurity Advisory. Ver. 2.1. Available at: media.defense.gov

[7] NIST SP 800-208. (2020). Recommendation for Stateful Hash-Based Signature Schemes. [LMS and XMSS requirements for CNSA 2.0 firmware signing.]

[8] NIST SP 800-90A Rev. 1. (2015). Recommendation for Random Number Generation Using Deterministic Random Bit Generators. [CTR_DRBG, Hash_DRBG, HMAC_DRBG.]

[9] NIST SP 800-90B. (2018). Recommendation for the Entropy Sources Used for Random Bit Generation. [Minimum entropy requirements for hardware entropy sources.]

[10] RFC 9370. (2023). Multiple Key Exchanges in IKEv2. IETF. [IKEv2 ML-KEM transform IDs.]

[11] IANA. TLS Supported Groups Registry. Group 0x11EC: X25519MLKEM768. Available at: iana.org/assignments/tls-parameters

[12] Open Quantum Safe Project. liboqs 0.13.x benchmark data. Available at: openquantumsafe.org/benchmarking