Within the security architecture of the 3GPP system there are two standardised algorithms: A confidentiality algorithm
f8, and an integrity algorithm
f9. These algorithms are fully specified here. Each of these algorithms is based on the
KASUMI algorithm that is specified in a companion document [4].
KASUMI is a block cipher that produces a 64bit output from a 64bit input under the control of a 128bit key.
The confidentiality algorithm
f8 is a stream cipher that is used to encrypt/decrypt blocks of data under a confidentiality key
CK. The block of data may be between 1 and 20000 bits long. The algorithm uses
KASUMI in a form of outputfeedback mode as a keystream generator.
The integrity algorithm
f9 computes a 32bit MAC (Message Authentication Code) of a given input message using an integrity key
IK. The approach adopted uses
KASUMI in a form of CBCMAC mode.
2.2.1 Radix
We use the prefix 0x to indicate hexadecimal numbers.
2.2.2 Conventions
We use the assignment operator '=', as used in several programming languages. When we write

<variable> = <expression>
we mean that <variable> assumes the value that <expression> had before the assignment took place. For instance,
means
(new value of x) becomes (old value of x) + (old value of y) + 3.
2.2.3 Bit/Byte ordering
All data variables in this specification are presented with the most significant bit (or byte) on the left hand side and the least significant bit (or byte) on the right hand side. Where a variable is broken down into a number of substrings, the left most (most significant) substring is numbered 0, the next most significant is numbered 1 and so on through to the least significant.
For example an nbit MESSAGE is subdivided into 64bit substrings MB
_{0}, MB
_{1}… MB
_{i} so if we have a message:

0x0123456789ABCDEFFEDCBA987654321086545381AB594FC28786404C50A37…
we have:

MB_{0} = 0x0123456789ABCDEF

MB_{1} = 0xFEDCBA9876543210

MB_{2} = 0x86545381AB594FC2

MB_{3} = 0x8786404C50A37…
In binary this would be:

000000010010001101000101011001111000100110101011110011011110111111111110…
with

MB_{0} = 0000000100100011010001010110011110001001101010111100110111101111

MB_{1} = 1111111011011100101110101001100001110110010101000011001000010000

MB_{2} = 1000011001010100010100111000000110101011010110010100111111000010

MB_{3} = 1000011110000110010000000100110001010000101000110111…
2.2.4 List of Symbols Word‑p. 10
=
The assignment operator.
⊕
The bitwise exclusiveOR operation.

The concatenation of the two operands.
KASUMI[x]k
The output of the KASUMI algorithm applied to input value x
using the key k.
X[i]
The ith bit of the variable X. (X = X[0]  X[1]  X[2]  ….. ).
Yi
The ith block of the variable Y. (Y = Y0  Y1  Y2  …. ).
A, B
are 64bit registers that are used within the f8 and f9 functions to hold intermediate values.
BEARER
a 5bit input to the f8 function.
BLKCNT
a 64bit counter used in the f8 function.
BLOCKS
an integer variable indicating the number of successive applications of KASUMI that need to be performed, for both the f8 and f9 functions.
CK
a 128bit confidentiality key.
COUNT
a 32bit time variant input to both the f8 and f9 functions.
DIRECTION
a 1bit input to both the f8 and f9 functions indicating the direction of transmission (uplink or downlink).
FRESH
a 32bit random input to the f9 function.
IBS
the input bit stream to the f8 function.
IK
a 128bit integrity key.
KM
a 128bit constant that is used to modify a key. This is used in both the f8 and f9 functions. (It takes a different value in each function).
KS[i]
is the ith bit of keystream produced by the keystream generator.
KSBi
is the ith block of keystream produced by the keystream generator. Each block of keystream comprises 64 bits.
LENGTH
is an input to the f8 and f9 functions. It specifies the number of bits in the input bitstream.
MACI
is the 32bit message authentication code (MAC) produced by the integrity function f9.
MESSAGE
is the input bitstream of LENGTH bits that is to be processed by the f9 function.
OBS
the output bit streams from the f8 function.
PS
is the input padded string processed by the f9 function.
REGISTER
is a 64bit value that is used within the f8 function.