KDF family

COMP128

COMP128: the GSM SIM authentication algorithm, whose version 1 is broken and kept for reference

broken 3 variants

Overview

COMP128 is the authentication algorithm used on GSM SIM cards to produce authentication responses and session keys. NextSSL carries three versions, and COMP128-1 is marked broken.

COMP128 takes a 128-bit challenge and a 128-bit key and produces a short response and session key through a fixed table-driven construction. Version 1 is the one used in early GSM networks, and versions 2 and 3 were later designs. Functions like this one are specified by 3GPP and run inside mobile operator networks, so they are rarely used outside that setting.

NextSSL lists the three variants comp128-1, comp128-2, comp128-3, each with a 16-byte key and 12-byte output. COMP128-1 is marked broken because published attacks recovered the key from the SIM algorithm's output. Interoperability with a network requires following the specification exactly, including byte order and input layout. NextSSL keeps this entry for research and test vectors, and the registry does not record a review of its design.

COMP128 belongs to the telecom authentication family rather than general-purpose cryptography. Use it only for compatibility with legacy SIMs, and use AES-based or 3GPP algorithms for new work. For general key derivation, HKDF or another standard function is the usual choice. Functions like this one are specified by 3GPP and run inside mobile operator networks, so they are rarely used outside that setting.

History

1998–1998
  1. COMP128-1 reverse engineered and broken by Briceno, Goldberg and Wagner

How it works

  1. The 128-bit challenge is expanded through a fixed sequence of table lookups and permutations.
  2. The output is split into a short response and a session key.
  3. The response is returned to the network, and the session key is kept on the SIM.

Security notes

COMP128-1 is broken, and the other two versions are unverified. Do not use COMP128 for new authentication systems.

Typical uses

GSM SIM authentication researchCompatibility with legacy SIMsNot recommended for new systems

Variants in NextSSL

3
AlgorithmTierSizes (bytes)StandardsAPI
Comp128-1
comp128-1
broken key 16 · out 12 · salt 16 · info 0 — root
Comp128-2
comp128-2
unverified key 16 · out 12 · salt 16 · info 0 — root
Comp128-3
comp128-3
unverified key 16 · out 12 · salt 16 · info 0 — root

Frequently asked questions

What is COMP128?

COMP128 is the authentication algorithm used on GSM SIM cards to produce authentication responses and session keys.

Is COMP128 secure?

COMP128-1 is broken, and the other two versions are unverified.

What digest sizes does COMP128 produce?

The archived COMP128 variants are: comp128-1 gives 12 bytes; comp128-2 gives 12 bytes; comp128-3 gives 12 bytes.

Which COMP128 variants does NextSSL include?

NextSSL registers 3 COMP128 variants: comp128-1, comp128-2, comp128-3.