The input parameters to the ciphering algorithm are a 128-bit cipher key named KEY, a 32-bit COUNT, a 5-bit bearer identity BEARER, the 1-bit direction of the transmission i.e. DIRECTION, and the length of the keystream required i.e. LENGTH. The DIRECTION bit shall be 0 for uplink and 1 for downlink.
Figure B.1-1 illustrates the use of the ciphering algorithm EEA to encrypt plaintext by applying a keystream using a bit per bit binary addition of the plaintext and the keystream. The plaintext may be recovered by generating the same keystream using the same input parameters and applying a bit per bit binary addition with the ciphertext.
Based on the input parameters the algorithm generates the output keystream block KEYSTREAM which is used to encrypt the input plaintext block PLAINTEXT to produce the output ciphertext block CIPHERTEXT.
The input parameter LENGTH shall affect only the length of the KEYSTREAM BLOCK, not the actual bits in it.
128-EEA1 is based on SNOW 3G and is identical to UEA2 as specified in
TS 35.215. The used IV is constructed the same way as in clause 3.4 of that TS.
128-EEA2 is based on 128-bit AES
[15] in CTR mode
[16].
The sequence of 128-bit counter blocks needed for CTR mode T1, T2, …, Ti, … shall be constructed as follows:
The most significant 64 bits of T1 consist of COUNT[0] .. COUNT[31] │ BEARER[0] .. BEARER[4] │ DIRECTION │ 0
26 (i.e. 26 zero bits). These are written from most significant on the left to least significant on the right, so for example COUNT[0] is the most significant bit of T1.
The least significant 64 bits of T1 are all 0.
Subsequent counter blocks are then obtained by applying the standard integer incrementing function (according to Appendix B1 in
[16]) mod 264 to the least significant 64 bits of the previous counter block.
128-EEA3 is based on ZUC and specified in
TS 35.221.