CK:
the cipher key
The length of CK is 128 bits. In case the effective key length k is smaller than 128 bits, the most significant bits of CK shall carry the effective key information, whereas the remaining, least significant bits shall repeat the effective key information:
CK[n] = CK[n mod k], for all n, such that k ≤ n < 128.
COUNT-C: the cipher sequence number.
COUNT-C[0], COUNT-C[1], …, COUNT-C[31]
The length of the COUNT-C parameter is 32 bits.
Sychronisation of the keystream is based on the use of a physical layer (Layer 1) frame counter combined with a hyperframe counter introduced to avoid re-use of the keystream. This allows the keystream to be synchronised every 10ms physical layer frame. The exact structure of the COUNT-C is specified in
TS 33.102.
BEARER: the radio bearer identifier.
BEARER[0], BEARER[1], …, BEARER[4]
The length of BEARER is 5 bits.
The same cipher key may be used for different radio bearers simultaneously associated with a single user which are multiplexed onto a single 10ms physical layer frame. To avoid using the same keystream to encrypt more than one bearer, the algorithm shall generate the keystream based on the identity of the radio bearer.
DIRECTION: the direction of transmission of the bearer to be encrypted.
The length of DIRECTION is 1 bit.
The same cipher key may be used for uplink and downlink channels simultaneously associated with a UE, which are multiplexed onto a single 10ms physical layer frame. To avoid using the same keystream to encrypt both uplink and downlink transmissions, the algorithm shall generate the keystream based on the direction of transmission.
The value of the DIRECTION is 0 for messages from UE to RNC and 1 for messages from RNC to UE.
An explicit direction value is required in preference to splitting the keystream segment into uplink and downlink portions to allow for asymmetric bearer services.
LENGTH: the required length of keystream.
LENGTH[0], LENGTH[1], …, LENGTH[15]
The length of LENGTH is 16 bits.
For a given bearer and transmission direction the length of the plaintext block that is transmitted during a single physical layer frame may vary. The algorithm shall generate a keystream block of variable length based on the value of the length parameter.
The input parameter LENGTH shall affect only the length of the KEYSTREAM BLOCK, not the actual bits in it.
The maximum RLC PDU / MAC SDU size is 5000 bits. The range of values of the length parameter will depend not only on the RLC PDU / MAC SDU size but also the number of RLC PDUs / MAC SDUs which may be sent in a single physical layer 10ms frame for a given bearer and transmission direction.
Not all values between the maximum and minimum values shall be required but it is expected that the ability to produce length values of whole numbers of octets between a minimum and a maximum value will be required.
KEYSTREAM: the output keystream.
KS [0], KS [1], …, KS [LENGTH-1]
The length of a keystream block equals the value of the input parameter LENGTH.
PLAINTEXT: the plaintext.
PT[0], PT[1], …, PT[LENGTH-1]
The length of a keystream block equals the value of the input parameter LENGTH.
This plaintext block consists of the payload of the particular RLC PDUs / MAC SDUs to be encrypted for a given bearer and transmission direction. It may consist of user traffic or signalling data:
-
For RLC UM mode, the plaintext block is the UMD PDU excluding the first octet, i.e. excluding the RLC UM PDU header (see TS 25.322).
-
For RLC AM mode, the plaintext block is the AMD PDU excluding the two first octets, i.e. excluding the RLC AM PDU header (see TS 25.322).
-
For RLC TM on DCH, the plaintext block consists of all the MAC SDUs containing data for one and the same radio bearer and sent in one Transmission Time Interval. In this case, the CFN part of COUNT-C for the plaintext block is the CFN for the first radio frame of the Transmission Time Interval containing the plaintext block. (see TS 25.321).
CIPHERTEXT: the ciphertext.
CT[0], CT[1], …, CT[LENGTH-1]
The length of a keystream block equals the value of the input parameter LENGTH.