NIST-Selected Backup KEM  |  Post-quantum  |  Code-based  |  HQC-128 • 192 • 256

HQC Post-Quantum Encryption

Generate quantum-resistant key pairs, encrypt messages with a public key and decrypt with the private key using HQC — the code-based Key Encapsulation Mechanism NIST selected in March 2025 as a mathematically independent backup to ML-KEM. If a future attack ever weakens lattice-based cryptography, HQC's security rests on a completely different hard problem.

1
Generate HQC Key Pair
Choose a security level and generate a quantum-resistant public/private key pair

2
Encrypt with Public Key
Encrypt a message using the public key (Hybrid: HQC + AES)
Public key auto-filled from Step 1. Just enter your message and click Encrypt.

3
Decrypt with Private Key
Recover the original message using the private key
Cipher text and private key auto-filled. Click Decrypt to recover your message.

HQC: NIST's Code-Based Backup to ML-KEM

HQC (Hamming Quasi-Cyclic) is a post-quantum Key Encapsulation Mechanism that NIST selected in March 2025 as a second, structurally independent KEM to sit alongside ML-KEM (FIPS 203). Where ML-KEM's security rests on lattice problems, HQC's security rests on the hardness of decoding random quasi-cyclic codes — a completely different mathematical foundation. If a future cryptanalytic breakthrough ever weakened lattice-based schemes, an HQC-based system would be unaffected. Status note: HQC is selected but not yet a final FIPS — NIST is still drafting the formal standard, expected in early 2026 with finalization projected for 2026–2027.

Parameter Sets

HQC VariantSecuritypk Sizesk SizeCiphertext
HQC-128128-bit~2,249 B~2,289 B~4,497 B
HQC-192192-bit~4,522 B~4,562 B~9,042 B
HQC-256256-bit~7,245 B~7,285 B~14,485 B

Recommended: HQC-192 for most applications. Note HQC's keys and ciphertexts run noticeably larger than ML-KEM's equivalent security levels — a trade-off for its different hardness assumption.

Security Analysis

AttackResistance
Shor's AlgorithmSecure — no exponential speedup against code-based decoding problems
Grover's AlgorithmOnly quadratic speedup — 256-bit key → 128-bit effective security
Information-Set Decoding AttacksBest known classical attacks remain far outside practical reach at HQC-128 and above

References

  1. NIST CSRC — PQC Standardization Process
  2. HQC official specification site
  3. Open Quantum Safe (OQS)
  4. KF-Cipher PQC Standards Tracker — live status of HQC and other NIST algorithms