Has it been Pwned

How FrodoKEM works

Two parties perform noisy matrix multiplications in opposite orders. A shared matrix product cancels at the receiver, leaving a small matrix close to an encoding of the sender’s random bits.

Program status. FrodoKEM has an ISO standard, ISO/IEC 18033-2 Amendment 2:2026. NIST did not select it. The public algorithm description used here is the designers’ Internet-Draft 03. NIST program history

See what Anthropic’s lattice papers mean for FrodoKEM.

What plain Learning with Errors contributes

Imagine simultaneous linear equations with a hidden vector of coefficients. If all the right-hand sides are exact and the equations have sufficient rank, elimination can recover those coefficients. FrodoKEM adds small independent errors to products computed modulo an integer q. Ordinary elimination now combines errors along with the equations. The intended difficulty is distinguishing these samples from uniform data or recovering the small private inputs.

FrodoKEM makes its large public matrix from pseudorandom entries. Unlike ML-KEM, it uses no polynomial multiplication ring to pack many related entries together. A short seed regenerates the large public matrix, but the products that travel in the public key and the ciphertext still take substantial space. This design trades bandwidth and computation for a comparatively direct use of ordinary matrix LWE.

The shared product in the middle

B = A S + E; B′ = S′ A + E′; C = S′ B + E″ + Encode(m)

A is the public square matrix. S and E are the receiver’s secret and error matrices. S′ and E′ are fresh sender matrices and E″ is another error matrix. The sender encodes the internal value m as separated levels in a small matrix. All arithmetic wraps modulo q.

The receiver subtracts B′S from C. Multiplying out shows the large term S′AS on both sides. The residue is Encode(m) + S′E + E″ − E′S. Sampling small secrets as well as small errors helps keep this difference within the rounding margins. The sender’s matrix multiplies from the left and the receiver’s from the right. Keeping this order is essential because matrices generally do not commute.

Worked example

For a scalar illustration modulo 32, use A = 7, S = 2, E = 1, S′ = 3, E′ = 1, E″ = 0 and Encode(m) = 16. Then B = 15, B′ = 22 and C = 29. The residue is 29 − 44 = 17 modulo 32, one away from 16. The tiny instance illustrates recovery of one rounded symbol.

How the receiver checks a ciphertext

  1. Generate

    Expand a public seed into A and sample the private matrices. Publish the seed and a packed representation of B. Keep the secret matrix and fallback material.

  2. Encapsulate

    Generate a random internal value and the profile’s salt. Derive sampling seeds and intermediate key material with a hash that binds the public key. Compute and pack the two ciphertext matrices, then derive the shared secret from the ciphertext and intermediate key material.

  3. Decapsulate

    Recover an internal candidate by rounding C − B′S. Regenerate both matrices and compare them with the received ciphertext. Select the proper intermediate material for the final shared-secret derivation without exposing the outcome.

Choosing a compatible profile

The names 640, 976 and 1344 identify the large matrix dimension. The AES and SHAKE choices specify how to expand A. The separate ephemeral eFrodoKEM variant limits the number of ciphertexts allowed per public key and changes the randomness and salt parameters. An implementation that accidentally treats an ephemeral key as an unrestricted long-lived key changes a security premise. Protocol identifiers and key lifetimes therefore matter alongside the LWE equations.

Primary sources

Construction and program sources reviewed .