ArticleslgStudy

science

COMP128

COMP128 is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand COMP128 rather than just read about it. In short: The COMP128 algorithms are implementations of the A3 and A8 functions defined in the GSM standard. A3 is used to authenticate the mobile station to the network.

Key takeaways

  • COMP128 belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect COMP128 to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of COMP128 from memory before moving on to harder problems.

Reference excerpt

The COMP128 algorithms are implementations of the A3 and A8 functions defined in the GSM standard. A3 is used to authenticate the mobile station to the network. A8 is used to generate the session key used by A5 to encrypt the data transmitted between the mobile station and the BTS. There are three versions of COMP128. They were originally confidential. A partial description of the first version was leaked in 1997 and completed via reverse engineering. This led to a full publication in 1998. The second and third versions were obtained via reverse engineering of software which verifies SIM cards compliance.

Introduction For details on the way A3 and A8 are used see Authentication Center. A3 and A8 both take a 128-bit key (Ki) and a 128-bit challenge (RAND) as inputs. A3 produces a 32-bit response (SRES) and A8 produces a 64-bit session key (Kc). A3/A8 is the combined function with Ki and RAND as inputs and SRES and Kc as outputs. As A3 and A8 are not further specified, operators can freely choose the concrete algorithms used for A3 and A8.

COMP128 algorithms The COMP128 algorithms implement the A3/A8 function. There are three of them:

COMP128-1 – original algorithm with known weaknesses COMP128-2 – stronger algorithm which still clears the 10 rightmost bits of Kc COMP128-3 – same algorithm as COMP128-2 with all 64 bits of Kc generated All of them are built around a compression function with two 128 bits inputs and one 128 bits output, hence their names. Ki and RAND are used as the inputs of the compression function. Bits from its output are then used to fill SRES and Kc.

COMP128-1 description COMP128-1 uses a compression function with eight rounds which is based on a butterfly structure with five stages. SRES is filled with the first 32 bits of the output. Kc is filled with the last 54 bits of the output followed by ten zeroes. For a full description of the algorithm, the reader can view the OsmocomBB implementation.

COMP128-2/3 description The implementation of COMP128-2 and COMP128-3 is noticeably more complex than COMP128-1. For a full description of the algorithm, the reader can view the OsmocomBB implementation or FreeRADIUS implementation, both based on the Python code from the Secrets of Sim article. COMP128-2 is identical to COMP128-3 except for the fact that at the end, it clears the 10 rightmost bits of Kc.

Security The COMP128-1 hash function is considered weak because there is insufficient diffusion of small changes in the input. Practical attacks have been demonstrated that can recover the subscriber key from the SIM. The session keys produced by COMP128-1 and COMP128-2 intentionally have only 54 bits of entropy. This significantly weakens the A5 or A6 encryption.

References

External links Briceno, Marc; Goldberg, Ian (1998), GSM Cloning Handschuh, Helena; Paillier, Pascal (2000), Reducing the Collision Probability of Alleged Comp128

Worked examples

Example 1 — a first encounter with COMP128

Start with the simplest possible case. Write down what COMP128 claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to COMP128 before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about COMP128 ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of COMP128

In research
COMP128 appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses COMP128 in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
COMP128 is common in secondary-school and first-year university syllabi. It links to neighbouring topics GSM standard, so understanding it makes those chapters shorter.
In everyday life
Look for COMP128 outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “COMP128” →

How to study COMP128 in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what COMP128 means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain COMP128 out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is COMP128 in simple terms?

The COMP128 algorithms are implementations of the A3 and A8 functions defined in the GSM standard. A3 is used to authenticate the mobile station to the network.

Why does COMP128 matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study COMP128?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on COMP128.

Tags

  • GSM standard

Keep exploring