{
  "slug": "hqc",
  "name": "HQC",
  "aka": "Hamming Quasi-Cyclic",
  "kind": "Key-encapsulation mechanism (KEM)",
  "family": "Code-based (quasi-cyclic codes)",
  "standard": "FIPS (no number yet)",
  "standard_url": "https://csrc.nist.gov/pubs/ir/8545/final",
  "body": "NIST",
  "date": null,
  "status": "Selected, in development",
  "summary": "HQC is the code-based KEM that NIST selected on 2025-03-11 (NIST IR 8545) as a backup to ML-KEM, so that a break of lattice cryptography does not leave the world without a standardized post-quantum KEM. As of November 2026 NIST says a FIPS specifying HQC-KEM is under development; no draft or document number has been published.",
  "parameter_sets": [
    {
      "name": "HQC-128",
      "category": 1,
      "pk": 2249,
      "sk": 2305,
      "ct_or_sig": 4433
    },
    {
      "name": "HQC-192",
      "category": 3,
      "pk": 4522,
      "sk": 4586,
      "ct_or_sig": 8978
    },
    {
      "name": "HQC-256",
      "category": 5,
      "pk": 7245,
      "sk": 7317,
      "ct_or_sig": 14421
    }
  ],
  "size_label": "Ciphertext (Round 4 submission sizes)",
  "deployments": [
    "Mullvad VPN apps since 2025.7 (2025-06-23): HQC-256 with ML-KEM-1024 for the WireGuard pre-shared key, ahead of any NIST draft",
    "Otherwise limited to liboqs, PQClean and reference code"
  ],
  "audit_focus": [
    "Constant-time decoding of the concatenated Reed-Muller / Reed-Solomon code",
    "Decryption-failure rate and its impact on IND-CCA security",
    "Quarkslab's 2025 work found correctness and security bugs in several HQC implementations; test against the latest specification",
    "Parameter and encoding changes between Round 4 and the draft standard"
  ],
  "references": [
    {
      "title": "NIST selects HQC as fifth algorithm (2025-03-11)",
      "url": "https://www.nist.gov/news-events/news/2025/03/nist-selects-hqc-fifth-algorithm-post-quantum-encryption"
    },
    {
      "title": "NIST IR 8545, Status report on the fourth round",
      "url": "https://csrc.nist.gov/pubs/ir/8545/final"
    },
    {
      "title": "Quarkslab: Finding bugs in implementations of HQC",
      "url": "https://blog.quarkslab.com/finding-bugs-in-implementations-of-hqc-the-fifth-post-quantum-standard.html"
    }
  ],
  "group": "kem",
  "date_note": "Selected 2025-03-11; no public draft as of 2026-11",
  "assumptions": [
    {
      "id": "qcsd",
      "role": "IND-CPA security reduces to decisional quasi-cyclic syndrome decoding; no hidden trapdoor code"
    },
    {
      "id": "random-oracle-model",
      "role": "Fujisaki-Okamoto-style transform in the ROM/QROM"
    },
    {
      "id": "hash-functions",
      "role": "SHAKE256 used as XOF and KDF"
    }
  ],
  "security": {
    "level": "draft",
    "note": "Selected as the non-lattice KEM; no published standard. Margins are narrow: a 2026 decoding improvement placed the lowest parameter set about 3 bits below target, and the error weights were raised. Implementations have a record of timing leakage, some of it compiler-induced."
  },
  "page": "https://pqt-19a6ffd695e12a.pages.dev/algorithms/hqc/",
  "reviewed": "2026-11-25",
  "events": [
    {
      "date": "2026-11-24",
      "title": "New generic syndrome-decoding records (length 580/weight 71; quasi-cyclic weight 64)",
      "summary": "Markku-Juhani Saarinen announced new records on the Decoding Challenge: random binary syndrome decoding at length 580 and weight 71 (2026-11-24, under 3 hours on 40 GH200 GPUs) and quasi-cyclic 'HQC-style' syndrome decoding at length 4098 and weight 64 (2026-09-30). These are challenge instances far smaller than the parameters of Classic McEliece or HQC and do not change their security estimates by themselves; the author noted that the quasi-cyclic instance was favourable and that new HQC estimates from this work are forthcoming.",
      "type": "cryptanalysis",
      "practicality": "theoretical",
      "action": "none",
      "affects": [
        "classic-mceliece",
        "hqc"
      ],
      "assumptions": [
        "syndrome-decoding",
        "qcsd"
      ],
      "id": "2026-11-24-new-generic-syndrome-decoding-records-length-580",
      "classification": "Theoretical result",
      "page": "https://pqt-19a6ffd695e12a.pages.dev/feed/2026-11-24-new-generic-syndrome-decoding-records-length-580/"
    },
    {
      "date": "2026-09-29",
      "title": "Germany: BSI advises against Classic McEliece in new developments after new cryptanalysis",
      "summary": "BSI published a note stating that Classic McEliece should currently no longer be used in new developments or new cryptographic planning, and recommends FrodoKEM, ML-KEM or (once standardized) HQC instead. It cites a series of 2026 structural attacks on Goppa-code McEliece, including claimed key-recovery complexities of 2^99 to 2^102 for the parameter sets BSI recommends, while noting the results are not yet fully peer-reviewed and do not enable a practical attack. BSI will revise its Classic McEliece recommendation in the next TR-02102-1, expected early 2027.",
      "type": "policy",
      "action": "monitor",
      "action_note": "Do not choose Classic McEliece for new designs. If you already deploy it, check that it is used in a hybrid and plan how you would replace it.",
      "affects": [
        "classic-mceliece",
        "frodokem",
        "ml-kem",
        "hqc"
      ],
      "assumptions": [
        "goppa-indistinguishability"
      ],
      "id": "2026-09-29-germany-bsi-advises-against-classic-mceliece-in",
      "classification": "Policy",
      "page": "https://pqt-19a6ffd695e12a.pages.dev/feed/2026-09-29-germany-bsi-advises-against-classic-mceliece-in/"
    },
    {
      "date": "2026-07-22",
      "title": "Improved ISD puts HQC-1 about 3 bits under target; HQC team raises error weights",
      "summary": "Carrier, Hatey, Luzzi and Tillich introduced MAGE-Stern, an information-set-decoding variant that amortizes Gaussian elimination, and estimated the HQC category 1 parameter set at about 140 bits in a logic-gate cost model, about 3 bits below the NIST target. On 2026-08-15 the HQC team proposed on pqc-forum to raise the error weights by one while keeping the code length, and on 2026-10-12 announced an updated specification that integrates the suggestions discussed on the list, ahead of the draft standard. The change is a margin adjustment before standardization, not a response to a feasible attack.",
      "type": "cryptanalysis",
      "practicality": "weakens",
      "action": "monitor",
      "affects": [
        "hqc"
      ],
      "assumptions": [
        "qcsd",
        "syndrome-decoding"
      ],
      "id": "2026-07-22-improved-isd-puts-hqc-1-about-3-bits-under-targe",
      "classification": "Reduced security margin",
      "page": "https://pqt-19a6ffd695e12a.pages.dev/feed/2026-07-22-improved-isd-puts-hqc-1-about-3-bits-under-targe/"
    },
    {
      "date": "2025-07-10",
      "title": "Clang-introduced secret-dependent branches in liboqs HQC leak the key (CVE-2025-52473)",
      "summary": "The HQC reference implementation in liboqs, when compiled with Clang 17 to 20 at optimization levels above -O0, contained several secret-dependent branches, and a proof-of-concept local attack recovered the entire secret key. It was fixed in liboqs 0.14.0. This is the same class of compiler-induced leak as Clangover in ML-KEM.",
      "type": "implementation",
      "practicality": "practical",
      "action": "patch",
      "affects": [
        "hqc"
      ],
      "id": "2025-07-10-clang-introduced-secret-dependent-branches-in-li",
      "classification": "Implementation vulnerability · Demonstrated",
      "page": "https://pqt-19a6ffd695e12a.pages.dev/feed/2025-07-10-clang-introduced-secret-dependent-branches-in-li/"
    },
    {
      "date": "2025-04-02",
      "title": "IND-CCA2 flaw in HQC's February 2025 specification: salt not covered by the FO check",
      "summary": "Markku-Juhani Saarinen reported on pqc-forum that in the HQC specification of 2025-02-19 the ciphertext salt was excluded from the Fujisaki-Okamoto re-encryption comparison and from the shared-secret hash, so two decapsulation queries reveal whether decryption failed, which defeats implicit rejection. The HQC team acknowledged it and announced a modification; liboqs disabled HQC by default from 0.13.0 pending an updated specification (CVE-2025-48946). The report came three weeks after NIST selected HQC and is not mentioned in NIST IR 8545; no key-recovery attack is known.",
      "type": "cryptanalysis",
      "practicality": "weakens",
      "action": "patch",
      "affects": [
        "hqc"
      ],
      "assumptions": [
        "random-oracle-model"
      ],
      "id": "2025-04-02-ind-cca2-flaw-in-hqc-s-february-2025-specificati",
      "classification": "Reduced security margin",
      "page": "https://pqt-19a6ffd695e12a.pages.dev/feed/2025-04-02-ind-cca2-flaw-in-hqc-s-february-2025-specificati/"
    },
    {
      "date": "2025-03-11",
      "title": "NIST selects HQC as a second KEM; fourth round ends (NIST IR 8545)",
      "summary": "NIST selected HQC, a code-based KEM, for standardization as an alternative to ML-KEM and published the fourth-round status report. BIKE and Classic McEliece were not selected. As of late November 2026 no draft HQC standard has been published.",
      "type": "selection",
      "affects": [
        "hqc",
        "classic-mceliece",
        "bike"
      ],
      "id": "2025-03-11-nist-selects-hqc-as-a-second-kem-fourth-round-en",
      "classification": "Selection",
      "page": "https://pqt-19a6ffd695e12a.pages.dev/feed/2025-03-11-nist-selects-hqc-as-a-second-kem-fourth-round-en/"
    },
    {
      "date": "2024-12-06",
      "title": "liboqs HQC decapsulation returned wrong secret for malformed ciphertexts (CVE-2024-54137)",
      "summary": "An indexing error in the HQC reference implementation shipped in liboqs (and PQClean) treated part of the secret key as non-secret data, so decapsulating a malformed ciphertext returned an incorrect shared secret. It was fixed in liboqs 0.12.0. This is a correctness bug in one code base; the advisory does not describe an exploit.",
      "type": "implementation",
      "practicality": "theoretical",
      "action": "patch",
      "affects": [
        "hqc"
      ],
      "id": "2024-12-06-liboqs-hqc-decapsulation-returned-wrong-secret-f",
      "classification": "Implementation vulnerability",
      "page": "https://pqt-19a6ffd695e12a.pages.dev/feed/2024-12-06-liboqs-hqc-decapsulation-returned-wrong-secret-f/"
    },
    {
      "date": "2022-06-08",
      "title": "Timing key-recovery attack on HQC (and BIKE) via rejection sampling in decapsulation",
      "summary": "Guo, Hlauschek, Johansson, Lahr, Nilsson and Schroeder showed that the rejection-sampling routine called during re-encryption in HQC decapsulation leaks secret-dependent timing, allowing key recovery with about 866,000 idealized timing-oracle queries at the 128-bit level. The preprint dates from November 2021 and the paper appeared in TCHES 2022(3). NIST IR 8545 notes that HQC later made several implementation changes to avoid timing attacks.",
      "type": "implementation",
      "practicality": "practical",
      "action": "patch",
      "affects": [
        "hqc"
      ],
      "id": "2022-06-08-timing-key-recovery-attack-on-hqc-and-bike-via-r",
      "classification": "Implementation vulnerability · Demonstrated",
      "page": "https://pqt-19a6ffd695e12a.pages.dev/feed/2022-06-08-timing-key-recovery-attack-on-hqc-and-bike-via-r/"
    }
  ],
  "deployments_table": "https://pqt-19a6ffd695e12a.pages.dev/deployments/?alg=hqc",
  "deployments_listed": [
    {
      "project": "Mullvad VPN",
      "org": "Mullvad",
      "use": "WireGuard pre-shared key exchange",
      "mechanism": "ML-KEM-1024 + HQC-256 (pre-standard)",
      "mode": "Default",
      "since": "2025-06-23",
      "version": "App 2025.7"
    }
  ]
}
