← Back to section · Post-Quantum Cryptography
Syndrome Decoding: The Mathematical Foundation of HQC's Security
All of HQC's security rests on a problem studied for nearly half a century: given a parity-check matrix and a syndrome, recover the low-weight error vector. This article explains why the problem is hard, and why quantum computing does not help.
A problem from error-correcting codes
Error correction has a basic operation at its core: a sender encodes a message into a redundant codeword, channel noise flips a few of its bits, and the receiver uses the parity-check matrix to compute a syndrome — a value that depends only on the error pattern, not on the original message. Decoding means working backwards from the syndrome to the error vector.
Use that problem in reverse and you get cryptography. The syndrome decoding problem states: given the parity-check matrix H of a random linear code and a syndrome s, find an error vector e of weight (number of nonzero entries) at most t such that H·eᵀ = s. In 1978, Berlekamp, McEliece, and van Tilburg proved this problem NP-complete in the general case — the same year McEliece published the first code-based public-key encryption scheme. NP-completeness does not by itself guarantee a good cryptographic problem (hardness on average is what matters), but it does mean no general efficient solution is known, and the cryptanalytic community has been trying to overturn that verdict for over forty years without success.
HQC’s security rests on the quasi-cyclic variant of this problem: an attacker facing a public key and a ciphertext ultimately has to solve a syndrome decoding problem, except that the code carries quasi-cyclic structure in exchange for much smaller keys.
The best known attack: information-set decoding
The most effective attack route against syndrome decoding is information-set decoding, originating with Prange’s simple 1962 method: guess a set of error-free positions at random; if the guess is right, the remaining linear system yields the error directly; if not, try again. The success probability depends on the error weight and code length, and the overall complexity grows exponentially in the parameters. Since then, Lee–Brickell, Stern, BJMM, and successive generations of refinements have kept lowering the base of the exponent — using birthday techniques, representations, and nearest-neighbour search to speed up each step — without changing the exponential itself.
This gives the defender a simple and reliable weapon: larger parameters. Each step up in code length and error weight raises the attack cost exponentially, while honest users pay only polynomially more. The security margin of code-based schemes can therefore be priced quite precisely: for a given parameter set, the field can estimate what the best known attack costs — one of the core inputs NIST used when evaluating the code-based candidates.
Why quantum computing does not help
Shor’s algorithm breaks RSA and elliptic-curve cryptography because those problems have hidden periodic structure: factoring and discrete logarithms both reduce to finding periods in abelian groups, and the quantum Fourier transform is exactly the tool for that job. A random linear code has no such structure — the code is random, the error is random, and there is no hidden subgroup waiting to be “developed” by a quantum algorithm.
What quantum computing can do for syndrome decoding is apply Grover search to give quadratic-level speedups to parts of information-set decoding. Such speedups are generic and mild: enlarging the security parameters absorbs them completely. In other words, a quantum attacker facing a code-based problem has no extra weapon over a classical attacker, only the same weapon running a square root faster — the same situation as lattice and hash-based problems in the post-quantum era, and the fundamental reason the code-based route is considered conservative: it relies on no fancy structural assumption, only on an old problem that has been studied exhaustively.
How the hardness is priced
“Exponential” is only a qualitative statement; real parameter design needs attack costs as concrete numbers. The cryptanalytic community has developed a full cost-estimation methodology for information-set decoding: take the asymptotic complexity formulas of Prange, BJMM, and each generation of algorithms as the skeleton, substitute concrete parameters, convert to bit operations, and benchmark against the cost of brute-forcing AES in NIST’s calibration — security levels 1/3/5 are defined exactly as “attack cost no less than brute-forcing AES-128/192/256”. Every time a new improvement appears, the community recomputes the cost of every registered parameter set and, where necessary, restores the margin by adjusting parameters; over sixty years this “improve — recompute — restore” cycle has turned many times, and code-based parameters have never been broken through by any single improvement. That stability was earned one cycle at a time.
One commonly misunderstood point deserves emphasis: NP-completeness speaks about the worst case, while cryptography needs hardness on random instances — the average case. Syndrome decoding happens to be one of the few problems with long empirical evidence that the average case is equally hard: randomly chosen codes and syndromes are exactly the everyday input of information-set decoding, and forty years of attack records were all achieved in the average case. HQC’s security calibration therefore needs no borrowed glory from worst-case results; it rests on a recomputable ledger of attack costs.
From a hard problem to a lock
There is, of course, distance between “the problem is hard” and “the scheme is secure”. HQC does not use a fully random code but one with quasi-cyclic structure — structure buys efficiency and inevitably buys additional attack surface, so HQC’s security argument must characterise the quasi-cyclic decoding problem separately and choose parameters more conservatively than for the fully random version. That is precisely the value of the standardisation review: quantify the risk the structure buys, then pay it back with parameter margin.
This is also the key to HQC’s positioning: its security foundation is not novel, but it is exceptionally solid — a problem from 1978, an attack line improved for sixty years that remains exponential, and a structure quantum computing cannot specialise against. For an algorithm whose job is to be the backup, that kind of boring is a virtue.
References
- E. R. Berlekamp, R. J. McEliece, H. C. A. van Tilburg, On the inherent intractability of certain coding problems, IEEE Transactions on Information Theory, 1978.
- R. J. McEliece, A public-key cryptosystem based on algebraic coding theory, DSN Progress Report, 1978.
- HQC official website (specification and security arguments). https://pqc-hqc.org
- NIST, NIST IR 8545: Status Report on the Fourth Round of the NIST Post-Quantum Cryptography Standardization Process, 2025. https://csrc.nist.gov/pubs/ir/8545/final
Tags: HQCSyndrome DecodingCode-Based CryptographySecurity