KASUMI

KASUMI is a block cipher used in UMTS, GSM, and GPRS mobile communications systems. In UMTS, KASUMI is used in the confidentiality (f8) and integrity algorithms (f9) with names UEA1 and UIA1, respectively. In GSM, KASUMI is used in the A5/3 key stream generator and in GPRS in the GEA3 key stream generator.

KASUMI was designed for 3GPP to be used in UMTS security system by the Security Algorithms Group of Experts (SAGE), a part of the European standards body ETSI. Because of schedule pressures in 3GPP standardization, instead of developing a new cipher, SAGE agreed with 3GPP technical specification group (TSG) for system aspects of 3G security (SA3) to base the development on an existing algorithm that had already undergone some evaluation. They chose the cipher algorithm MISTY1 developed and patented by Mitsubishi Electric Corporation. The original algorithm was slightly modified for easier hardware implementation and to meet other requirements set for 3G mobile communications security.

KASUMI is named after the original algorithm MISTY1 &mdash; 霞み (hiragana かすみ, romaji kasumi) is the Japanese word for "mist".

In January 2010, Orr Dunkelman, Nathan Keller and Adi Shamir released a paper showing that they could break Kasumi with a related-key attack and very modest computational resources; this attack is ineffective against MISTY1.

Description
KASUMI algorithm is specified in a 3GPP technical specification. KASUMI is a block cipher with 128-bit key and 64-bit input and output. The core of KASUMI is an eight-round Feistel network. The round functions in the main Feistel network are irreversible Feistel-like network transformations. In each round the round function uses a round key which consists of eight 16-bit sub keys derived from the original 128-bit key using a fixed key schedule.

Key schedule
The 128-bit key K is divided into eight 16-bit sub keys Ki:

$$K=K_1 \| K_2 \| K_3 \| K_4 \| K_5 \| K_6 \| K_7 \| K_8\,$$

Additionally a modified key K', similarly divided into 16-bit sub keys K'i, is used. The modified key is derived from the original key by XORing with 0x123456789ABCDEFFEDCBA9876543210 (chosen as a "nothing up my sleeve" number).

Round keys are either derived from the sub keys by bitwise rotation to left by a given amount and from the modified sub keys (unchanged).

The round keys are as follows:

$$ \begin{array}{lcl} KL_{i,1} & = & {\rm ROL}(K_i,1) \\ KL_{i,2} & = & K'_{i+2} \\ KO_{i,1} & = & {\rm ROL}(K_{i+1},5) \\ KO_{i,2} & = & {\rm ROL}(K_{i+5},8) \\ KO_{i,3} & = & {\rm ROL}(K_{i+6},13) \\ KI_{i,1} & = & K'_{i+4} \\ KI_{i,2} & = & K'_{i+3} \\ KI_{i,3} & = & K'_{i+7} \end{array} $$

Sub key index additions are cyclic so that if i+j is greater than 8 one has to subtract 8 from the result to get the actual sub key index.

The algorithm
KASUMI algorithm processes the 64-bit word in two 32-bit halves, left ($$L_i$$) and right ($$R_i$$). The input word is concatenation of the left and right halves of the first round:

$${\rm input} = R_0\|L_0\,$$.

In each round the right half is XOR'ed with the output of the round function after which the halves are swapped:

$$\begin{array}{rcl}L_i & = & F_i(KL_i,KO_i,KI_i,L_{i-1})\oplus R_{i-1} \\ R_i & = & L_{i-1}\end{array}$$

where KLi, KOi, KIi are round keys for the ith round.

The round functions for even and odd rounds are slightly different. In each case the round function is a composition of two functions FLi and FOi. For an odd round

$$F_i(K_i,L_{i-1})=FO(KO_i, KI_i, FL(KL_i, L_{i-1}))\,$$

and for an even round

$$F_i(K_i,L_{i-1})=FL(KL_i, FO(KO_i, KI_i, L_{i-1}))\,$$.

The output is the concatenation of the outputs of the last round.

$${\rm output} = R_8\|L_8\,$$.

Both FL and FO functions divide the 32-bit input data to two 16-bit halves. The FL function is an irreversible bit manipulation while the FO function is an irreversible three round Feistel-like network.

Function FL
The 32-bit input x of $$FL(KL_i,x)$$ is divided to two 16-bit halves $$x=l\|r$$. First the left half of the input $$l$$ is ANDed bitwise with round key $$KL_{i,1}$$ and rotated left by one bit. The result of that is XOR'ed to the right half of the input $$r$$ to get the right half of the output $$r'$$.

$$r'= {\rm ROL}(l \wedge KL_{i,1},1) \oplus r$$

Then the right half of the output $$r'$$ is ORed bitwise with the round key $$KL_{i,2}$$ and rotated left by one bit. The result of that is XOR'ed to the left half of the input $$l$$ to get the left half of the output $$l'$$.

$$l'= {\rm ROL}(r' \vee KL_{i,2},1) \oplus l$$

Output of the function is concatenation of the left and right halves $$x'=l'\|r'$$.

Function FO
The 32-bit input x of $$FO(KO_i, KI_i, x)$$ is divided into two 16-bit halves $$x=l_0\|r_0$$, and passed through three rounds of a Feistel network.

In each of the three rounds (indexed by j that takes values 1, 2, and 3) the left half is modified to get the new right half and the right half is made the left half of the next round.

$$ \begin{array}{lcl} r_j & = & FI(KI_{i,j}, l_{j-1} \oplus KO_{i,j}) \oplus r_{j-1} \\ l_j & = & r_{j-1} \end{array} $$

The output of the function is $$x' = l_3\|r_3$$.

Function FI
The function FI is an irregular Feistel-like network.

The 16-bit input $$x$$ of the function $$FI(Ki,x)$$ is divided to two halves $$x=l_0\|r_0$$ of which $$l_0$$ is 9 bits wide and $$r_0$$ is 7 bits wide.

Bits in the left half $$l_0$$ are first shuffled by 9-bit substitution box (S-box) S9 and the result is XOR'ed with the zero-extended right half $$r_0$$ to get the new 9-bit right half $$r_1$$.

$$r_1=S9(l_0)\oplus (00\|r_0)\,$$

Bits of the right half $$r_0$$ are shuffled by 7-bit S-box S7 and the result is XOR'ed with the seven least significant bits (LS7) of the new right half $$r_1$$ to get the new 7-bit left half $$l_1$$.

$$l_1=S7(r_0)\oplus LS7(r_1)\,$$

The intermediate word $$x_1=l_1\|r_1$$ is XORed with the round key KI to get $$x_2=l_2\|r_2$$ of which $$l_2$$ is 7 bits wide and $$r_2$$ is 9 bits wide.

$$x_2=KI\oplus x_1$$

Bits in the right half $$r_2$$ are then shuffled by 9-bit S-box S9 and the result is XOR'ed with the zero-extended left half $$l_2$$ to get the new 9-bit right half of the output $$r_3$$.

$$r_3=S9(r_2)\oplus (00\|l_2)\,$$

Finally the bits of the left half $$l_2$$ are shuffled by 7-bit S-box S7 and the result is XOR'ed with the seven least significant bits (LS7) of the right half of the output $$r_3$$ to get the 7-bit left half $$l_3$$ of the output.

$$l_3=S7(l_2)\oplus LS7(r_3)\,$$

The output is the concatenation of the final left and right halves $$x'=l_3\|r_3$$.

Substitution boxes
The substitution boxes (S-boxes) S7 and S9 are defined by both bit-wise AND-XOR expressions and look-up tables in the specification. The bit-wise expressions are intended to hardware implementation but nowadays it is customary to use the look-up tables even in the HW design.

S7 is defined by the following array:

S9 is defined by the following array:

Cryptanalysis
In 2001, an impossible differential attack on six rounds of KASUMI was presented by Kühn (2001).

In 2003 Elad Barkan, Eli Biham and Nathan Keller demonstrated man-in-the-middle attacks against the GSM protocol which avoided the A5/3 cipher and thus breaking the protocol. This approach does not attack the A5/3 cipher, however. The full version of their paper was published later in 2006.

In 2005, Israeli researchers Eli Biham, Orr Dunkelman and Nathan Keller published a related-key rectangle (boomerang) attack on KASUMI that can break all 8 rounds faster than exhaustive search. The attack requires 254.6 chosen plaintexts, each of which has been encrypted under one of four related keys, and has a time complexity equivalent to 276.1 KASUMI encryptions. While this is obviously not a practical attack, it invalidates some proofs about the security of the 3GPP protocols that had relied on the presumed strength of KASUMI.

In 2010, Dunkelman, Keller and Shamir published a new attack that allows an adversary to recover a full A5/3 key by related-key attack. The time and space complexities of the attack are low enough that the authors carried out the attack in two hours on an Intel Core 2 Duo desktop computer even using the unoptimized reference KASUMI implementation. The authors note that this attack may not be applicable to the way A5/3 is used in 3G systems; their main purpose was to discredit 3GPP's assurances that their changes to MISTY wouldn't significantly impact the security of the algorithm.