Section: 4.3.2.7a Use of established security contexts
Content: In A/Gb mode, in the case of an established GSM security context, the GSM ciphering key shall be loaded from the SIM/USIM and taken into use by the ME when any valid CIPHERING MODE COMMAND is received during an RR connection (the definition of a valid CIPHERING MODE COMMAND message is given in 3GPP TS 44.018[ None ]  [84] subclause 3.4.7.2). In A/Gb mode, in the case of an established UMTS security context, the GSM ciphering key shall be loaded from the USIM and taken into use by the MS when a valid CIPHERING MODE COMMAND is received during an RR connection (the definition of a valid CIPHERING MODE COMMAND message is given in 3GPP TS 44.018[ None ]  [84] subclause 3.4.7.2) which indicates an A5 ciphering algorithm that requires a 64-bit ciphering key. The network shall derive a GSM ciphering key from the UMTS ciphering key and the UMTS integrity key by using the conversion function named "c3" defined in 3GPP TS 33.102[ 3G security; Security architecture ]  [5a]. In A/Gb mode, in the case of an established UMTS security context, the UMTS ciphering key and the UMTS integrity key shall be loaded from the USIM in order for the ME to derive the GSM Kc128 (see 3GPP TS 33.102[ 3G security; Security architecture ]  [5a]) and shall be taken into use by the ME when a valid CIPHERING MODE COMMAND is received during an RR connection (the definition of a valid CIPHERING MODE COMMAND message is given in 3GPP TS 44.018[ None ]  [84] subclause 3.4.7.2) which indicates an A5 ciphering algorithm that requires a 128-bit ciphering key. The network shall derive a GSM Kc128 from the UMTS ciphering key and the UMTS integrity as defined in 3GPP TS 33.102[ 3G security; Security architecture ]  [5a]. In Iu mode, in the case of an established GSM security context, the ME shall derive a UMTS ciphering key and a UMTS integrity key from the GSM ciphering key by using the conversion functions named "c4" and "c5" defined in 3GPP TS 33.102[ 3G security; Security architecture ]  [5a]. The GSM ciphering key shall be loaded from the SIM/USIM and the derived UMTS ciphering key and UMTS integrity key shall be taken into use by the MS when a valid SECURITY MODE COMMAND indicating CS domain is received during an RR connection (the definition of a valid SECURITY MODE COMMAND message is given in 3GPP TS 25.331[ None ]  [23c] and 3GPP TS 44.118[ None ]  [111]). The network shall derive a UMTS ciphering key and a UMTS integrity key from the GSM ciphering key by using the conversion functions named "c4" and "c5" defined in 3GPP TS 33.102[ 3G security; Security architecture ]  [5a]. In Iu mode, in the case of an established UMTS security context, the UMTS ciphering key and UMTS integrity key shall be loaded from the USIM and taken into use by the MS when a valid SECURITY MODE COMMAND indicating CS domain is received during a RR connection (the definition of a valid SECURITY MODE COMMAND message is given in 3GPP TS 25.331[ None ]  [23c] and 3GPP TS 44.118[ None ]  [111]). In Iu mode and A/Gb mode, if the MS received a valid SECURITY MODE COMMAND indicating CS domain in Iu mode or a valid CIPHERING MODE COMMAND in A/Gb mode before the network initiates a new Authentication procedure and establishes a new GSM/UMTS security context, the new keys are taken into use in the MS when a new valid SECURITY MODE COMMAND indicating CS domain in Iu mode, or a new valid CIPHERING MODE COMMAND in A/Gb mode, is received during the RR connection. In case of Iu mode to Iu mode handover, A/Gb mode to A/Gb mode handover, or inter-system change to A/Gb mode, the MS and the network shall continue to use the key from the old key set until a new valid SECURITY MODE COMMAND indicating CS domain in Iu mode, or a new valid CIPHERING MODE COMMAND in A/Gb mode, is received during the RR connection. In case of inter-system change to Iu mode, the MS and the network shall continue to use the keys from the old key set until the second valid SECURITY MODE COMMAND indicating CS domain is received during the RR connection. NOTE 1: If the MS received a valid SECURITY MODE COMMAND indicating CS domain in Iu mode or a valid CIPHERING MODE COMMAND in A/Gb mode before the inter-system change to Iu mode occurs, the first SECURITY MODE COMMAND message after the inter-system change, which indicates CS domain and includes only an Integrity protection mode IE, is initiated by the UTRAN without receipt of a corresponding RANAP security mode control procedure from the MSC/VLR. The only purpose of this SECURITY MODE COMMAND message is to activate the integrity protection, but not to load a new key set from the SIM/USIM (see 3GPP TS 25.331[ None ]  [23c] and 3GPP TS 44.118[ None ]  [111]). NOTE 2: If the MS did not receive any valid SECURITY MODE COMMAND indicating CS domain in Iu mode or any valid CIPHERING MODE COMMAND in A/Gb mode before the inter-system change to Iu mode occurs, the first SECURITY MODE COMMAND message after the inter-system change, which indicates CS domain, is initiated by the UTRAN on receipt of a RANAP security mode control procedure from the MSC/VLR. The purpose of this SECURITY MODE COMMAND message is to load a key set from the SIM/USIM and to activate either integrity protection or ciphering and integrity protection (see 3GPP TS 25.331[ None ]  [23c] and 3GPP TS 44.118[ None ]  [111]).