Has it been Pwned

How Classic McEliece works

A sender chooses a sparse pattern of errors and transmits its parity checks. The receiver can reconstruct that specific pattern using the hidden structure of a binary Goppa code.

Program status. NIST considered Classic McEliece in its fourth round and selected HQC for standardization. This guide describes the designers’ October 2022 core KEM. The catalog assessment covers later structural cryptanalysis and BSI guidance. NIST program history

Sending evidence of an error pattern

A linear code selects certain bit strings as valid codewords. A parity-check matrix maps those words to zero. Flipping a single bit adds one column of that matrix to the result. Flipping several bits adds their columns together. This result, called a syndrome, is generally much shorter than the original string.

In the Niederreiter form used here, the sender begins directly with a sparse error vector. It can compute the syndrome without producing a codeword at all. Anyone can perform this forward operation. A general linear solver can find some vector with the right syndrome, but it normally has the wrong number of nonzero entries. The receiver has a decoder for the particular structured code, which finds the correct sparse vector.

Why the fixed weight is essential

C = H e; H = [I | T]; wt(e) = t

C is the ciphertext syndrome. H is the binary parity-check matrix in systematic form, with an identity block I and a public block T. Multiplication and addition use binary arithmetic. The error vector e has exactly t entries equal to one.

If e and e′ share a syndrome, H(e + e′) is zero. Their difference is therefore a codeword. The code’s minimum distance keeps two distinct patterns of weight at most t from sharing a syndrome. This explains uniqueness for correctly generated keys. It does not give the public an efficient method for finding the vector.

Worked example

Suppose a toy parity-check matrix has three columns (1,0), (0,1) and (1,1). The syndrome for e = (0,0,1) is (1,1). So is the syndrome for (1,1,0). Requiring weight one selects the third position. At this scale anyone can list the columns. The real parameters and the cost of decoding the public code are essential.

From a sparse vector to a key

  1. Generate

    Choose an irreducible Goppa polynomial and an ordered field support that define the secret code. Convert its parity checks to the public systematic representation. Keep the decoding information and fallback material.

  2. Encapsulate

    Sample e uniformly from vectors of the specified weight and compute C = He. Hash a success-domain value, e and the ciphertext to derive the session key. Only C needs to be transmitted in the core KEM.

  3. Decapsulate

    Use the secret decoding information to recover a candidate error vector. Enforce the syndrome and weight conditions. If decoding fails, use the separate failure domain and secret fallback input to the key hash.

The price of hiding a decoder

Publishing the matrix block T makes Classic McEliece public keys large. A ciphertext carries only the syndrome. HQC makes a different engineering choice by keeping its error-correcting code public. For Classic McEliece, security analysis must consider both generic sparse decoding and attempts to exploit the particular Goppa structure hidden in the matrix. A working algebraic decoder for the key owner is part of the design. Recent estimates for recovering equivalent structure from a public key are a separate question, tracked in the linked catalog assessment. Constant-time decapsulation also matters because the internal decoding path handles private data.

What a challenge timing tells you

A GPU study reports five solutions at public TII challenge sizes, including TII-185 in its second revision. Use the measurements to compare work on matching instances. Evaluate production choices using the separate structural evidence and deployment guidance in the catalog.

Read the study and its scope →

What very high-rate codes revealed about CFS and the TII challenges →

Primary sources

Construction and program sources reviewed .