Has it been Pwned

How BIKE works

BIKE publishes one dense-looking cyclic relation and keeps two sparse parity checks. Those private checks help a decoder decide which positions of a hidden error vector to flip.

Program status. BIKE reached the fourth round of the NIST process. NIST selected HQC in 2025, citing among its reasons greater confidence in HQC’s decryption-failure analysis. The equations below use the BIKE Round 4 submission. NIST program history

How sparse checks guide decoding

Imagine trying to correct a corrupted word when every unsatisfied parity check points to a set of possible positions. With the secret checks in BIKE, a position involved in many unsatisfied checks is a plausible place to flip a bit. The decoder updates its estimate and recomputes the checks over several iterations. The private pattern of checks makes this procedure useful to the receiver.

A moderate-density parity-check code uses sparse checks, with more nonzero coefficients than in a typical low-density code. BIKE also uses cyclic structure. Shifting a parity check gives another related check, so an entire matrix can be represented by a small number of binary polynomials. The sender uses the public relation to produce a decoding problem with an error pattern of prescribed weight.

Converting the public syndrome into the private one

h = h₁ h₀⁻¹; c₀ = e₀ + e₁ h; c₀ h₀ = e₀ h₀ + e₁ h₁

h₀ and h₁ are sparse private polynomials, and h is public. The two parts e₀ and e₁ together have the required error weight. Arithmetic uses binary coefficients in a ring with Xʳ = 1, where r is the block length. Key generation requires h₀ to be invertible.

The sender can calculate c₀ with h alone. Multiplying c₀ by h₀ transforms it into the syndrome expressed with the private sparse checks. The public product normally looks dense. That asymmetry is what a simple picture of several parity votes alone leaves unexplained. Analysis must address both decoding a ciphertext and finding a usable sparse check for the public code.

Worked example

Over binary polynomials with X³ = 1, take h₀ = X and h₁ = 1 + X. Since X⁻¹ = X², h = 1 + X². For e₀ = 1 and e₁ = X, c₀ = X. Both c₀h₀ and e₀h₀ + e₁h₁ equal X². This tests the algebra only. These toy polynomials do not meet BIKE’s key-generation or error-weight rules.

What the two ciphertext components do

  1. Generate

    Sample a secret pair of checks satisfying the scheme’s conditions, form their public quotient and retain a secret fallback value.

  2. Encapsulate

    Choose a random message m and hash it into an error pair. Send c₀ plus a second component masking m with a hash of that pair. Derive the shared key by hashing m together with the ciphertext.

  3. Decapsulate

    Use private bit-flipping decoding to estimate the error pair. Recover a candidate m and regenerate its error pair. Only a matching pair qualifies for the success key derivation. Other inputs use fallback material.

Why failure estimates affected selection

Bit flipping is an iterative algorithm. Even a well-formed ciphertext can occasionally produce an error pattern it fails to correct. Estimating a very small failure probability across keys and ciphertexts is different from observing average performance in a modest test. Parameters, decoding thresholds and the model used to extrapolate rare failures all matter. The catalog records NIST’s selection outcome separately from practical key recovery. Implementation measurements also need to account for whether internal iterations and failures can be distinguished from outside the receiver.

Primary sources

Construction and program sources reviewed .