Internet-Draft HQC Security Considerations December 2026
Abapour & Banerjee Expires 7 June 2027 [Page]
Workgroup:
CFRG
Internet-Draft:
draft-na-cfrg-hqc-pqc-00
Published:
Intended Status:
Informational
Expires:
Authors:
N. Abapour
Nokia
A. Banerjee
Nokia

Hamming Quasi-Cyclic (HQC) Security Considerations

Abstract

Hamming Quasi-Cyclic (HQC) is a key encapsulation mechanism selected by NIST in 2025 for standardization, along with ML-KEM. Currently, NIST has specified HQC in the upcoming FIPS 207. The security of HQC is based on the difficulty of decoding random quasi-cyclic codes, which is a different assumption from the module lattice assumption of ML-KEM. This document discusses how to use HQC within protocols to highlight the problem it solves, security properties it provides, relevant attackers, and important points that implementers and protocol designers need to know to use it securely.

About This Document

This note is to be removed before publishing as an RFC.

Status information for this document may be found at https://datatracker.ietf.org/doc/draft-na-cfrg-hqc-pqc/.

Discussion of this document takes place on the cfrg Research Group mailing list (mailto:cfrg@ietf.org), which is archived at https://mailarchive.ietf.org/arch/browse/cfrg. Subscribe at https://www.ietf.org/mailman/listinfo/cfrg/.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 7 June 2027.

▲

Table of Contents

1. Introduction

1.1. Background

A Cryptographically Relevant Quantum Computer (CRQC) is a reliable quantum computational system that is large enough to have the capability to break the public key encryptions based on discrete logarithms and integer factorization, including Diffie-Hellman (DH), RSA, and Elliptic Curve Diffie-Hellman (ECDH), by using Shor's algorithm [RFC9958]. Of course, currently, at the time of writing, a CRQC does not exist yet, but an attacker can store encrypted traffic today and decrypt it later as soon as CRQC becomes available. This is why key establishment needs to immediately move to post-quantum algorithms before a CRQC exists [RFC9958], as in December 2026, the US National Security Agency [NSA26] and the UK National Cyber Security Centre [NCSC26] called for urgent action on this migration.

ML-KEM has been standardized by NIST in FIPS 203 [FIPS203], which is a key encapsulation mechanism based on module lattices. At the end of the fourth round of NIST's post-quantum standardization process in March 2025, Hamming Quasi-Cyclic (HQC) selected as a second key encapsulation mechanism, which is based on a different hardness assumption than ML-KEM, so a future cryptanalytic advance against lattice-based cryptography gives a standardized alternative deployment [NISTIR8545]. NIST is specifying HQC in FIPS 207 [FIPS207-PRES] under the name HQC-KEM.

As a code-based scheme, HQC's security is based on the difficulty of decoding random quasi-cyclic codes in the Hamming metric [AMBDGZ18] [HQC]. Unlike the McEliece family of code-based schemes, HQC does not hide the structure of an algebraic code in its public key (see Section 5.2.3).

The operations of HQC are slower than ML-KEM, and it has larger encapsulation keys and ciphertexts than ML-KEM (see Section 3.6) [I-D.preussmattsson-tls-hqckem]. Therefore, it seems to be a second post-quantum component together with ML-KEM in a hybrid construction, or as an alternative to ML-KEM, in deployments that need severe protection against a future attack [RFC9958] [I-D.preussmattsson-tls-hqckem] on lattice-based cryptography.

1.2. Key Encapsulation Mechanisms

As a public key mechanism, in Key Encapsulation Mechanism (KEM), two parties can establish a shared secret key [SP800-227]. In case of Alice and Bob, Alice starts by running the key generation procedure, which outputs an encapsulation key (also called public key), and a decapsulation key (also called private key) and sends the encapsulation key to Bob. Next, Bob runs the encapsulation procedure with the encapsulation key as input, which outputs a ciphertext and a shared secret key, and then sends the ciphertext to Alice. Afterward, runs the decapsulation procedure with the ciphertext and the decapsulation key as input, which outputs the same shared secret key. If an adversary observe the ciphertext and encapsulation key, he will not be able learn any information about the shared secret key. For HQC, this shared secret key is always 32 bytes long.

Note that in HQC, Bob does not freely choose the shared secret key to encrypt it for Alice. The procedure of encapsulation in HQC generates the shared secret key with a hash function from a random message, a random salt, and the encapsulation key of Alice [HQC]. Although Bob is able to execute encapsulation function multiple times and select one of the output pairs of ciphertext and shared secret key, he can not make the shared secret key equal to a chosen value. Moreover, Bob is not able to force two exchanges' shared secret keys with different encapsulation keys equal, because the content of encapsulation key is an input of the hash function itself that derives the value of shared secret key.

In some protocols, a KEM is able to substitute Diffie-Hellman, but not in all protocols [RFC9958]. It can substitute ephemeral Diffie-Hellman in key exchange protocols such as TLS [RFC9846] and IKEv2 [RFC7296] and the Diffie-Hellman operation of Hybrid Public Key Encryption (HPKE) [RFC9180], but it cannot directly substitute Diffie-Hellman where both parties use long-term keys or where a protocol uses the non-interactive property of Diffie-Hellman [RFC9958] [I-D.irtf-cfrg-ml-kem-security-considerations] (e.g., for implicit authentication).

HQC has the capability to be used for public key algorithms inside HPKE [RFC9180] [I-D.reddy-hpke-hqc]. The public key encryption scheme HQC-PKE is such an example that is used within HQC-KEM, but it only provides security against passive adversaries, thus, it is not intended for direct use (see Section 5.4).

1.3. Scope of This Document

This document goes through how to utilize HQC securely, which security properties it provides and which assumptions they are based on, which attacks against HQC are known, and which implementation and deployment considerations apply. This document is intended for designers of protocols that use HQC, implementers of HQC, and for reviewers of such protocols. This document does not specify HQC, which is specified in [HQC] and will be specified in FIPS 207.

At the time of writing, NIST has not published FIPS 207 yet. This document is mostly based on HQC specification version 5.1 (November 9, 2026) [HQC], which includes the changes that NIST has presented as planned for FIPS 207 [FIPS207-PRES] (see Section 3.7). Section and table numbers that refer to [HQC] refer to that version. Parameter set names, encodings, and input checks in FIPS 207 might be different than those of [HQC], and implementations of FIPS 207 need to follow FIPS 207 where the two documents differ.

This document follows the structure of [I-D.irtf-cfrg-ml-kem-security-considerations], which discusses the same questions for ML-KEM. Appendix A lists the changes in the history of the HQC specification that are relevant to security.

2. Conventions and Definitions

2.1. Requirements Language

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

2.2. Terminology

Key Encapsulation Mechanism (KEM): A tuple of procedures consists of key generation, encapsulation, and decapsulation, as described in Section 1.2 [SP800-227]. This document uses ek to denote encapsulation key, dk for the decapsulation key, c for the ciphertext, and K for the 32-byte shared secret key.

Public Key Encryption (PKE): A tuple of procedures for key generation, encryption, and decryption functions.

Fujisaki-Okamoto (FO) transform: A general technique for transforming a PKE (secure against passive attacker) into a KEM (secure against active attacker). This method derives the encryption randomness from the message with a hash function, and it does a re-encryption check [FO99] [FO13] [HHK17], where decapsulation encrypts the decrypted message again and compares the result with the value of received ciphertext.

Implicit rejection: This is one of KEM's behavior that if the re-encryption check fails, it outputs a pseudorandom key derived from a secret value and the ciphertext [HHK17], and does not output an error.

Decryption Failure Rate (DFR): The probability that decapsulation of the ciphertext generated honestly does not return the encrypted message such that both parties get different keys, on the average for all possible keys and for randomness [HHK17] [HQC] used in encapsulation.

Information Set Decoding (ISD): Family of algorithms which forms the foundation for the best attacks against HQC code [Prange62] [HQC] is a family of algorithms for decoding random linear codes.

IND-CPA: Indistinguishability under chosen plaintext attack [SP800-227], which is in fact, the standard notion for the security against passive attackers.

IND-CCA2: Indistinguishability under adaptive chosen ciphertext attack [SP800-227], which is the standard notion for the security against active attackers who are able to obtain decapsulations of ciphertexts of their choice.

Random Bit Generator (RBG): A generator of random bits, such as the deterministic random bit generators specified in [SP800-90A] with an entropy source as specified in [SP800-90B].

Extendable-Output Function (XOF): A function whose output can be extended to any desired length (e.g. SHAKE256 [FIPS202]).

Security category: One of the five classes established by NIST for assessing the security of post-quantum cryptographic schemes. Classes 1, 3, and 5 stipulate that an attack must be computationally at least as expensive as searching for a key in AES-128, AES-192, and AES-256 [NISTPQC-CFP], respectively.

2.3. Notation

This document uses the following notation, which mostly follows [HQC]. Let $\mathbb{F}_2$ to denote binary field, and $\mathbb{F}_2^n$ for showing $n$ length vector space of binary vectors. The ring $\mathcal{R}=\mathbb{F}_2[X]/(X^n-1)$ is the ring of binary polynomials in the indeterminate $X$ reduced modulo $X^n-1$. An element of $\mathcal{R}$ is identified with the vector of its $n$ coefficients. $a+b$ and $a\cdot b$ denote the sum and the product of two elements $a$ and $b$ of $\mathcal{R}$. Since $\mathcal{R}$ has characteristic two, subtraction $a-b$ coincides with addition $a+b$, but this document, for readability, keeps the minus sign where [HQC] uses it.

The Hamming weight of a vector is the number of nonzero entries in that vector. The set of all entries of the $\mathcal{R}$ with Hamming weight $w$ will be denoted by $\mathcal{R}_w$. The $n\times n$ circulant matrix $\mathrm{rot}(a)$ of a vector $a$ is the one whose columns are all cyclic shifts of $a$.

The concatenation of the byte strings $a$ and $b$ is denoted as $a\Vert b$. For any real number $z$, its ceiling function $\lceil z\rceil$ denotes the smallest integer greater than or equal to $z$, while its floor function $\lfloor z\rfloor$ denotes the largest integer less than or equal to $z$. Given two integers $a$ and $b$, the modulus of $a$ by $b$ is denoted as $a \bmod b$, and the binomial coefficient is denoted as $\binom{a}{b}$.

In the figures and tables, only ASCII symbols are used. The following symbols have been used in them: R is the ring $\mathcal{R}$, <- indicates assignment, <-$ indicates sampling from an RBG, || indicates concatenation, * is the multiplication operation in R, + and - indicate addition in R, != means unequal, ^ means power, B^L is the set of byte strings of length L, byte(i) is the byte with integer value i, and # indicates a comment.

3. Overview of HQC

This section summarizes the design of HQC as far as the discussion in Section 5 needs it. In case of a difference, [HQC] and, after its publication, FIPS 207 take precedence over this section.

3.1. Mathematical Setting

HQC operates in the ring $\mathcal{R}$ of a prime length $n$ for which 2 is a primitive root modulo $n$, in other words, the multiplicative order of 2 modulo $n$ is $n-1$ (Section 2.3 of [HQC]). In this case, the polynomial $X^n-1$ splits in $\mathbb{F}_2$ into $X^n-1=(X-1)\cdot\Phi_n(X)$, where $\Phi_n(X)=1+X+\dots+X^{n-1}$ is the cyclotomic polynomial, which is irreducible, since the degree of an irreducible factor of $\Phi_n$ over $\mathbb{F}_2$ coincides with the multiplicative order of 2 modulo $n$. Applying the Chinese remainder theorem, $\mathcal{R}$ is isomorphic to the direct product $\mathbb{F}_2\times\mathbb{F}_{2^{n-1}}$ of the binary field and the finite field $\mathbb{F}_{2^{n-1}}$ with $2^{n-1}$ elements. The first component of this isomorphism is the evaluation homomorphism of a polynomial $a$ at 1, and hence it takes value equal to the parity of the Hamming weight of $a$. Section 5.2.2 and Section 5.3.2 provide the motivation for using such construction.

The product a⋅b in R is a linear map in a, defined as the product of a with the circulant matrix rot(b) (Section 2.1 of [HQC]). If the parity check matrix of a linear code consists of circulant matrices, the code is called a quasi-cyclic code, i.e., a cyclic shift of all blocks of a codeword results in another codeword (Section 2.2 of [HQC]). The HQC code utilizes secret vectors and encryption randomness of low fixed Hamming weight (Section 6.1.1 of [HQC]), about sqrt(n).

3.2. The Public Error-Correcting Code

HQC decryption works using a public binary linear code $\mathcal{C}$ of length $n_1 n_2$ and rank $k$, where the length $k$ of the message is 128, 192, or 256 bits and equals the security level of the parameter set (Section 3.5 of [HQC]). Code $\mathcal{C}$ is a concatenated code. The outer code of $\mathcal{C}$ is a shortened Reed-Solomon code of length $n_1$, rank $k_1=k/8$, and minimum distance $d_1=2t_1+1$ on the field $\mathbb{F}_{2^8}$ of 256 elements, which corrects up to $t_1$ symbol errors, where $t_1$ is the error-correcting capacity. The inner code of $\mathcal{C}$ is the first order Reed-Muller code RM(1,7) of length 128, rank 8, and minimum distance 64, where every codeword is repeated three (HQC-1), five (HQC-3, and HQC-5) times. The resulted repeated Reed-Muller code has the length $n_2$ of 384 or 640 bits and minimum distance $d_2=n_2/2$. In [HQC], $n_2'$ denotes the length in bits and $n_2$ denotes the same length in bytes. Every byte of a Reed-Solomon codeword is encoded with the repeated Reed-Muller code and the minimum distance of $\mathcal{C}$ is at least $d_1 d_2$.

Firstly, a maximum likelihood decoder is applied to each block of the inner code using the fast Hadamard transform, followed by a Reed-Solomon decoder based on the Berlekamp algorithm and Forney formula (Section 3.5 of [HQC]). Both of the decoders always output a message without ever failing to decode. The encoding and decoding procedures of $\mathcal{C}$ are $\mathcal{C}.\mathrm{Encode}$ and $\mathcal{C}.\mathrm{Decode}$, respectively.

The length $n_1 n_2$ of $\mathcal{C}$ is composite. Thus, HQC runs over the ring $\mathcal{R}$ with the length $n$, which is the least prime number greater than $n_1 n_2$ such that 2 is a primitive root modulo $n$, and $\mathrm{Truncate}(\cdot,\ell)$ truncates the last $\ell = n-n_1 n_2$ bits of a vector (Section 2.3 of [HQC]) where necessary.

3.3. HQC-PKE

Public Key Encryption scheme for HQC (Section 3.6 of [HQC]) is called HQC-PKE. Decryption key is a 32-byte seed that defines two secret vectors $x$ and $y$ of $\mathcal{R}_\omega$, where $\omega$ is the secret weight and decryption works with $y$. Encryption key is comprised of a uniformly chosen vector $h$ of $\mathcal{R}$ that can be defined by a 32-byte seed and a syndrome $s=x+h\cdot y$.

For encryption of a message $m$ with length $k$ bits using a seed $\theta$ of 32 bytes for encryption randomness, the sender extracts from the seed $\theta$ two vectors $r_1$ and $r_2$ of $\mathcal{R}$ with Hamming weight $\omega_r$ and a vector $e$ of Hamming weight $\omega_e$, where $\omega_r$ and $\omega_e$ are the weight parameters, to compute the two ciphertexts pieces

math u = r_1 + h\cdot r_2, \qquad v = \mathcal{C}.\mathrm{Encode}(m) + \mathrm{Truncate}(s\cdot r_2 + e,\ \ell).

The receiver computes $v-\mathrm{Truncate}(u\cdot y,\ell)$ and decodes it with $\mathcal{C}$. Since $s\cdot r_2-u\cdot y=x\cdot r_2-r_1\cdot y$, the receiver obtains

math v - \mathrm{Truncate}(u\cdot y,\ \ell) = \mathcal{C}.\mathrm{Encode}(m) + \mathrm{Truncate}(e',\ \ell), \qquad e' = x\cdot r_2 - r_1\cdot y + e ,

where $e'$ is the decryption error vector. Thus, decryption will result in $m$ if the decoder of $\mathcal{C}$ is able to correct the truncated error vector. The weight of this vector in HQC-1 case is approximately 6093 on average and code length is 17664 (Table 15 of [HQC]); the decoder is able to correct the random error vector with high probability. This issue is discussed in Section 5.6.

The three algorithms of HQC-PKE are illustrated in Figure 1, according to Section 3.6 of [HQC]. In the above figure and the figures to follow, seed_PKE, seed_dk, and seed_ek are 32-byte seeds, XOF(a) is the application of SHAKE256 on the byte sequence a considered as a stream of output bytes read sequentially, w, w_r, and w_e denote $\omega$, $\omega_r$, and $\omega_e$, respectively, and l denotes $\ell$. The function I is defined in Section 3.5, while the functions SampleVect and SampleFixedWeightVect, and the variant of SampleFixedWeightVect whose name ends with a dollar sign are presented below.

   HQC-PKE.KeyGen(seed_PKE):
     1. (seed_dk, seed_ek) <- I(seed_PKE)    # two 32-byte halves
     2. ctx_dk <- XOF(seed_dk)
     3. y <- SampleFixedWeightVect$(ctx_dk, w)
     4. x <- SampleFixedWeightVect$(ctx_dk, w)
     5. h <- SampleVect(XOF(seed_ek))
     6. s <- x + h * y
     7. return ek_PKE = (seed_ek, s), dk_PKE = seed_dk

   HQC-PKE.Encrypt(ek_PKE, m, theta):
     1. (seed_ek, s) <- ek_PKE
     2. h <- SampleVect(XOF(seed_ek))
     3. ctx_theta <- XOF(theta)
     4. r2 <- SampleFixedWeightVect(ctx_theta, w_r)
     5. e  <- SampleFixedWeightVect(ctx_theta, w_e)
     6. r1 <- SampleFixedWeightVect(ctx_theta, w_r)
     7. u <- r1 + h * r2
     8. v <- C.Encode(m) + Truncate(s * r2 + e, l)
     9. return c_PKE = (u, v)

   HQC-PKE.Decrypt(dk_PKE, c_PKE):
     1. y <- SampleFixedWeightVect$(XOF(dk_PKE), w)
     2. (u, v) <- c_PKE
     3. return m' <- C.Decode(v - Truncate(u * y, l))

                    Figure 1: The algorithms of HQC-PKE

The sample function SampleVect draws $\lceil n/8\rceil$ bytes from the XOF and makes sure that the leftover bits in the final byte are all zero. This function does not do rejection sampling, and thus its time complexity is independent of its inputs (Section 3.3 of [HQC]). The variant of the function SampleFixedWeightVect which has a dollar sign in the end samples a uniformly distributed random vector with a fixed Hamming weight using rejection sampling, and this function is used by HQC for the secret vectors $x$ and $y$. The function SampleFixedWeightVect itself draws a fixed number of bytes from the XOF and outputs a vector with a certain Hamming weight whose distribution is very close to, but not exactly equal to, uniform (Section 3.3 of [HQC]). HQC uses this function for the random vectors $r_1$, $r_2$, and $e$.

3.4. HQC-KEM

The HQC-KEM is derived from HQC-PKE by the salted version of the Fujisaki-Okamoto transformation with implicit rejection (Section 3.7 of [HQC]) [GHS26]. Algorithms for the scheme are illustrated in Fig. 2. In Fig. 2, k/8 is the length of the message in bytes (16, 24, or 32), G, H, and J are the hash functions from Section 3.5, ek and dk are the keys for encapsulation and decapsulation respectively, salt is a 16-byte salt, sigma is the implicit rejection secret $\sigma$ of length k/8, K is the shared key, Kbar is the rejection key $\bar{K}$, and c is the ciphertext.

   HQC-KEM.KeyGen():
     1. seed_KEM <-$ B^32
     2. ctx <- XOF(seed_KEM || byte(k/8))
     3. seed_PKE <- next 32 bytes of ctx
     4. (ek_PKE, dk_PKE) <- HQC-PKE.KeyGen(seed_PKE)
     5. return ek = ek_PKE, dk = seed_KEM

   HQC-KEM.Encaps(ek):
     1. m <-$ B^(k/8)
     2. salt <-$ B^16
     3. (K, theta) <- G(H(ek) || m || salt)  # 32 + 32 bytes
     4. c_PKE <- HQC-PKE.Encrypt(ek, m, theta)
     5. return (K, c = (c_PKE, salt))

   HQC-KEM.Decaps(dk, c):
     1. ctx <- XOF(dk || byte(k/8))
     2. seed_PKE <- next 32 bytes of ctx
     3. (ek_PKE, dk_PKE) <- HQC-PKE.KeyGen(seed_PKE)
     4. sigma <- next k/8 bytes of ctx
     5. (c_PKE, salt) <- c
     6. m' <- HQC-PKE.Decrypt(dk_PKE, c_PKE)
     7. (K', theta') <- G(H(ek_PKE) || m' || salt)
     8. c' <- (HQC-PKE.Encrypt(ek_PKE, m', theta'), salt)
     9. Kbar <- J(H(ek_PKE) || sigma || c)
    10. if c' != c then K' <- Kbar          # in constant time
    11. return K'

                    Figure 2: The algorithms of HQC-KEM

Key generation generates all key material from one 32-byte seed $\mathsf{seed}_{\mathrm{KEM}}$, which is the only randomness used. The byte k/8 that gets concatenated to the seed ensures that keys derived from the same seed differ between different parameter sets. The decapsulation key is just the seed itself, and the decapsulation operation computes the key pair of HQC-PKE and the secret $\sigma$ from the seed again (Section 3.7 of [HQC]) (cf. Section 5.11.1 for the choice of an expanded key).

The encapsulation operation samples a message $m$ of $k$ bits and a salt of 128 bits, hashes the encapsulation key with H, derives the shared secret key $K$ and the encryption seed $\theta$ from the hash of the encapsulation key, the message, and the salt with G, and then encrypts $m$ with HQC-PKE using $\theta$. The ciphertext comprises the ciphertext of HQC-PKE and the salt, which is transmitted in plaintext.

Decapsulation performs a decryption of the HQC-PKE ciphertext and extracts the candidate key $K'$ and the encryption seed $\theta'$ from the decrypted message $m'$ to re-encrypt $m'$. If the obtained value coincides with the received ciphertext, decapsulation returns $K'$, which equals $K$ in case of successful decryption. In any other case, decapsulation returns the rejection key $\bar{K}$, defined as a hash of the encapsulation key, the secret $\sigma$, and the received ciphertext. The latter scenario is referred to as implicit rejection due to the random-looking appearance of the output key. [HQC] also mentions decoding failure $m'=\bot$ as one of the causes of rejection; however, given that the decoders of $\mathcal{C}$ do not produce an error signal (see Section 3.2), the sole criterion is the equality of the ciphertexts.

3.5. Symmetric Primitives

HQC uses SHAKE256, SHA3-512, and SHA3-256 [FIPS202], with a one-byte domain separator appended to the input of each hash function (Section 3.1 of [HQC]). Table 1 lists these functions.

   +==========+=================================+=================+
   | Function | Instantiation                   | Output length   |
   +==========+=================================+=================+
   | XOF      | SHAKE256(str)                   | as needed       |
   +----------+---------------------------------+-----------------+
   | G        | SHA3-512(str || byte(0x00))     | 64 bytes        |
   +----------+---------------------------------+-----------------+
   | H        | SHA3-256(str || byte(0x01))     | 32 bytes        |
   +----------+---------------------------------+-----------------+
   | I        | SHA3-512(str || byte(0x02))     | 64 bytes        |
   +----------+---------------------------------+-----------------+
   | J        | SHA3-256(str || byte(0x03))     | 32 bytes        |
   +----------+---------------------------------+-----------------+

            Table 1: XOF and hash functions of HQC [HQC]

In this table, str denotes the input byte string. The output of G is split into the 32-byte shared secret key K and the 32-byte encryption seed theta, and the output of I is split into the two 32-byte seeds seed_dk and seed_ek. In the security proofs, the hash functions are modeled as random oracles (Section 5.5).

3.6. Parameter Sets

[HQC] specifies three parameter sets, HQC-1, HQC-3, and HQC-5, which target NIST security categories 1, 3, and 5, respectively (Table 8 of [HQC]). Table 2 lists their parameters. In this table and the following ones, n_1, n_2, t_1, w, w_r, w_e, and l stand for $n_1$, $n_2$, $t_1$, $\omega$, $\omega_r$, $\omega_e$, and $\ell$, and n_2 is given in bits.

   +==========+=======+=====+=====+=====+====+=====+=====+===========+
   | Instance |   n   | n_1 | n_2 | t_1 |  l |  k  |  w  | w_r = w_e |
   +==========+=======+=====+=====+=====+====+=====+=====+===========+
   | HQC-1    | 17669 |  46 | 384 |  15 |  5 | 128 |  67 |     76    |
   +----------+-------+-----+-----+-----+----+-----+-----+-----------+
   | HQC-3    | 35851 |  56 | 640 |  16 | 11 | 192 | 101 |    114    |
   +----------+-------+-----+-----+-----+----+-----+-----+-----------+
   | HQC-5    | 57637 |  90 | 640 |  29 | 37 | 256 | 132 |    150    |
   +----------+-------+-----+-----+-----+----+-----+-----+-----------+

          Table 2: Parameters of HQC [HQC, Tables 6, 7, and 8]

Table 3 shows the sizes of the cryptographic material of HQC for each parameter set and its security category, in the format of [I-D.irtf-cfrg-ml-kem-security-considerations]. Section 5.11 describes the encodings of the encapsulation key and of the ciphertext.

   +==========+=========+=========+=========+=========+===========+
   |          | ek size | dk size | ct size | ss size | as strong |
   |          |         |         |         |         |     as    |
   +==========+=========+=========+=========+=========+===========+
   | HQC-1    |   2241  |    32   |   4433  |    32   |  AES-128  |
   +----------+---------+---------+---------+---------+-----------+
   | HQC-3    |   4514  |    32   |   8978  |    32   |  AES-192  |
   +----------+---------+---------+---------+---------+-----------+
   | HQC-5    |   7237  |    32   |  14421  |    32   |  AES-256  |
   +----------+---------+---------+---------+---------+-----------+

     Table 3: ek = encapsulation key, dk = decapsulation key in seed
     format, ct = ciphertext, ss = shared secret key, all lengths in
                          bytes [HQC, Table 9]

The size of the encapsulation key in HQC-1 is approximately 2.8 times greater than the size of the encapsulation key in ML-KEM-512, and the size of its ciphertext is approximately 5.8 times greater than that of ML-KEM-512 [FIPS203]. For HQC-5 and ML-KEM-1024, the figures are approximately 4.6 and 9.2, respectively. The size of the ciphertext in HQC is approximately double the size of its encapsulation key, which affects protocols where the responder sends the ciphertext (Section 5.17).

Table 4 provides an example of the performance of the optimized implementation of [HQC] on one particular platform (Table 11 of [HQC]). The decapsulation operations include generation of the key pair from the seed that the application does not perform when maintaining the expanded decapsulation key (see Section 5.11.1).

   +==========+================+===============+===============+
   |          | key generation | encapsulation | decapsulation |
   +==========+================+===============+===============+
   | HQC-1    |             75 |           152 |           375 |
   +----------+----------------+---------------+---------------+
   | HQC-3    |            175 |           349 |           812 |
   +----------+----------------+---------------+---------------+
   | HQC-5    |            355 |           712 |          1624 |
   +----------+----------------+---------------+---------------+

     Table 4: Performance in thousands of CPU cycles (lower is better)
            on an Intel Core i7-11850H with AVX2 [HQC, Table 11]

3.7. Relationship to FIPS 207

In September 2025, NIST proposed the amendments to the fourth round specification of HQC that were under consideration for FIPS 207 [FIPS207-PRES]. These amendments include the salted transform with the shared secret key being a derived function of the message (Section 5.5.1), the use of the whole encapsulation key and of the salt for the derivation of the shared secret key and of the encryption randomness, the removal of $x$ from the decapsulation key and the introduction of the seed into the decapsulation key, the new sampler of the fixed weight vectors, SHA3-512 for the expansion of the seed in the key generation, and the length of 32 bytes of the shared secret key and the encryption randomness. Version 5.0 of [HQC] (22 August 2025) incorporates all these amendments.

NIST also requested comments on the possibility of using the seed alone as the decapsulation key and a one-byte confirmation code (Section 5.15) [FIPS207-PRES]. Version 5.1 of [HQC] incorporates the seed as the default form of the decapsulation key, improves the analysis of the decryption failure rate, introduces the updated weight parameters (see Section 5.3.1), and changes the polynomial of $\mathbb{F}_{2^8}$. However, it does not incorporate the confirmation code [HQC] in this process.

Keys, ciphertexts, and known answer values in various versions of [HQC] are not interoperable (see Appendix A), and FIPS 207 could potentially be incompatible with [HQC] in terms of names, encoding, and input validation. Protocol definitions MUST indicate the version of HQC they support and, once FIPS 207 is finalized, SHOULD support FIPS 207. Older versions of [HQC] than version 5.0 lack the fix for the problem addressed in Section 5.8, and they MUST NOT be supported. An implementation MUST NOT try to decode keys or ciphertexts of one version using algorithms of another version and MUST NOT reattempt decapsulation in another version [I-D.reddy-hpke-hqc] in case of failure.

4. Using HQC

To use HQC, there are three steps, which correspond to the three algorithms of HQC-KEM in Figure 2.

4.1. HQC Key Generation

The first step for Alice is to generate an encapsulation key and a decapsulation key.

Alice executes HQC-KEM.KeyGen() (Section 3.7 of [HQC]). This operation consists of calling the RBG once for obtaining a 32-byte seed, deriving the key pair of HQC-PKE from this seed, and returning the encapsulation key and the decapsulation key, that is, the seed itself. The RBG requires a security strength no less than the security level of the parameter set (see Section 5.10).

The seed completely determines the key pair. It should remain secret and tamper-proof, and therefore should be treated with the same care as any other private key [SP800-227]. All other values generated during the key derivation process, in particular the vectors $x$ and $y$ and the derived seeds, are temporary values and should be destroyed once the key generation process is completed [SP800-227], with the exception of the values that an implementation maintains in a secure cache of the expanded key (see Section 5.11.1).

The encapsulation key can be published, and Bob needs it for the next step. It does not need to be kept secret, but its integrity needs to be protected (see Section 5.6.3).

Section 5.11.1 describes the checks of the consistency of a key pair.

4.2. HQC Encapsulation

The second step is for Bob to generate a ciphertext and a shared secret key.

Having obtained Alice’s encapsulation key through the process discussed in Section 5.11.2, Bob now executes HQC-KEM.Encaps() (Section 3.7 of [HQC]). The function invokes RBG to generate a message of $k$ bits and 16 bytes of salt and returns a ciphertext along with a 32-byte shared secret key. Intermediate values that are dependent upon the message, specifically $m$, $\theta$, $r_1$, $r_2$, and $e$, need to be deleted after the encapsulation process [SP800-227]. Values that depend solely on the encapsulation key, like the vector $h$ and hash of the encapsulation key, can be retained for future use during encapsulations [SP800-227] using the same key.

Bob sends the ciphertext, which contains the salt in the clear (see Section 5.10), to Alice. If the exchange is successful, Alice obtains the same shared secret key.

4.3. HQC Decapsulation

The third and final step is for Alice to compute the shared secret key from the ciphertext.

Firstly, Alice verifies the ciphertext according to the process from Section 5.11.3 and calls HQC-KEM.Decaps() (Section 3.7 of [HQC]). The function calculates the key pair of HQC-PKE and the secret $\sigma$, obtained from the seed, decrypts the ciphertext, encrypts the plaintext again and compares the result with the ciphertext, outputting a 32-byte shared secret key. In case of a failed comparison, the result is the rejection key, which is independent of the shared secret key of Bob and does not give any information to the adversary.

The re-encryption check is not required for the correct execution of the key exchange process by honest participants, however, skipping the check is not allowed. Without it, the adversary, sending arbitrary ciphertexts, can retrieve the decapsulation key [XIUTH21] (see Section 5.8 and Section 5.15). The decapsulation procedure must be performed in constant time with regard to all the secret data, in particular, to the comparison result (see Section 5.14). The intermediate data must be destroyed [SP800-227] upon finishing decapsulation.

In case the process succeeds, the shared secret keys of Alice and Bob would be identical. However, with a certain probability, which is at most equal to the decryption failure rate of the parameter set, Alice and Bob will have different keys despite the fact that both of them are honest parties (refer to Section 5.6.1).

For a static key pair, the check of the decapsulation key, which for the seed format is a check of its length, needs to be done only once, whereas the checks of the ciphertext are needed for each incoming ciphertext.

4.4. Selection of the Parameter Set

Among the parameter sets of Section 3.6, HQC-1 has the shortest keys and ciphertexts. The HQC-3 and HQC-5 parameter sets have greater security margins for future improvements of attacks at the expense of longer messages and slower processing. For this reason, HQC-3 and HQC-5 are favored over HQC-1 in [I-D.reddy-hpke-hqc], and HQC-3 and HQC-5 are used in the hybrid ciphersuites of [I-D.preussmattsson-tls-hqckem]. Applications protecting sensitive data with long-term confidentiality requirements may prefer HQC-3 or HQC-5.

Both parties should select the parameter set from the context of the protocol, e.g., an agreed algorithm identifier, and not the length of a key. For example, the decapsulation keys in seed format have the same length across all parameter sets [I-D.reddy-hpke-hqc].

5. HQC Security Considerations

Note that this section pertains specifically to HQC, and may not be true of KEMs in general.

5.1. Security Goals and Threat Model

The basic security guarantee of HQC is that the attacker who has access to the encryption key and the ciphertext is not able to calculate the shared key or anything about the shared key, despite the fact that the attacker also has access to a CRQC [HQC] [NISTIR8545]. HQC-KEM is designed to be IND-CCA2 secure, so this will continue to be the case even when the attacker is able to provide arbitrary ciphertexts except for the targeted ciphertext to be decrypted with the targeted decryption key and to observe the resulting shared secret keys [SP800-227]. From the perspective of practice, IND-CCA2 guarantees the security of HQC usage with static keys (see Section 5.12).

The security analysis of HQC, and this document, consider an adversary with the following capabilities.

  • Adversaries can perform classical and quantum computations, including quantum evaluation of public functions like the hash functions, but they have classical access to the decapsulation [NISTPQC-CFP] with the target key.

  • Adversaries can obtain the decapsulation of up to $2^{64}$ ciphertexts of their choice per each decapsulation key; $2^{64}$ is the value that NIST uses [NISTPQC-CFP] when considering the strength of the security estimates.

  • Adversaries can obtain numerous encapsulation keys and numerous ciphertexts (see Section 5.7).

  • In certain cases, adversaries can control the choice and modification of the keys and ciphertexts, which are processed by other parties (Section 5.6.3 and Section 5.9).

  • In certain situations, the adversary can measure physical characteristics of the implementation such as the timing or power consumption or can introduce faults (see Section 5.14 and Section 5.15).

However, HQC alone neither authenticates the two entities, nor proves that both entities have arrived at the same key value (Section 5.13), neither guarantees forward secrecy when the same key pair is used in multiple sessions (Section 5.12), nor assures the protection of the integrity of the encryption key in its distribution process, nor binds the shared secret key to the context of the protocol, including identities and transcript. Any protocol that requires these features should find ways to guarantee them [RFC9958] [SP800-227] in practice.

5.2. Hardness Assumptions

5.2.1. Syndrome Decoding Problems

The hardness of HQC relies on a syndrome decoding problem or its variants (Section 2.3 of [HQC]). Consider a binary linear code with length $N$ and dimension $D$, characterized by a parity check matrix $\mathbf{H}$ of size $(N-D)\times N$. The syndrome of a vector $\mathbf{a}$ of length $N$ is defined as the vector $\mathbf{H}\mathbf{a}^{\top}$, where $\top$ is the transpose operator. The syndrome decoding problem with target weight $t$ is formulated as follows: given a uniformly random matrix $\mathbf{H}$ and the syndrome $\mathbf{z}^{\top}=\mathbf{H}\mathbf{a}^{\top}$ of a vector $\mathbf{a}$ of Hamming weight $t$, compute a vector of Hamming weight $t$ whose syndrome is equal to $\mathbf{z}$. The decisional version of this problem is to distinguish such a pair $(\mathbf{H},\mathbf{z})$ from a uniformly random one.

The syndrome decoding problem is the problem of decoding a random linear code, and it can also be seen as the Learning Parity with Noise problem (Section 2.3 of [HQC]) with a fixed number of samples.

In HQC, the parity check matrices consist of circulant blocks, so that the relevant problems are quasi-cyclic syndrome decoding (QCSD) problems (Section 2.3 of [HQC]). Two of them appear in the security proof of HQC-PKE (Section 5.4).

  • The key recovery problem is to determine $x$ and $y$ from $h$ and $s=x+h\cdot y$. This problem is equivalent to syndrome decoding with respect to the code having the parity-check matrix $(\mathbf{I}_n\ \ \mathrm{rot}(h))$ with $\mathbf{I}_n$ being an $n$-size identity matrix. The code length equals $2n$, its rate equals $1/2$, and the weight of the error equals $2\omega$. The decisional version of the problem is 2-DQCSD.

  • The ciphertext problem is about the constituents of a ciphertext where $u=r_1+h\cdot r_2$ and $v-\mathcal{C}.\mathrm{Encode}(m)$ is equal to $\mathrm{Truncate}(e+s\cdot r_2,\ell)$. Until the truncation, the vector whose elements are $u$ and $v-\mathcal{C}.\mathrm{Encode}(m)$ is the syndrome of the vector $(r_1,e,r_2)$ in the code whose parity-check matrix is shown below, and $\mathbf{0}$ denotes the zero matrix of order $n$. The code has a length of $3n$ and a rate of $1/3$, while the weight of the error is $2\omega_r+\omega_e=$ $3\omega_r$ for all choices of parameters. The decisional variant, after the truncation, is the 3-DQCSD-PT problem.

math \begin{pmatrix} \mathbf{I}_n & \mathbf{0} & \mathrm{rot}(h) \\ \mathbf{0} & \mathbf{I}_n & \mathrm{rot}(s) \end{pmatrix}

5.2.2. Parity and Truncation

Evaluation at 1 is a ring homomorphism from $\mathcal{R}$ to $\mathbb{F}_2$, and it maps a vector to the parity of its Hamming weight (Section 3.1). Applied to the encapsulation key, it gives

math s(1) = x(1) + h(1)\,y(1) = \omega\,\bigl(1 + h(1)\bigr) \bmod 2 ,

as $x$ and $y$ have Hamming weight $\omega$. Hence, the parity of $s$ depends on the parity of $h$, while the uniformly random vector will satisfy the equation with probability 1/2. The solution to the basic 2-DQCSD can hence be done with an advantage of 1/2 by verifying the parity equation, and similarly the solution to the ciphertext part $u$ whose parity will depend on $\omega_r$ and $h(1)$. Thus, in the security proof of HQC, different versions of the decisional problems in which the random vectors are chosen to have the correct parity are used. These decisional problems are termed as 2-DQCSD-P and 3-DQCSD-PT, where the letter P denotes parity and the letter T denotes truncation (Section 2.3 of [HQC]). However, this modification removes all the parity based distinguishing attacks at the cost of one bit of security reduction (Section 6.3 of [HQC]) when reducing from 2-DQCSD-P to 2-DQCSD.

The cipher text part $v$ is of length just $n_1 n_2 = n - \ell$ bits as the code $\mathcal{C}$ has length $n_1 n_2$, and 3-DQCSD-PT takes into account the fact that the last $\ell$ bits have been removed. As $\ell$ is a very small fraction of $n$ (5, 11, and 37 bits for HQC-1, HQC-3, and HQC-5 respectively), the truncation does not affect the cost of attacks much, and it also destroys the quasi-cyclic structure of the second block (Section 6.3 of [HQC]), which in turn weakens such attacks.

5.2.3. Structure of the Assumptions

The code $\mathcal{C}$ employed by HQC for decryption is publicly known and does not change according to the public-private key pair, while the private key is the sparse vectors $x$ and $y$. Therefore, the security proof is independent of the decoding scheme and no assumption about the inability of distinguish a structured code from a random one is needed [AMBDGZ18] [NISTIR8545]. According to NIST, the only coding theory assumptions about the security proof of HQC are the different versions of the decisional QCSD problem; however, BIKE also requires the assumption about the difficulty of a codeword finding problem and Classic McEliece requires assumptions on binary Goppa codes [NISTIR8545]. Specifically, any advancement regarding the ability of distinguishing Goppa codes from random codes, considered by NIST in its evaluation of Classic McEliece [NISTIR8545], is irrelevant for HQC.

The assumptions of HQC are decisional. In the case of random linear codes, the decisional syndrome decoding problem is as hard as the search syndrome decoding problem [FS96], however, there is no such reduction known for the quasi-cyclic problem of HQC, and it is mentioned as a weakness of HQC in Section 7.2 of [HQC], whereas in the case of structured lattices, it is not the case.

5.3. Known Attacks

5.3.1. Information Set Decoding

The best known attacks on the problems of Section 5.2 are ISD algorithms, which apply to random linear codes (Section 6.3 of [HQC]) [NISTIR8545]. ISD was introduced by Prange [Prange62] and has been improved many times, for example in [MMT11], [BJMM12], and [MO15].

If the weight of the error $t$ is of order $\sqrt{\mathrm{length~of~code}}$, such as in HQC, the most efficient known attacks run in time $(1-R)^{-t(1+o(1))}$ operations, where $R$ is the rate of the code and the $o(1)$ term goes to zero as the length increases (Section 6.3 of [HQC]). In case of the key recovery problem of Section 5.2.1, we have $t=2\omega$ and $R=1/2$, which yields a leading factor $2^{2\omega}$, whereas for the ciphertext-only attack problem $t=3\omega_r$ and $R=1/3$, and a leading factor of $(3/2)^{3\omega_r}$ (Section 6.3 of [HQC]). The parameters of [HQC] are selected based on the complexity of the most efficient known attacks on both problems (Sections 4 and 6.3 of [HQC]), taking into consideration the gain mentioned in Section 5.3.2.

There have been small improvements on ISD with respect to the parameters of HQC. Version 5.1 of [HQC] added +1 to $\omega$ in all parameter sets, as well as to $\omega_r$ and $\omega_e$ in HQC-1 and HQC-5 (changelog of version 5.1 of [HQC]). Applications requiring an additional margin for future attacks can use HQC-3 and HQC-5 (see Section 4.4) or HQC combined with ML-KEM (see Section 5.16).

5.3.2. Attacks Using the Quasi-Cyclic Structure

The quasi-cyclic structure yields to the attacker $n$ related instances of the problem. For example, for every integer $i$, the vectors $X^i\cdot x$ and $X^i\cdot y$ form a solution of the key recovery problem with the syndrome $X^i\cdot s$. The DOOM method makes use of those instances and speeds up ISD by a factor of approximately $\sqrt{n}$, and the choice of parameters for HQC (Section 6.3 of [HQC]) takes this advantage into account.

Other attacks use reductions modulo the factors of $X^n-1$, which is efficient when there are many factors of small degree of $X^n-1$ [GJL15] (Section 6.3 of [HQC]). HQC selects $n$ in such a way that $X^n-1$ is divisible only by $X-1$ and $\Phi_n$ (Section 3.1). The first factor only gives the parity of the vector, which is taken into account by the problems with parity of Section 5.2.2, and the second factor is of degree $n-1$.

5.3.3. Quantum Attacks

However, Shor's algorithm cannot be used to decode these problems, and there is no known quantum algorithm which solves these problems in polynomial time. Grover's algorithm [Grover96] allows to accelerate the search in ISD, and Section 6.3 of [HQC] quantifies the quantum security of its parameter sets using the square root of its classical cost, that is, by dividing its binary logarithm by two. The security classes of NIST are based on the cost of key search on AES which is also subject to a quadratic speed-up by Grover's algorithm; NIST considers the limitations on the depth of quantum circuits [NISTPQC-CFP] in this comparison.

In November 2026, Anthropic published quantum algorithms solving problems on module lattices in power-of-two cyclotomic rings, including random instances of search Module-LWE, in quasi-polynomial time, reducing the asymptotic quantum security of ML-KEM and ML-DSA, but these algorithms are very far from being practically efficient for their parameter sets [ANTHROPIC26] [CIRG26]. These results do not affect HQC, since they only consider lattices and do not affect any of the decoding problems used in the security of HQC (Section 5.2).

5.4. Chosen Plaintext Security of HQC-PKE

HQC-PKE is IND-CPA secure under the 2-DQCSD-P and 3-DQCSD-PT assumptions. More precisely, for any IND-CPA adversary $\mathcal{A}$ against HQC-PKE, there exist adversaries $\mathcal{B}_1$ and $\mathcal{B}_2$, constructed from $\mathcal{A}$, such that (Theorem 6.3 of [HQC])

math \mathrm{Adv}^{\mathrm{IND\text{-}CPA}} _{\mathrm{HQC\text{-}PKE}}(\mathcal{A}) \le \mathrm{Adv}^{\mathrm{2\text{-}DQCSD\text{-}P}}(\mathcal{B}_1) + \mathrm{Adv}^{\mathrm{3\text{-}DQCSD\text{-}PT}}(\mathcal{B}_2),

where $\mathrm{Adv}$ is the advantage of the adversary in the respective experiment, i.e., its success probability minus 1/2 in the case of IND-CPA, and the advantage of distinguishing the two distributions of the decision problem. This proof involves firstly replacing the syndrome $s$ by a random vector with the same parity and which is therefore indistinguishable under 2-DQCSD-P and, secondly, replacing the ciphertext by a random vector with the same parity and which is therefore indistinguishable under 3-DQCSD-PT. As a result, the ciphertext is now independent (Section 6.2.1 of [HQC]) of the message.

However, the use of HQC-PKE alone is not safe against active adversaries. The code $\mathcal{C}$ is linear, and hence adding the codeword $\mathcal{C}.\mathrm{Encode}(m^{*})$ corresponding to the chosen message $m^{*}$ to $v$ produces an encryption of $m+m^{*}$ in $\mathbb{F}_2^k$, making HQC-PKE ciphertexts malleable. In addition, the decryption routine processes the error vector which itself depends on the secret vector $y$ and on the ciphertext, and hence a decryption oracle for modified ciphertexts leaks information about $y$, as demonstrated by the attacks from Section 5.6.2 and Section 5.14. HQC-PKE MUST NOT be used in the absence of the transformation of HQC-KEM, and MUST employ HQC-KEM as described in [HQC] and, when it is published [I-D.reddy-hpke-hqc], in FIPS 207.

5.5. Chosen Ciphertext Security of HQC-KEM

5.5.1. The Salted Fujisaki-Okamoto Transform

HQC-KEM uses the salted Fujisaki-Okamoto transform with implicit rejection $\mathrm{SFO}^{\not\perp}_{m}$, which was first introduced in [HQC] and [GHS26], and is a slight variation of the transforms of [FO99], [FO13], and [HHK17]. The subscript $m$ means that the shared secret key is generated from the message, the encapsulation key, and the salt, rather than from the ciphertext like in ML-KEM of [FIPS203]. The superscript refers to implicit rejection. The transform requires HQC-PKE to have the IND-CPA security (Section 5.4) and to be deterministic after setting the seed $\theta$. Moreover, the transform assumes that HQC-PKE is $\delta$-correct. This property implies that the probability of decryption failure of the worst case message on average over the key pairs is upper bounded [HHK17](Definition 6.2.1 of [HQC]) by some small probability $\delta$.

Within the random oracle model, the adversary is unable to produce a ciphertext with high probability without knowledge of the message, since the encryption randomness is computed by a hash function based on the message itself. All other ciphertexts will be implicitly rejected by the re-encryption check, and implicit rejection of rejected ciphertexts produces pseudo-random keying material for the decapsulation oracle, which means that it does not leak anything about the decapsulation key except what leaks through decryption failures [HHK17] [GHS26]. The salt is an additional component of the transform in [HHK17], which expands the input domain of G to $k+128$ bits.

5.5.2. Concrete Security Bound

Theorem 6.4 of [HQC] gives the following bound in the random oracle model, which is based on [GHS26]. If HQC-PKE is $\delta$-correct, then for any IND-CCA2 adversary $\mathcal{A}$ against HQC-KEM that makes at most $q_{\mathrm{RO}}$ queries to the random oracle G and at most $q_{\mathrm{D}}$ queries to the decapsulation oracle, there exist adversaries $\mathcal{B}_1$ and $\mathcal{B}_2$ such that

math \mathrm{Adv}^{\mathrm{IND\text{-}CCA2}} _{\mathrm{HQC\text{-}KEM}}(\mathcal{A}) \le \frac{1}{2^{k+128}} + \frac{3\,q_{\mathrm{RO}}}{2^{k}} + (q_{\mathrm{RO}}+q_{\mathrm{D}})\,\delta + 2\left( \mathrm{Adv}^{\mathrm{2\text{-}DQCSD\text{-}P}}(\mathcal{B}_1) + \mathrm{Adv}^{\mathrm{3\text{-}DQCSD\text{-}PT}}(\mathcal{B}_2) \right).

The first term is negligible for all choices of parameters. The second term is an upper bound on the probability that the adversary uses G on the input which defines the challenge ciphertext, in other words, to find the challenge message amongst the $2^k$ possibilities. The third term is an upper bound on the probability that a ciphertext produced via the queries of the adversary leads to a decryption failure. The fourth term is the IND-CPA advantage of Section 5.4, multiplied by two. For HQC-1, with $q_{\mathrm{RO}}=q_{\mathrm{D}}=2^{64}$ and $\delta=2^{-127.9}$ (Section 5.6.1), the second and third terms are roughly $2^{-62.4}$ and $2^{-62.9}$, respectively, with a sum roughly equal to $2^{-61.6}$, and they only become significant after more than $2^{125}$ queries, which is in agreement with security category 1. The bound concerns a single challenge ciphertext (see Section 5.7).

The bound considers $r_1$, $r_2$, and $e$ to be uniformly random, but HQC selects them using SampleFixedWeightVect, the distribution of which is a little biased (Section 3.3). The maximum factor by which such bias causes an increase in the third and fourth terms is $\tau_{\max}(\omega_r)^3$, where the bias factor $\tau_{\max}(\omega_r)$ gives an upper bound on the ratio of the probability that the sampler generates a particular vector of weight $\omega_r$ to the uniform probability (Proposition 6.2.1 of [HQC]). Since $\tau_{\max}(\omega_r)$ equals 1.00016, 1.00047, and 1.00101 for HQC-1, HQC-3, and HQC-5 respectively (Table 17 of [HQC]), the value of the factor is 1.0031 or less, and the effect on security is negligible.

5.5.3. Quantum Random Oracle Model

A quantum computer allows an adversary to compute hash functions on quantum superpositions of inputs, which can be formalized using the quantum random oracle model (QROM). The security proof of Theorem 6.4 of [HQC] is done in the classical random oracle model. The Fujisaki-Okamoto transformation with implicit rejection has been studied in the QROM setting, even for schemes where decryption may fail [HHM22], while [GHS26] analyzes the salted version used in HQC in both the classical and the quantum random oracle model. In the latter, the bounds are slightly looser than in the classical random oracle model. This relaxation of the bound applies to all schemes constructed using the Fujisaki-Okamoto transformation, such as ML-KEM, and no known attack uses it.

5.6. Decryption Failures

5.6.1. Decryption Failure Rate

Decryption failure occurs for any honest ciphertext in case the decoder for $\mathcal{C}$ cannot correct the error vector $e'=x\cdot r_2-r_1\cdot y+e$ (Section 3.3). The occurrence of such an event is determined by the secret vectors and the randomness used for the encryption, but not by the plaintext itself, except for possible ties in the inner decoder (Sections 6.1.5 and 6.2.2 of [HQC]), which have very small probability.

The original analysis of [HQC] models the coordinates of $e'$ as independent random variables (Section 6.1.1 of [HQC]). If $x$ and $r_2$ are uniformly random vectors of weights $\omega$ and $\omega_r$, each coordinate of $x\cdot r_2$ equals one with the probability $\tilde{p}$ given by

math \tilde{p} = \binom{n}{\omega}^{-1}\binom{n}{\omega_r}^{-1} \sum_{\substack{1\le j\le\min(\omega,\,\omega_r)\\ j\ \mathrm{odd}}} \binom{n}{j}\binom{n-j}{\omega-j}\binom{n-\omega}{\omega_r-j},

where the summation index $j$ counts the pairs of nonzero positions of $x$ and $r_2$ that contribute to the coordinate (Proposition 6.1.1 of [HQC]). Each coordinate of $e'$ then equals one with the probability $p^{\star}$ given by

math p^{\star} = 2\tilde{p}(1-\tilde{p})\Bigl(1-\frac{\omega_e}{n}\Bigr) + \bigl((1-\tilde{p})^2+\tilde{p}^2\bigr)\frac{\omega_e}{n}

(Proposition 6.1.2 of [HQC]), which is about 0.3449, 0.3636, and 0.3750 for HQC-1, HQC-3, and HQC-5 (Tables 12 and 14 of [HQC]). The inner decoder is unsuccessful for the block with probability $p_{\mathrm{in}}$, which is limited by the union bound over 255 nonzero codewords of the inner code (Propositions 6.1.3 and 6.1.4 of [HQC]), while the Reed-Solomon decoder is unsuccessful only if the number of failures exceeds $t_1$ from the total of $n_1$ blocks (Theorem 6.1 of [HQC]), which results in the following bound:

math \mathrm{DFR} \le \sum_{j=t_1+1}^{n_1}\binom{n_1}{j}\, p_{\mathrm{in}}^{\,j}\,(1-p_{\mathrm{in}})^{n_1-j},

where $\mathrm{DFR}$ is the decryption failure rate and the index $j$ is the number of failing blocks.

This model of independence is conservative. The improved model in [BDMPRW26], adopted in [HQC] version 5.1, retains the exact weight bound on the integer product of the sparse vectors and the exact error set corrected by the concatenated decoder. This model is verified in simulation results, where for example the variance of the weight of the truncated error vector of HQC-1 is found to be 2980.9, in comparison to 3991.3 in the independence model in Section 6.1.4 and Table 15 of [HQC]. Decryption failure rates are shown in Table 5.

   +==========+==========+============================================+
   | Instance | Category | Decryption failure rate (refined model)    |
   +==========+==========+============================================+
   | HQC-1    |     1    |                 2^-127.9                   |
   +----------+----------+--------------------------------------------+
   | HQC-3    |     3    |                 2^-196.4                   |
   +----------+----------+--------------------------------------------+
   | HQC-5    |     5    |                 2^-257.0                   |
   +----------+----------+--------------------------------------------+

            Table 5: Decryption failure rates [HQC, Table 16]

It was the stable decryption failure analysis of HQC that tipped the scales in favor of HQC as opposed to BIKE; NIST has also mentioned that the IND-CCA2 security of HQC has been resistant against all attacks attempted on it since May 2020 when HQC started excluding the parameter sets where the failure rate exceeds $2^{-\lambda}$ bits [NISTIR8545] at the security level of $\lambda$ bits. When an honest user runs $2^{64}$ decapsulations using one HQC-1 key pair, he will have a decryption failure with probability of around $2^{-63.9}$.

5.6.2. Attacks Based on Decryption Failures

Information regarding the private key can be deduced from the occurrence of the decryption failure since it is dependent on the secret vectors. [GJ20] presents an attack based on decryption failure on HQC, and according to NIST, a sufficiently low rate of failure must be ensured [NISTIR8545] to avoid key recovery attacks.

The Fujisaki-Okamoto transform prevents such attacks since the vectors $r_1$, $r_2$, and $e$ of a valid ciphertext cannot be chosen by the attacker. The adversary may only search for the messages and salts whose vectors are more probable to fail, and the third term of the bound from Section 5.5.2 reflects such searching procedure. For the failure probabilities of Table 5, it means that more than $2^{127.9}$, $2^{196.4}$, and $2^{257}$ decapsulations of valid ciphertexts are required to get one failure in case of HQC-1, HQC-3, and HQC-5, respectively, much more than $2^{64}$ decapsulation queries allowed by the security proof, and no such attack is currently known [NISTIR8545] for the proposed parameter sets.

Failure decryption attacks must have some mechanism for recognizing that the decryption failed. With HQC-KEM, a decryption failure results in an implicit rejection, such that the two parties end up with different keys and thus the protocol will fail at some future point. There is no need to mask failures since their likelihood is negligible, but implementations MUST NOT leak anything else about the decryption process, such as the number of decoding corrections performed (see Section 5.14).

5.6.3. Integrity of Keys

The failure probabilities of Table 5 apply to those key pairs that are generated using [HQC]. The greater the weight of the secret vector of a pair or the deviation of its encapsulation key from the property $s=x+h\cdot y$, the greater is the probability of a failure. For instance, if the adversary substitutes $s+\Delta s$ for $s$, where $\Delta s$ is a small error vector, in both the encapsulation key used by Bob and in the same encapsulation key used by Alice in the re-encryption check, the decryption error vector will be equal to $e'+\Delta s\cdot r_2$. Such an attack on ML-KEM with poisoned keys is mentioned in [I-D.irtf-cfrg-ml-kem-security-considerations].

The seed approach means that the decapsulation routine derives the encapsulation key from the seed (Section 3.7 of [HQC]) such that any change to the copy of the key used by Alice will be a result of changing the seed. Implementations that use an expansion of the decapsulation key that contains $s$ MUST ensure that this expansion is protected against modifications similarly to the seed (Section 5.11.1). The faulty generation of the key pair could lead to a greater failure probability; see Section 5.11.1 for more details.

5.7. Multi-Target Security and the Salt

The upper bound of Section 5.5.2 concerns one key pair and one challenge ciphertext. The number of key pairs is much larger in deployments, and an adversary gets many ciphertexts. In a KEM derived with the Fujisaki-Okamoto transform, the ciphertext is a deterministic function of the encapsulation key and of the input to the hash function which generates the randomness for encryption. If no salt is used, then the input is the concatenation of the message and the key, so an adversary can test a guess of the message on many ciphertexts simultaneously [GHS26]. An adversary with $Q$ target ciphertexts under the same encapsulation key can thus determine the message of one of them in roughly $2^{k}/Q$ attempts. In HQC, the length of the message $k$ is equal to the security level, and for HQC-1 and $Q=2^{64}$, this attack is only about $2^{64}$ [GHS26] expensive.

The randomness used for encryption and the secret key result from the hash of the encapsulation key, the message, and a random 128-bit salt included in each ciphertext (Section 3.7 of [HQC]). The guessing of the message will be confined to those ciphertexts where the salt and the encapsulation key are the same, thereby eliminating the advantage gained by the attack mentioned above. [GHS26] shows that, under the classical random oracle model, the multi-target IND-CCA security of the salted transformation can be reduced tightly to the multi-target IND-CPA security of the public-key encryption scheme used. For HQC and FrodoKEM at the 128-bit security level, [GHS26] claims that the salt recovers 62 bits of security in the multi-target scenario.

The addition of the salt occurred in version 4.0 of [HQC] as a means of defending against an attack on many ciphertexts, while version 5.0 increased the hash of the encapsulation key to cover all its bytes (Appendix A). In ML-KEM, a message length of 256 bits is used for all parameter sets [FIPS203]; consequently, this issue does not arise for ML-KEM.

Salt MUST be created using an RBG for every encapsulation operation. Using a constant or a predictable salt, or reusing the salt in multiple encapsulation operations, means that this protection is lost. Salt does not have to be secret; however, it MUST NOT be created using any secret data (see Section 5.10).

5.8. Implicit Rejection and the Re-encryption Check

Fourth round definition of HQC, as specified in the specification revised on 19 February 2025, used the message and the portion $(u,v)$ of the ciphertext to derive the shared secret key, and the re-encryption test involved comparison only of this portion, not the salt. As [SAARINEN25] pointed out, an invalid ciphertext and its salt-modified version produce the same rejection key, while a valid ciphertext and its salt-modified version produce two different keys, making it possible to determine whether the ciphertext was rejected by sending two decapsulation queries. This problem was fixed in version 5.0 of [HQC]. In the present definition, the re-encryption test involves comparison of the entire ciphertext $c'$, which includes the re-encrypted HQC-PKE ciphertext and the received salt, with the received ciphertext $c$, and the rejection key $\bar{K}=\mathsf{J}(\mathsf{H}(\mathsf{ek})\Vert\sigma\Vert c)$ is based on the entire received ciphertext (Section 3.7 of [HQC]) content.

Because the shared secret key is based on $\mathsf{H}(\mathsf{ek})\Vert m\Vert\mathsf{salt}$ rather than the ciphertext, the security of HQC-KEM relies on a re-encryption test that only allows the precise ciphertext generated by the encryption procedure. The encoding of $u$ and $s$ includes unused bits in the last byte of the encoding, and these are set to zero during encryption and key generation (Section 5.11.2). If an implementation simply ignores these bits during the parsing of the ciphertext and then performs a comparison, it would allow an altered version of the challenge ciphertext that has one unused bit flipped, and would generate the challenge key for it, violating IND-CCA2 security. Thus, the following criteria are necessary.

  • Decapsulation MUST verify the equality of the re-encrypted ciphertext with the entire ciphertext received, comprising the salt and the unused bits of the encoding of $u$, or MUST reject a ciphertext whose unused bits are not equal to 0 prior to further processing.

  • The rejection key MUST be computed using the ciphertext received as-is.

  • The choice between the key $K'$ and the rejection key $\bar{K}$ MUST be performed in constant time, such as using a conditional move. Decapsulation MUST NOT leak the outcome of the equality comparison via any method including returning an error code, logging information, timing, or any other means [SP800-227] [I-D.reddy-hpke-hqc].

  • Decapsulation MUST NOT bypass the step of re-encryption verification, and MUST NOT terminate early if a decoder detects an unexpected condition, because the decoders in HQC are required to always return some message (Section 3.2).

  • Implementations MUST be tested using invalid ciphertexts, and these MUST verify that the output is the rejection key.

Such flaws in the process cannot be detected in the testing that uses only valid ciphertexts. In the reference implementation of HQC, used in liboqs prior to version 0.12.0, a flaw in the indexing during parsing of the decapsulation key led to invalid results of decapsulation and hence loss of the implicit rejection feature [CVE-2024-54137] practically.

5.9. Binding Properties

The binding properties denote the inputs of a KEM responsible for its shared secret key [CDM24]. They are represented by X-BIND-P-Q, where P and Q represent sets of values from the set {shared secret key K, ciphertext CT, encapsulation key PK}, and where X can be HON, LEAK, or MAL. X-BIND-P-Q denotes that finding two decapsulation instances that are equal in values in P, yet different in values in Q, is computationally infeasible. For HON, the decapsulation keys are honestly generated and unknown to the adversary, whereas in LEAK they are honestly generated but known to the adversary. In MAL, the adversary [CDM24] [I-D.irtf-cfrg-hybrid-kems] generates them.

In version 5.0 of [HQC], the hash of the entire encapsulation key and the salt are incorporated in the derivation of the shared secret key as a security enhancement of HQC beyond IND-CCA security [FIPS207-PRES]. The rejection key is also dependent on the hash of the encapsulation key and on the entire ciphertext received (Section 5.8). [I-D.reddy-hpke-hqc], which relies on version 5.0 of [HQC], assumes that HQC-KEM satisfies LEAK-BIND-K-PK and LEAK-BIND-K-CT as argued by [CDM24] in the case of ML-KEM; however, there is no analysis of such a version. Decryption keys received from other parties SHOULD be accepted only in seed form, and checked as described in Section 5.11.1.

An associated characteristic is ciphertext second preimage resistance (C2PRI), which refers to the difficulty of finding another ciphertext, given a ciphertext generated in good faith, such that this ciphertext will decapsulate to the same key [I-D.irtf-cfrg-hybrid-kems]. [CHHKM26] demonstrates that C2PRI holds for the versions of the Fujisaki-Okamoto transformation used in post-quantum KEMs, including HQC.

For those protocols where the shared key is used for authenticating, or in case an attacker has access to a decapsulation key, the session key generation SHOULD consider the encapsulation key and ciphertext, or a transcript [RFC9958] [I-D.irtf-cfrg-ml-kem-security-considerations] containing them.

5.10. Randomness Requirements

HQC-KEM employs an RBG for generating three values, namely the 32-byte seed during key generation and the message of $k$ bits and 16-byte salt for each encapsulation (Section 3.7 of [HQC]). The RBG MUST have a security strength of at least the security level of the parameter set, i.e., 128, 192, or 256 bits, and the output MUST be fresh for each of these values [SP800-227]. Random bits SHOULD be generated as specified in [SP800-90A] and [SP800-90B]. In case of RBG failure, the key generation and encapsulation MUST fail and no key or ciphertext is generated.

There is no way to get more security for the shared secret key than there is entropy in the message itself. As the salt and the encapsulation key are both public, it is possible to calculate the secret key if it is guessed from the public information and verify this via re-encryption. In case of HQC-1, the message has 128 bits, meaning that any lack of entropy of RBG output makes the security of the secret key lower than category 1.

The HQC protocol leaks RBG output through two channels. First, similarly to ML-KEM, the possessor of the decapsulation key extracts the message, which is the RBG output, by means of decapsulation [I-D.irtf-cfrg-ml-kem-security-considerations]. Second, the salt, which is the RBG output, is leaked through the clear in the ciphertexts of the protocol, and hence, any party observing the traffic learns 128 bits of RBG output per each encapulation. An exposure of the RBG output when the RBG is insecure may result in an attack on the RBG state, as shown for Dual EC in TLS [CHECKOWAY14], which allows the attacker to recover the RBG state and thus predict the future messages and derive the secret keys from the encapulations. Implementers MAY utilize the techniques of [RFC8937] in the deployments.

Implementations may also expose internal APIs which take either the seed, the message, or the salt as an input, for test purposes with a known answer value. This API SHOULD NOT be exposed by the application, because its usage with input that does not come from the freshly generated RBG stream makes the HQC vulnerable, just like the similar internal APIs of ML-KEM [FIPS203].

In case a key pair is determined using the input keying material (DeriveKeyPair in the HPKE), the input keying material SHOULD consist of at least 32 bytes of entropy, and MUST NOT be used [RFC9180] [I-D.reddy-hpke-hqc] for other purposes.

5.11. Key Formats and Input Validation

5.11.1. Decapsulation Key

The decapsulation key in version 5.1 of [HQC] is the 32-byte seed, that specifies the full key pair, and Internet-Drafts for the use of HQC in IETF protocols follow this convention [I-D.reddy-hpke-hqc] [I-D.reddy-cose-hpke-hqc] [I-D.preussmattsson-tls-hqckem]. Any 32-byte string is a valid decapsulation key, thus no additional checks other than on length are required, and the encapsulation key, secret $\sigma$, and vectors $x$ and $y$ are consistent by design (Section 5.6.3).

This comes at the expense of the decapsulation process regenerating the key pair, and thereby adding the cost of key generation to the decapsulation process (Table 4). Implementations MAY store an expanded form of the decapsulation key in cache to save on costs in this manner (changelog of version 5.1 of [HQC]). The cache MUST be generated using the seed and the algorithms specified in [HQC], and it MUST be protected against any form of leakage or manipulation just like the seed itself [SP800-227]. An expanded key MUST NOT be imported or exported as a replacement for the seed [I-D.reddy-hpke-hqc] in practice.

A consistency test between an encapsulation and its matching decapsulation key, needed for validating cryptographic modules [FIPS140-3], consists of an encapsulation operation using a new encapsulation key and a decapsulation using the corresponding decapsulation key and verifying their agreement. It will identify key pairs that do not work, but cannot detect key pairs that work for valid ciphertexts and have higher probability of failure (Section 5.6.3). Seed representation permits a more robust verification, since a party who obtains a seed and an encapsulation key can verify that the encapsulation key matches the one derived from the seed (changelog of version 5.0 of [HQC]) [I-D.reddy-hpke-hqc]. Implementations SHOULD conduct such verification upon importing the key pair and MUST reject the key pair on a mismatch.

A seed MUST NOT be used with more than one parameter set or with more than one algorithm.

5.11.2. Encapsulation Key

Key for encapsulation is comprised of the 32-byte seed of $h$ concatenated with the $\lceil n/8\rceil$-byte encoding of $s$, where the bit number $i$ in the vector corresponds to the bit with weight $2^{i \bmod 8}$ of the byte whose index is $\lfloor i/8\rfloor$ (Sections 2.1 and 3.3 of [HQC]). In the encoding of $s$, there are $8\lceil n/8\rceil-n$ unused bits in the most significant bit places in the last byte, three for HQC-1 and HQC-5, and five for HQC-3. The key generation process sets these bits to zero.

[HQC] does not define validation of the encapsulation key [I-D.reddy-ipsecme-ikev2-hqc]. An implementation of HQC MUST discard an encapsulation key that is not of the length defined in Table 3 for the parameter set, and SHOULD discard an encapsulation key that has any unused bits that are not zero. If not done, there would be multiple representations of the encapsulation key, and implementations could handle unused bits differently. An encapsulation key failing such validation was not generated using the key generation in [HQC], and so it can be explicitly discarded, since it is public data. If validation of the encapsulation key is required in FIPS 207, implementations of FIPS 207 MUST do that.

Such verifications do not provide evidence of the generation of the key in a trustworthy way. It is a decision problem to check whether $s$ has the form $x+h\cdot y$, where $x$ and $y$ have the weight $\omega$. This is the decision problem on the basis of which the security of HQC is built (Section 5.2). Any key that has been generated in a trustworthy way satisfies the parity rule presented in Section 5.2.2, but the same parity rule applies to half of all possible random strings.

For a static encapsulation key, the checks need to be performed only once, if the checked key is stored in a manner that prevents modification [SP800-227] generally.

5.11.3. Ciphertext

The ciphertext is the concatenation of the $\lceil n/8\rceil$-byte encoding of $u$, the $n_1 n_2/8$-byte encoding of $v$, and the 16-byte salt (Section 4.2 of [HQC]). The encoding of $u$ has the same number of unused bits as the encoding of $s$, while the encoding of $v$ has no unused bits since $n_1 n_2$ is a multiple of 8.

Decapsulation MUST fail upon receiving a ciphertext of incorrect length according to Table 3 for the given parameter set; this MAY be done explicitly, since the length is known in advance [I-D.reddy-ipsecme-ikev2-hqc] [I-D.reddy-hpke-hqc]. Any other malformed ciphertext, including ciphertexts that have non-zero unused bits, MUST either be rejected explicitly as a malformed input before decapsulation or be decapsulated as received and subsequently rejected at the re-encryption check stage, where the rejection key depends on the ciphertext's precise encoding (Section 5.8).

5.12. Key Reuse and Forward Secrecy

Given that HQC-KEM achieves IND-CCA2 security, it is safe to re-use the same key-pair for multiple encryptions; in other words, the same encapsulation key can be used statically. From the security analysis, an adversary is allowed a maximum of $2^{64}$ decapsulation oracle queries per key pair [NISTPQC-CFP]; the failure probabilities listed in Table 5 show that decrypting failures become insignificant here.

There is a price for forward secrecy in relation to key reuse. If an adversary gains access to a decapsulation key, then he will be able to decapsulate all ciphertexts that have been received in the past using the corresponding encapsulation key and derive the shared secret keys. In case where a protocol includes transmission of Alice's encapsulation key to Bob in each session, like TLS 1.3, Alice SHOULD generate a new key pair in each session and destroy the decapsulation key right after the decapsulation in order to achieve forward secrecy [SP800-227]. [I-D.preussmattsson-tls-hqckem] imposes a restriction on reusing the HQC key shares in multiple TLS sessions. The generation of HQC key shares is much cheaper than the process of encapsulation and decapsulation (see Table 4) and the size of messages is the same in both cases.

Ephemeral key pairs also reduce the exposure of the decapsulation key to the attacks of Section 5.6.2, Section 5.14, and Section 5.15, since each key pair is then used for a single decapsulation. An ephemeral key pair MUST be used for only one exchange, and it MUST be destroyed after its use [SP800-227] as soon as possible.

5.13. Properties of the Shared Secret Key

HQC-KEM’s shared secret key has 32 bytes regardless of the parameter set being used. Its entropy from an attacker’s point of view cannot exceed the number of bits of message ($k$), as it is calculated using SHA3-512 based on the hash of the encapsulation key, the message, and the salt (Section 5.10). In the random oracle model, the shared secret key is not distinguishable from a uniformly distributed 32-byte value to an attacker with fewer than $2^{k}$ operations if HQC-KEM is IND-CCA2 secure (Section 5.5). Thus, HQC-KEM has 128, 192, and 256 bits of security for HQC-1, HQC-3, and HQC-5 respectively (Table 3).

The common secret can be used directly as a symmetric key, e.g., for a symmetric encryption scheme with authentication, or as an input to a key derivation function [SP800-227]. In comparison, the output of the Diffie-Hellman key agreement protocol is distinguishable from a random sequence and requires key derivation [I-D.irtf-cfrg-ml-kem-security-considerations]. When applications require more than one key or keys of other sizes, they SHOULD generate them using a key derivation function and SHOULD incorporate into their key derivation the context of the protocol that they wish to tie up to, e.g., the encapsulation key, ciphertext, identities, or transcript (Section 5.9) [RFC9958] component.

Whenever a rejection of the ciphertext from the decapsulation procedure takes place or a decryption error occurs, both parties will have different keys without receiving any error message. The protocols SHOULD verify that the parties have the same key to use it, e.g., by means of a message authentication code over the transcript, as in TLS 1.3, or by means of the authentication tag of the first encrypted message [SP800-227]. In case of different keys, a key mismatch SHOULD be treated as a transport error, and thus, a new exchange SHOULD take place with a new ciphertext and key [RFC9958] pair.

5.14. Side-Channel Attacks

Decapsulation functions decrypt ciphertexts that can be chosen by the adversary, using the decapsulation key, and the decoders of HQC work on an error vector based on the secret vector $y$ and the ciphertext. Thus, intermediate results of decapsulation can be exploited to launch chosen ciphertext attacks and retrieve the private key. Attacks of this type have been shown possible against HQC in various works using either timings [GHJLNS22] [SGG24] [DG26] or power and electromagnetic measurements [UXTITH22] [GNNJ23] [DG25a] [DG25b]. All of these attacks construct a plaintext checking oracle that tells the adversary if the modified ciphertext decrypts to a particular message or a decryption oracle that provides even more information regarding the decrypted message and then use the results to retrieve the secret vector $y$. Recently, methods have been found to minimize the number of queries in such attacks [SGG24] [DG25a], and using a correct decryption oracle, only two queries are enough to break HQC-1 [DG25b] in general.

Implementations MUST use constant time with respect to all secret inputs, meaning that the sequence of executed instructions, accessed memory addresses, and the execution time of each instruction MUST NOT be influenced by secret inputs [SP800-227]. Secret data in HQC comprises the seed and the seeds computed therefrom, the vectors $x$ and $y$, the secret $\sigma$, the message $m$ and its decryption $m'$, the encryption seeds $\theta$ and $\theta'$, the vectors $r_1$, $r_2$, and $e$ at the stages of encapsulation and re-encapsulation, all intermediate results of decoding, the result of the re-encryption validation, and the keys $K$ and $\bar{K}$. The encapsulation key, the vector $h$, the ciphertext, and the parameter set are public.

The pseudo code of [HQC] defines the behavior of the input and output of the algorithm, and is not implemented to run in constant time. For instance, in the case of Reed-Solomon decoding described in Section 3.5.2 of [HQC], it is clear that there are loop implementations where the number of loops depends on the degree of the error locator polynomial, branch instructions based on whether the position is an error position, in the inner decoder implementation the largest coefficient of the Hadamard transform is selected by comparing values that depend on the secret data, and the transformation of positions of a fixed weight vector to a vector writing at memory locations that depend on positions. Implementations MUST use equivalent algorithms that run in constant time such as the ones used in the optimized implementation of [HQC], which runs in constant (Section 5 of [HQC]) time.

5.14.1. Timing Attacks

The following timing leaks have been exploited against HQC, or against other KEMs built with the Fujisaki-Okamoto transform, and implementations MUST avoid each of them.

  • Comparison of ciphertexts. If the comparison stops at the first difference between ciphertexts, it finds out where they differ and provides a plaintext testing oracle. [GJN20] used such a leakage to extract the secret key of FrodoKEM using roughly $2^{30}$ decapsulations. The comparison MUST have a constant time regardless of the compared values.

  • Rejection sampling of weight-constant vectors during re-encryption. [GHJLNS22] observed that a rejection sampler that runs in a time dependent on the encryption seed, if employed in the re-encryption phase, leaks information sufficient to extract the private key of HQC, using around 866000 idealized timing queries for 128 bits security level. In HQC the vectors $r_1$, $r_2$, and $e$ are sampled using a rejection sampler with a fixed number of read bytes and without rejection (Section 3.3). The step that substitutes repeating positions MUST be performed without conditionals on positions.

  • Division instructions. In some architectures, the execution time of a division instruction depends on the operands used, and compilers may generate these instructions in reduction of an operation modulo a constant. In [SGG24], the authors made use of the fact that the execution time of a modular reduction was not fixed and used it in the optimization of the fourth-round version of HQC. By analyzing about 100 measurements, they could construct a plaintext-checking oracle with an accuracy of over 90% for an adversary that runs on the same core as the victim, and they recovered the key of HQC-1 within less than two minutes on their target processor. Modular reductions of secrets either by n or n-i MUST NOT involve division instructions with a non-fixed execution time.

  • Decoding. The decoders of the inner and outer codes process the error vector, so that their running time MUST NOT depend on the number or the positions of the errors, for example through early exits, through loops with bounds that depend on the data, or through memory accesses at addresses that depend on the data.

  • Polynomial multiplication. Multiplications h · y in key generation and u · y in decryption use the sparse secret vector y. Algorithms to perform polynomial multiplications using only the nonzero indices of y have memory accesses at secret indices. In order to avoid this, Section 3.4 of [HQC] uses dense polynomial multiplication using Karatsuba and Toom-Cook, and the implementation MUST NOT use the sparsity of secret vectors in a way depending on the indices of their nonzero entries.

  • Sampling of the secret vectors. Rejection sampling of x and y is performed in key generation and, with the seed format, during each decapsulation, giving an adversary numerous opportunities to measure the same computation. Operations on the sampled index, such as reducing it modulo n, checking against already chosen indices, and converting into a vector, MUST be executed in constant time.

5.14.2. Compiler and Microarchitectural Effects

Source code running in constant time is insufficient. [DG26] discovered that compilers optimized the conditional selection using masks in the inner Reed-Muller decoder of HQC's optimized implementation (which is coded to run in constant time) to generate code containing branches conditioned on secret data. It was thus possible for an unprivileged attacker co-located on the same machine to monitor the cache accesses of the decoder using Flush+Reload attack, create a complete decryption oracle and extract the secret key of HQC-1 in less than 10 seconds [DG26]. Implementers SHOULD verify constant-time property of the compiled code for all supported compilers, compiler options and platforms, and SHOULD use compiler techniques that prevent insertion of branches, such as value barriers. Hardware resource leakage via contention of threads sharing the processor core [SGG24], among others, must also be considered when HQC is running on shared platforms.

5.14.3. Power and Electromagnetic Analysis

In cases where the adversary is able to measure the physical properties of the device, the power consumption and the electromagnetic emissions associated with decapsulation can be used as oracles. [UXTITH22] demonstrated that the leakage from the pseudorandom functions executed during re-encryption can give rise to a plaintext checking oracle for most KEM schemes based on the Fujisaki-Okamoto transformation, such as HQC. [GNNJ23] lowers the required number of measurements for key recovery attacks via an error-correcting code framework applicable to HQC. [DG25a] and [DG25b] use the public decoder of HQC to create offline templates that reveal hundreds of secret bits from a single probe and [DG25a] tested its efficacy via power analysis of a microcontroller. Implementations of such devices SHOULD adopt countermeasures, such as masking of the decryption, re-encryption and comparison processes, and shuffling. In addition, implementations of such devices SHOULD restrict the number of decapsulations per key pair, e.g., via ephemeral keys (Section 5.12).

5.15. Fault Attacks and Implementation Errors

If there is a fault that skips the check on re-encryption or that causes corruption of its result, then decapsulation becomes a decryption oracle for chosen ciphertexts. [XIUTH21] proved that a single fault is enough to bypass the re-encryption check in several KEM implementations, and then all known attacks on key recovery against HQC work. Similar effects occur when there is a fault in the decoding procedure or when selecting the output key.

[GGHS25] suggests a modified transform where a confirmation code, which is generated during the encryption, becomes part of the computation of the shared secret key, and, therefore, an implementation that bypasses the re-encryption check cannot pass basic correctness checks. This transform is used by [GGHS25] for HQC without any significant overhead since it uses bits that are removed by the truncation. NIST requested suggestions on including one-byte confirmation code in FIPS 207 [FIPS207-PRES], but version 5.1 of [HQC] does not have it.

Implementations that may be exposed to fault injection SHOULD protect the re-encryption check, for example by performing the comparison twice, by checking that the re-encryption was performed, and by protecting the selection between the decrypted key and the rejection key.

Faults during key generation can produce key pairs with a higher failure rate (Section 5.6.3), which the check of Section 5.11.1 detects.

5.16. Hybrid Constructions

In hybrid constructions, HQC is combined with at least one other key establishment algorithm so that the construction is secure if at least one component algorithm is secure [RFC9794] [SP800-227]. There are two types of hybrid constructions for HQC. In a PQ/T hybrid construction, HQC is combined with a conventional algorithm such as X25519 so that any weakness in HQC or implementation thereof is protected as long as there is no CRQC [RFC9794] [RFC9958]. In a PQ/PQ hybrid construction, HQC is combined with ML-KEM so that a quantum adversary is protected against as long as at least one of the two post-quantum algorithms is secure and provides the algorithmic diversity [NISTIR8545] [I-D.preussmattsson-tls-hqckem] behind the choice of HQC.

The secrets to be shared by the components MUST be combined with a combiner preserving IND-CCA2 security assuming that at least one of the components is IND-CCA2 [GHP18] [SP800-227] [I-D.irtf-cfrg-hybrid-kems]. The framework proposed by [I-D.irtf-cfrg-hybrid-kems] allows for two types of combiners: the first hash the ciphertexts and encapsulation keys of all components while the other ones depend on the C2PRI property of the post-quantum component and hence do not hash the ciphertext and the encapsulation key of the post-quantum component. As HQC has the C2PRI property [CHHKM26] (Section 5.9), both types of combiners can be applied to HQC, and the latter does not hash the large ciphertext and encapsulation keys of HQC [I-D.reddy-hpke-hqc]. The hybrid construction of [RFC9954] in TLS 1.3 concatenates the shared secrets using the key schedule and transcript hash, which contains ciphertexts and encapsulation keys.

It is required that the generation of the key components MUST use independent randomness or seeds that are derived from a common seed using a pseudorandom generator, as specified in [I-D.irtf-cfrg-hybrid-kems]. It is required that the key pair for the component MUST NOT be reused outside the hybrid [RFC9958] [I-D.reddy-ipsecme-ikev2-hqc] construction.

Encryption of the same key to an HQC recipient and encryption to an ML-KEM recipient, in a message to multiple recipients, is not a hybrid construction, as the decapsulation key of each of the two recipients alone is sufficient to decrypt [I-D.reddy-cose-hpke-hqc] the key.

Crypto agility, the possibility to substitute an algorithm for another, is no replacement for a hybrid construction. In case a vulnerability is discovered in ML-KEM, messages that were previously encrypted only with ML-KEM are still vulnerable to an adversary who has stored the data [I-D.preussmattsson-tls-hqckem] in practice.

5.17. Protocol Integration

HQC key lengths vary from 2241 to 7237 bytes and HQC cipher texts range from 4433 to 14421 bytes (Table 3), so both are larger than the standard size of an Internet packet. Protocols employing HQC should also take into consideration fragmentation along with the impact of the large messages on the latency, loss, and network intermediate devices [RFC9958]. The sizes of the keys, the cipher texts, and the intermediate vectors of HQC on constrained devices will also influence memory usage and energy [RFC9958] consumption.

In IKEv2, the IKE_SA_INIT exchange cannot be fragmented [RFC7383]. For this reason, [I-D.reddy-ipsecme-ikev2-hqc] recommends using HQC as an additional key exchange [RFC9370] in the IKE_INTERMEDIATE exchange [RFC9242], which can be fragmented, unless the IKE_SA_INIT exchange runs over TCP.

The use of large key shares in the ClientHello message in both TLS 1.3 and QUIC can lead to issues for those implementations and network devices that restrict its size. Another issue may arise due to the delay in large ciphertext sent by the server because of the restriction on the maximum amount of data sent by a QUIC server until it verifies the address of the client [I-D.preussmattsson-tls-hqckem]. A client may announce HQC without sending any key share but allowing the server to request a key share and thus paying an extra round trip, and a DTLS 1.3 server can perform client return routability check using a cookie before sending an HQC ciphertext [I-D.preussmattsson-tls-hqckem] content.

In HPKE and COSE, each recipient adds an HQC ciphertext to the message, and implementations SHOULD bound memory allocation, parsing, and decapsulation [I-D.reddy-hpke-hqc] [I-D.reddy-cose-hpke-hqc] work.

Decapsulation takes several hundred thousand or even one million processor cycles (Table 4). Responder implementations that execute decapsulation or encapsulation on behalf of unauthenticated peers SHOULD validate input sizes prior to performing an expensive operation and SHOULD throttle input processing rates to avoid denial-of-service attacks.

The algorithm identifier used in protocol negotiation MUST determine the choice of parameter set and of the specification version (Section 4.4). Implementations MUST NOT fallback to another parameter set, another version of HQC, or any other algorithm in case of decapsulation or key confirmation failure [I-D.reddy-hpke-hqc] [I-D.reddy-cose-hpke-hqc]. Protocols SHOULD safeguard against downgrade attacks, for instance, by authenticating the protocol negotiation phase.

HQC protects the confidentiality of the established key against quantum adversaries. Protection against active quantum adversaries also requires post-quantum authentication, for example with post-quantum signatures or with a sufficiently strong pre-shared key [RFC9370] [I-D.reddy-ipsecme-ikev2-hqc] component.

6. IANA Considerations

This document has no IANA actions.

7. References

7.1. Normative References

[FIPS202]
National Institute of Standards and Technology, "SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions", NIST FIPS 202, DOI 10.6028/NIST.FIPS.202, , <https://doi.org/10.6028/NIST.FIPS.202>.
[HQC]
HQC Team, "Hamming Quasi-Cyclic (HQC)", Version 5.1, , <https://pqc-hqc.org/doc/hqc_specifications_v5.1.pdf>.
[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/rfc/rfc2119>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/rfc/rfc8174>.

7.2. Informative References

[AMBDGZ18]
Aguilar-Melchor, C., Blazy, O., Deneuville, J.-C., Gaborit, P., and G. Zémor, "Efficient Encryption From Random Quasi-Cyclic Codes", IEEE Transactions on Information Theory, vol. 64, no. 5, pp. 3927-3943, DOI 10.1109/TIT.2018.2804444, , <https://doi.org/10.1109/TIT.2018.2804444>.
[ANTHROPIC26]
Anthropic, "Galactic quasi-polynomial quantum algorithms for integral and module lattices", , <https://github.com/anthropics/formal-math/blob/main/lattices/papers/01-quasi-polynomial-quantum-algorithms.pdf>.
[BDMPRW26]
Bitzer, S., Deneuville, J.-C., Munisamy, E., Purtipli, B., Ritterhoff, S., and A. Wachter-Zeh, "HQC Beyond the Standard: Ciphertext Compression and Refined DFR Analysis", Advances in Cryptology - EUROCRYPT 2026, Lecture Notes in Computer Science, pp. 544-574, DOI 10.1007/978-3-032-25333-0_19, , <https://doi.org/10.1007/978-3-032-25333-0_19>.
[BJMM12]
Becker, A., Joux, A., May, A., and A. Meurer, "Decoding Random Binary Linear Codes in 2^(n/20): How 1 + 1 = 0 Improves Information Set Decoding", Advances in Cryptology - EUROCRYPT 2012, Lecture Notes in Computer Science, pp. 520-536, DOI 10.1007/978-3-642-29011-4_31, , <https://doi.org/10.1007/978-3-642-29011-4_31>.
[CDM24]
Cremers, C., Dax, A., and N. Medinger, "Keeping Up with the KEMs: Stronger Security Notions for KEMs and Automated Analysis of KEM-based Protocols", Proceedings of the 2024 ACM SIGSAC Conference on Computer and Communications Security (CCS '24), pp. 1046-1060, DOI 10.1145/3658644.3670283, , <https://doi.org/10.1145/3658644.3670283>.
[CHECKOWAY14]
Checkoway, S., Niederhagen, R., Everspaugh, A., Green, M., Lange, T., Ristenpart, T., Bernstein, D. J., Maskiewicz, J., Shacham, H., and M. Fredrikson, "On the Practical Exploitability of Dual EC in TLS Implementations", 23rd USENIX Security Symposium, pp. 319-335, , <https://www.usenix.org/conference/usenixsecurity14/technical-sessions/presentation/checkoway>.
[CHHKM26]
Connolly, D., Hövelmanns, K., Hülsing, A., Kousidis, S., and M. Meijers, "Starfighters - On the General Applicability of X-Wing", 2026 IEEE Symposium on Security and Privacy (SP), pp. 1138-1156, DOI 10.1109/SP63933.2026.00143, , <https://doi.org/10.1109/SP63933.2026.00143>.
[CIRG26]
Cryptography Incident Review Group, "Initial Assessment of Anthropic's Findings on Lattice Cryptography", , <https://cirg.org/statements/1/>.
[CVE-2024-54137]
CVE Program, "CVE-2024-54137: liboqs has a correctness error in HQC decapsulation", , <https://nvd.nist.gov/vuln/detail/CVE-2024-54137>.
[DG25a]
Dong, H. and Q. Guo, "OT-PCA: New Key-Recovery Plaintext-Checking Oracle Based Side-Channel Attacks on HQC with Offline Templates", IACR Transactions on Cryptographic Hardware and Embedded Systems, vol. 2025, no. 1, pp. 251-274, DOI 10.46586/tches.v2025.i1.251-274, , <https://doi.org/10.46586/tches.v2025.i1.251-274>.
[DG25b]
Dong, H. and Q. Guo, "Multi-Value Plaintext-Checking and Full-Decryption Oracle-Based Attacks on HQC from Offline Templates", IACR Transactions on Cryptographic Hardware and Embedded Systems, vol. 2025, no. 4, pp. 254-289, DOI 10.46586/tches.v2025.i4.254-289, , <https://doi.org/10.46586/tches.v2025.i4.254-289>.
[DG26]
Dong, H. and Q. Guo, "Breaking Optimized HQC: The First Cache-Timing Full Decryption Oracle Key-Recovery Attack in Post-Quantum Cryptography", Advances in Cryptology - CRYPTO 2026, Lecture Notes in Computer Science, pp. 224-255, DOI 10.1007/978-3-032-35398-6_8, , <https://doi.org/10.1007/978-3-032-35398-6_8>.
[FIPS140-3]
National Institute of Standards and Technology, "Security Requirements for Cryptographic Modules", NIST FIPS 140-3, DOI 10.6028/NIST.FIPS.140-3, , <https://doi.org/10.6028/NIST.FIPS.140-3>.
[FIPS203]
National Institute of Standards and Technology, "Module-Lattice-Based Key-Encapsulation Mechanism Standard", NIST FIPS 203, DOI 10.6028/NIST.FIPS.203, , <https://doi.org/10.6028/NIST.FIPS.203>.
[FIPS207-PRES]
Robinson, A., "FIPS 207: HQC-KEM", Sixth PQC Standardization Conference, National Institute of Standards and Technology, , <https://csrc.nist.gov/presentations/2025/fips-207-hqc-kem>.
[FO13]
Fujisaki, E. and T. Okamoto, "Secure Integration of Asymmetric and Symmetric Encryption Schemes", Journal of Cryptology, vol. 26, no. 1, pp. 80-101, DOI 10.1007/s00145-011-9114-1, , <https://doi.org/10.1007/s00145-011-9114-1>.
[FO99]
Fujisaki, E. and T. Okamoto, "Secure Integration of Asymmetric and Symmetric Encryption Schemes", Advances in Cryptology - CRYPTO '99, Lecture Notes in Computer Science, pp. 537-554, DOI 10.1007/3-540-48405-1_34, , <https://doi.org/10.1007/3-540-48405-1_34>.
[FS96]
Fischer, J.-B. and J. Stern, "An Efficient Pseudo-Random Generator Provably as Secure as Syndrome Decoding", Advances in Cryptology - EUROCRYPT '96, Lecture Notes in Computer Science, pp. 245-255, DOI 10.1007/3-540-68339-9_22, , <https://doi.org/10.1007/3-540-68339-9_22>.
[GGHS25]
Glabush, L., Günther, F., Hövelmanns, K., and D. Stebila, "Verifiable Decapsulation: Recognizing Faulty Implementations of Post-Quantum KEMs", Advances in Cryptology - CRYPTO 2025, Lecture Notes in Computer Science, pp. 543-574, DOI 10.1007/978-3-032-01881-6_17, , <https://doi.org/10.1007/978-3-032-01881-6_17>.
[GHJLNS22]
Guo, Q., Hlauschek, C., Johansson, T., Lahr, N., Nilsson, A., and R. L. Schröder, "Don't Reject This: Key-Recovery Timing Attacks Due to Rejection-Sampling in HQC and BIKE", IACR Transactions on Cryptographic Hardware and Embedded Systems, vol. 2022, no. 3, pp. 223-263, DOI 10.46586/tches.v2022.i3.223-263, , <https://doi.org/10.46586/tches.v2022.i3.223-263>.
[GHP18]
Giacon, F., Heuer, F., and B. Poettering, "KEM Combiners", Public-Key Cryptography - PKC 2018, Lecture Notes in Computer Science, pp. 190-218, DOI 10.1007/978-3-319-76578-5_7, , <https://doi.org/10.1007/978-3-319-76578-5_7>.
[GHS26]
Glabush, L., Hövelmanns, K., and D. Stebila, "On the Multi-Target Security of Post-Quantum Key Encapsulation Mechanisms", IACR Communications in Cryptology, vol. 3, no. 1, DOI 10.62056/a63zl83y6, , <https://doi.org/10.62056/a63zl83y6>.
[GJ20]
Guo, Q. and T. Johansson, "A New Decryption Failure Attack Against HQC", Advances in Cryptology - ASIACRYPT 2020, Lecture Notes in Computer Science, pp. 353-382, DOI 10.1007/978-3-030-64837-4_12, , <https://doi.org/10.1007/978-3-030-64837-4_12>.
[GJL15]
Guo, Q., Johansson, T., and C. Löndahl, "A New Algorithm for Solving Ring-LPN With a Reducible Polynomial", IEEE Transactions on Information Theory, vol. 61, no. 11, pp. 6204-6212, DOI 10.1109/TIT.2015.2475738, , <https://doi.org/10.1109/TIT.2015.2475738>.
[GJN20]
Guo, Q., Johansson, T., and A. Nilsson, "A Key-Recovery Timing Attack on Post-quantum Primitives Using the Fujisaki-Okamoto Transformation and Its Application on FrodoKEM", Advances in Cryptology - CRYPTO 2020, Lecture Notes in Computer Science, pp. 359-386, DOI 10.1007/978-3-030-56880-1_13, , <https://doi.org/10.1007/978-3-030-56880-1_13>.
[GNNJ23]
Guo, Q., Nabokov, D., Nilsson, A., and T. Johansson, "SCA-LDPC: A Code-Based Framework for Key-Recovery Side-Channel Attacks on Post-quantum Encryption Schemes", Advances in Cryptology - ASIACRYPT 2023, Lecture Notes in Computer Science, pp. 203-236, DOI 10.1007/978-981-99-8730-6_7, , <https://doi.org/10.1007/978-981-99-8730-6_7>.
[Grover96]
Grover, L. K., "A Fast Quantum Mechanical Algorithm for Database Search", Proceedings of the 28th Annual ACM Symposium on Theory of Computing (STOC '96), pp. 212-219, DOI 10.1145/237814.237866, , <https://doi.org/10.1145/237814.237866>.
[HHK17]
Hofheinz, D., Hövelmanns, K., and E. Kiltz, "A Modular Analysis of the Fujisaki-Okamoto Transformation", Theory of Cryptography - TCC 2017, Lecture Notes in Computer Science, pp. 341-371, DOI 10.1007/978-3-319-70500-2_12, , <https://doi.org/10.1007/978-3-319-70500-2_12>.
[HHM22]
Hövelmanns, K., Hülsing, A., and C. Majenz, "Failing Gracefully: Decryption Failures and the Fujisaki-Okamoto Transform", Advances in Cryptology - ASIACRYPT 2022, Lecture Notes in Computer Science, pp. 414-443, DOI 10.1007/978-3-031-22972-5_15, , <https://doi.org/10.1007/978-3-031-22972-5_15>.
[I-D.irtf-cfrg-hybrid-kems]
Connolly, D., Barnes, R., and P. Grubbs, "Hybrid PQ/T Key Encapsulation Mechanisms", Work in Progress, Internet-Draft, draft-irtf-cfrg-hybrid-kems-12, , <https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hybrid-kems-12>.
[I-D.irtf-cfrg-ml-kem-security-considerations]
Fluhrer, S., Dang, Q., Mattsson, J. P., Milner, K., and D. Shiu, "ML-KEM Security Considerations", Work in Progress, Internet-Draft, draft-irtf-cfrg-ml-kem-security-considerations-01, , <https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-ml-kem-security-considerations-01>.
[I-D.preussmattsson-tls-hqckem]
Mattsson, J. P., Ruohomaa, S., and Q. Dang, "HQC-KEM Key Agreement for TLS 1.3", Work in Progress, Internet-Draft, draft-preussmattsson-tls-hqckem-03, , <https://datatracker.ietf.org/doc/html/draft-preussmattsson-tls-hqckem-03>.
[I-D.reddy-cose-hpke-hqc]
Tschofenig, H. and T. Reddy.K, "Hamming Quasi-Cyclic (HQC) Ciphersuites for COSE-HPKE", Work in Progress, Internet-Draft, draft-reddy-cose-hpke-hqc-00, , <https://datatracker.ietf.org/doc/html/draft-reddy-cose-hpke-hqc-00>.
[I-D.reddy-hpke-hqc]
Tschofenig, H. and T. Reddy.K, "Hamming Quasi-Cyclic (HQC) Key Encapsulation Mechanisms for Hybrid Public Key Encryption (HPKE)", Work in Progress, Internet-Draft, draft-reddy-hpke-hqc-01, , <https://datatracker.ietf.org/doc/html/draft-reddy-hpke-hqc-01>.
[I-D.reddy-ipsecme-ikev2-hqc]
Reddy.K, T., Tschofenig, H., and S. Fluhrer, "Post-Quantum Key Exchange with HQC in the Internet Key Exchange Protocol Version 2 (IKEv2)", Work in Progress, Internet-Draft, draft-reddy-ipsecme-ikev2-hqc-00, , <https://datatracker.ietf.org/doc/html/draft-reddy-ipsecme-ikev2-hqc-00>.
[MMT11]
May, A., Meurer, A., and E. Thomae, "Decoding Random Linear Codes in O~(2^(0.054n))", Advances in Cryptology - ASIACRYPT 2011, Lecture Notes in Computer Science, pp. 107-124, DOI 10.1007/978-3-642-25385-0_6, , <https://doi.org/10.1007/978-3-642-25385-0_6>.
[MO15]
May, A. and I. Ozerov, "On Computing Nearest Neighbors with Applications to Decoding of Binary Linear Codes", Advances in Cryptology - EUROCRYPT 2015, Lecture Notes in Computer Science, pp. 203-228, DOI 10.1007/978-3-662-46800-5_9, , <https://doi.org/10.1007/978-3-662-46800-5_9>.
[NCSC26]
National Cyber Security Centre, "NCSC advises urgent action on migration to post-quantum cryptography", , <https://www.ncsc.gov.uk/news/ncsc-advises-urgent-action-on-migration-to-post-quantum-cryptography>.
[NISTIR8545]
Alagic, G., Bros, M., Ciadoux, P., Cooper, D., Dang, Q., Dang, T., Kelsey, J., Lichtinger, J., Liu, Y.-K., Miller, C., Moody, D., Peralta, R., Perlner, R., Robinson, A., Silberg, H., Smith-Tone, D., and N. Waller, "Status Report on the Fourth Round of the NIST Post-Quantum Cryptography Standardization Process", NIST IR 8545, DOI 10.6028/NIST.IR.8545, , <https://doi.org/10.6028/NIST.IR.8545>.
[NISTPQC-CFP]
National Institute of Standards and Technology, "Submission Requirements and Evaluation Criteria for the Post-Quantum Cryptography Standardization Process", , <https://csrc.nist.gov/CSRC/media/Projects/Post-Quantum-Cryptography/documents/call-for-proposals-final-dec-2016.pdf>.
[NSA26]
National Security Agency, "NSA Advises Immediate Transition to Post-Quantum Cryptography to Protect National Security Systems", press release, , <https://www.nsa.gov/Press-Room/Press-Releases-Statements/Press-Release-View/Article/4662430/nsa-advises-immediate-transition-to-post-quantum-cryptography-to-protect-nation/>.
[Prange62]
Prange, E., "The Use of Information Sets in Decoding Cyclic Codes", IRE Transactions on Information Theory, vol. 8, no. 5, pp. 5-9, DOI 10.1109/TIT.1962.1057777, , <https://doi.org/10.1109/TIT.1962.1057777>.
[RFC7296]
Kaufman, C., Hoffman, P., Nir, Y., Eronen, P., and T. Kivinen, "Internet Key Exchange Protocol Version 2 (IKEv2)", STD 79, RFC 7296, DOI 10.17487/RFC7296, , <https://www.rfc-editor.org/rfc/rfc7296>.
[RFC7383]
Smyslov, V., "Internet Key Exchange Protocol Version 2 (IKEv2) Message Fragmentation", RFC 7383, DOI 10.17487/RFC7383, , <https://www.rfc-editor.org/rfc/rfc7383>.
[RFC8937]
Cremers, C., Garratt, L., Smyshlyaev, S., Sullivan, N., and C. Wood, "Randomness Improvements for Security Protocols", RFC 8937, DOI 10.17487/RFC8937, , <https://www.rfc-editor.org/rfc/rfc8937>.
[RFC9180]
Barnes, R., Bhargavan, K., Lipp, B., and C. Wood, "Hybrid Public Key Encryption", RFC 9180, DOI 10.17487/RFC9180, , <https://www.rfc-editor.org/rfc/rfc9180>.
[RFC9242]
Smyslov, V., "Intermediate Exchange in the Internet Key Exchange Protocol Version 2 (IKEv2)", RFC 9242, DOI 10.17487/RFC9242, , <https://www.rfc-editor.org/rfc/rfc9242>.
[RFC9370]
Tjhai, CJ., Tomlinson, M., Bartlett, G., Fluhrer, S., Van Geest, D., Garcia-Morchon, O., and V. Smyslov, "Multiple Key Exchanges in the Internet Key Exchange Protocol Version 2 (IKEv2)", RFC 9370, DOI 10.17487/RFC9370, , <https://www.rfc-editor.org/rfc/rfc9370>.
[RFC9794]
Driscoll, F., Parsons, M., and B. Hale, "Terminology for Post-Quantum Traditional Hybrid Schemes", RFC 9794, DOI 10.17487/RFC9794, , <https://www.rfc-editor.org/rfc/rfc9794>.
[RFC9846]
Rescorla, E., "The Transport Layer Security (TLS) Protocol Version 1.3", RFC 9846, DOI 10.17487/RFC9846, , <https://www.rfc-editor.org/rfc/rfc9846>.
[RFC9954]
Stebila, D., Fluhrer, S., and S. Gueron, "Hybrid Key Exchange in TLS 1.3", RFC 9954, DOI 10.17487/RFC9954, , <https://www.rfc-editor.org/rfc/rfc9954>.
[RFC9958]
Banerjee, A., Reddy.K, T., Schoinianakis, D., Hollebeek, T., and M. Ounsworth, "Post-Quantum Cryptography for Engineers", RFC 9958, DOI 10.17487/RFC9958, , <https://www.rfc-editor.org/rfc/rfc9958>.
[SAARINEN25]
Saarinen, M.-J. O., "IND-CCA2 issue in HQC (latest version)", message to the NIST pqc-forum mailing list, , <https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/Wiu4ZQo3fP80>.
[SGG24]
Schröder, R. L., Gast, S., and Q. Guo, "Divide and Surrender: Exploiting Variable Division Instruction Timing in HQC Key Recovery Attacks", 33rd USENIX Security Symposium, pp. 6669-6686, , <https://www.usenix.org/conference/usenixsecurity24/presentation/schr%C3%B6der>.
[SP800-90A]
Barker, E. and J. Kelsey, "Recommendation for Random Number Generation Using Deterministic Random Bit Generators", NIST SP 800-90A Rev. 1, DOI 10.6028/NIST.SP.800-90Ar1, , <https://doi.org/10.6028/NIST.SP.800-90Ar1>.
[SP800-90B]
Sönmez Turan, M., Barker, E., Kelsey, J., McKay, K., Baish, M., and M. Boyle, "Recommendation for the Entropy Sources Used for Random Bit Generation", NIST SP 800-90B, DOI 10.6028/NIST.SP.800-90B, , <https://doi.org/10.6028/NIST.SP.800-90B>.
[SP800-227]
Alagic, G., Barker, E., Chen, L., Moody, D., Robinson, A., Silberg, H., and N. Waller, "Recommendations for Key-Encapsulation Mechanisms", NIST SP 800-227, DOI 10.6028/NIST.SP.800-227, , <https://doi.org/10.6028/NIST.SP.800-227>.
[UXTITH22]
Ueno, R., Xagawa, K., Tanaka, Y., Ito, A., Takahashi, J., and N. Homma, "Curse of Re-encryption: A Generic Power/EM Analysis on Post-Quantum KEMs", IACR Transactions on Cryptographic Hardware and Embedded Systems, vol. 2022, no. 1, pp. 296-322, DOI 10.46586/tches.v2022.i1.296-322, , <https://doi.org/10.46586/tches.v2022.i1.296-322>.
[XIUTH21]
Xagawa, K., Ito, A., Ueno, R., Takahashi, J., and N. Homma, "Fault-Injection Attacks Against NIST's Post-Quantum Cryptography Round 3 KEM Candidates", Advances in Cryptology - ASIACRYPT 2021, Lecture Notes in Computer Science, pp. 33-61, DOI 10.1007/978-3-030-92075-3_2, , <https://doi.org/10.1007/978-3-030-92075-3_2>.

Acknowledgments

The technical content of this document is based on the specification and the security analysis of HQC by the HQC team [HQC], on the evaluation of HQC by NIST [NISTIR8545], and on the research cited in this document.

Authors' Addresses

Navid Abapour
Nokia
Cambridge
United Kingdom
Aritra Banerjee
Nokia
London
United Kingdom