COMP128
COMP128: the GSM SIM authentication algorithm, whose version 1 is broken and kept for reference
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–1998COMP128-1 reverse engineered and broken by Briceno, Goldberg and Wagner
How it works
- The 128-bit challenge is expanded through a fixed sequence of table lookups and permutations.
- The output is split into a short response and a session key.
- 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
Variants in NextSSL
3Frequently 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.
Families with similar names
Other key derivation
All 10Related
The Advanced Encryption Standard: the world's default 128-bit block cipher
KASUMIThe 3GPP block cipher behind A5/3, derived from MISTY1
HMAC_DRBGNIST SP 800-90A deterministic random bit generator built on HMAC
MILENAGEMILENAGE: the 3GPP AES-128 authentication and key agreement function set, unverified in NextSSL
TUAKTUAK: the 3GPP Keccak-based alternative to MILENAGE for mobile authentication and key generation
HMACThe standard way to build a MAC from a cryptographic hash (RFC 2104, FIPS 198-1)