Skip to main content
Technical Reference

PQC Algorithm Comparison

Compare NIST-standardized post-quantum cryptography algorithms. Performance benchmarks, security levels, and implementation guidance for ML-KEM, ML-DSA, and SLH-DSA.

VariantAlgorithmSecurityPublic KeyPrivate KeyCiphertextKey GenEncap/Decap
ML-KEM-512ML-KEMLevel 1800 B1.6 KB768 B30 µs35 µs / 40 µs
ML-KEM-768ML-KEMLevel 31.2 KB2.3 KB1.1 KB50 µs55 µs / 65 µs
ML-KEM-1024ML-KEMLevel 51.5 KB3.1 KB1.5 KB75 µs85 µs / 95 µs
ML-DSA-44ML-DSALevel 21.3 KB2.5 KB2.4 KB40 µs120 µs / 45 µs
ML-DSA-65ML-DSALevel 31.9 KB3.9 KB3.2 KB65 µs200 µs / 70 µs
ML-DSA-87ML-DSALevel 52.5 KB4.8 KB4.5 KB100 µs290 µs / 100 µs
SLH-DSA-SHA2-128fSLH-DSALevel 132 B64 B16.7 KB500 µs8.0 ms / 500 µs
SLH-DSA-SHA2-192fSLH-DSALevel 348 B96 B34.8 KB1.0 ms15.0 ms / 1.0 ms
SLH-DSA-SHA2-256fSLH-DSALevel 564 B128 B48.7 KB2.0 ms30.0 ms / 2.0 ms
SLH-DSA-SHA2-128sSLH-DSALevel 132 B64 B7.7 KB1.0 ms50.0 ms / 3.0 ms
SLH-DSA-SHA2-192sSLH-DSALevel 348 B96 B15.8 KB2.0 ms100.0 ms / 6.0 ms
SLH-DSA-SHA2-256sSLH-DSALevel 564 B128 B29.1 KB4.0 ms200.0 ms / 10.0 ms
Developer Reference

Implementation Examples

Educational code samples demonstrating PQC algorithm usage. These examples show conceptual patterns - always use audited cryptographic libraries in production.

Key Encapsulation

ML-KEM (FIPS 203)

CRYSTALS-Kyber
// ML-KEM Key Encapsulation (Conceptual Example)
// Use a NIST-validated library like liboqs, PQClean, or AWS-LC

import { ML_KEM_768 } from '@example/pqc-lib';

// 1. Key Generation (receiver generates keypair)
const { publicKey, secretKey } = ML_KEM_768.keygen();
// publicKey: 1184 bytes | secretKey: 2400 bytes

// 2. Encapsulation (sender creates shared secret)
const { ciphertext, sharedSecret } = ML_KEM_768.encaps(publicKey);
// ciphertext: 1088 bytes | sharedSecret: 32 bytes

// 3. Decapsulation (receiver recovers shared secret)
const recoveredSecret = ML_KEM_768.decaps(ciphertext, secretKey);
// recoveredSecret === sharedSecret (32 bytes)

// 4. Use sharedSecret for symmetric encryption (AES-256-GCM)
const encrypted = AES_GCM.encrypt(plaintext, sharedSecret, nonce);

Security Note: ML-KEM-768 provides NIST Security Level 3 (equivalent to AES-192). For highest security, use ML-KEM-1024 (Level 5).

Digital Signature

ML-DSA (FIPS 204)

CRYSTALS-Dilithium
// ML-DSA Digital Signatures (Conceptual Example)
// Use a NIST-validated library for production

import { ML_DSA_65 } from '@example/pqc-lib';

// 1. Key Generation (signer generates keypair)
const { publicKey, secretKey } = ML_DSA_65.keygen();
// publicKey: 1952 bytes | secretKey: 4032 bytes

// 2. Sign a message
const message = new TextEncoder().encode('Document to sign');
const signature = ML_DSA_65.sign(message, secretKey);
// signature: 3293 bytes

// 3. Verify signature (anyone with publicKey)
const isValid = ML_DSA_65.verify(message, signature, publicKey);
// isValid: true if signature is authentic

// Common use cases:
// - Code signing and software updates
// - Document authentication
// - Certificate authorities (X.509)
// - Blockchain and smart contracts

Performance Tip: ML-DSA-65 offers the best balance of security (Level 3) and performance. ML-DSA-87 provides Level 5 security with larger signatures.

Hybrid Mode

X25519 + ML-KEM Hybrid

TLS 1.3 Compatible
// Hybrid Key Exchange (Defense in Depth)
// Combines classical and post-quantum algorithms

import { X25519, ML_KEM_768, HKDF_SHA256 } from '@example/crypto-lib';

// Classical component (X25519 ECDH)
const classicalKeyPair = X25519.generateKeyPair();
const classicalShared = X25519.computeShared(
  classicalKeyPair.secretKey,
  peerClassicalPublic
);

// Post-quantum component (ML-KEM)
const { ciphertext, sharedSecret: pqShared } = ML_KEM_768.encaps(
  peerPQPublic
);

// Combine both secrets using KDF
const hybridSecret = HKDF_SHA256.derive(
  [...classicalShared, ...pqShared],  // Combined input
  salt,
  'hybrid-tls-secret',
  32  // Output length
);

// Hybrid provides security even if one algorithm is broken

Recommendation: Use hybrid mode during the transition period. This ensures protection even if vulnerabilities are found in either classical or PQC algorithms.

Production-Ready Libraries

C/C++

  • liboqs - Open Quantum Safe
  • AWS-LC - AWS Libcrypto
  • BoringSSL - Google fork w/ PQC

Other Languages

  • liboqs-python - Python bindings
  • liboqs-go - Go bindings
  • liboqs-rust - Rust bindings

Always verify library implementations against NIST CAVP (Cryptographic Algorithm Validation Program) before production use.

NIST Security Levels

Level 1

Equivalent to AES-128 (128-bit security)

Level 2

Between AES-128 and AES-192

Level 3

Equivalent to AES-192 (192-bit security)

Level 4

Between AES-192 and AES-256

Level 5

Equivalent to AES-256 (256-bit security)

Need Help Selecting Algorithms?

Our team can help you evaluate your cryptographic requirements and select the optimal PQC algorithms for your specific use case.