← Cryptography guide

K068 / Advanced and next-generation cryptography

Classic McEliece

Classic McEliece code-based · Survey date 2026-12-05

A code-based post-quantum KEM whose public key specifies a random binary Goppa code.

CRYPTOGRAPHY LAB / K068

Cryptography Lab · Classic McEliece

Run real computations and inspect intermediate states step by step.

Educational only. Never enter real passwords or secret keys. Computation stays in your browser; input and trace values are not sent to a server. Do not use this implementation in production.

Scope: Toy educational example

Classic McEliece systematic binary syndrome + toy exhaustive decoding (not Goppa KEM)

See the scope above for fixed examples, reduced parameters and supported variants. Standard operation names and formulas are retained.

Reference ↗

Open lab →

Definition and overview
A code-based post-quantum KEM whose public key specifies a random binary Goppa code. Source document ↗
Classification and reversibility
Code-based KEM recovering session key through decapsulation. Source document ↗
Key or secret requirements
Public/secret key pair and encapsulated session key. Source document ↗
Operating principle and structure
Public key represents random binary Goppa code; ciphertext adds random errors to codeword; secret key finds/removes errors. Source document ↗
Key size, block size and parameters
mceliece348864 example: pk 261120 B, sk 6492 B, ciphertext 96 B, session key 32 B; multiple sets. Source document ↗
Security strength and recommendation
BSI advised against new deployment in 2026; NIST standardization delayed. Source document ↗
Known attacks and vulnerabilities
Reported cryptanalysis includes structural distinguishers, public challenge key recovery and conditional recovery estimates. Source document ↗
Standards and certification
ISO/IEC standardized June 2026; NIST PQC round-four candidate with delayed NIST standardization. Source document ↗
Typical uses
KEM for securely agreeing/transmitting encapsulated session keys. Source document ↗
Implementations, libraries and tools
libmceliece C/CLI, Python mceliece and Rust implementations. Source document ↗
Decryption or decoding
Decapsulate ciphertext c with secret sk to recover session key k. Source document ↗
Advantages
Long history since 1978 McEliece, viewed as conservative code-based option. Source document ↗
Limitations and cautions
Very large public keys; caution given cryptanalytic progress and BSI advice against new deployment. Source document ↗
Distinguishing encryption, encoding and hashing
KEM, not ordinary encryption/hash/encoding; code encoding means coding process. Source document ↗

Practical examples

Examples are illustrative; they are not execution-tested implementations or operational recommendations.

Example

Sender encapsulates session key with receiver public key; receiver decapsulates using secret key to obtain same key. Use library APIs, no actual secret examples.

Procedure

keypair generates pk/sk; enc(pk) returns ciphertext/session key. dec(c,sk) recovers session key; decrypt ordinary data separately with symmetric cipher.

Scenario

Possible PQ hybrid TLS or messenger key agreement; suitable for interoperability testing/learning where large public keys are manageable and latest advice tracked.

Pitfalls and alternatives

Do not confuse KEM session-key output with plaintext recovery. Check large public-key costs, latest cryptanalysis/standardization; consider recommended ML-KEM for new systems.

References