Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

do U know a bout #comp_128 algorithm in mobile authentication

authentication process using A3 and A8 algorithms


comp 128 is a confidential algorithm operated in your mobile to extract SRES and
KC ( which used to encrypt your data )
COMP128 is an implementation of the A3 and A8 algorithms 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 the A5 algorithm to encrypt the data
transmitted between the mobile station and the BTS
this is the algorithm
comp128 : RAND, Ki -> SRES, Kc
{
x[32]: array of bytes
bit[128]: array of bits
m, n, y, z: integers
x[16..31] := RAND
for i := 1 to 8
x[0..15] := Ki
for j := 0 to 4
for k := 0 to 2j-1
for l := 0 to 24-j-1
m := l + k * 25-j
n := m + 24-j

y := (x[m] + 2 * x[n]) mod 29-j


z := (2 * x[m] + x[n]) mod 29-j
x[m] := Tj[y]
x[n] := Tj[z]
for j := 0 to 31
for k := 0 to 3
bit[4 * j + k] := x[j]3-k
if i < 8
for j := 0 to 15
for k := 0 to 7
x[j + 16]7-k := bit[((8 * j + k) * 17) mod 128]
SRES := bit[0..31]
Kc := bit[74..127] \| 00000000002
}

You might also like