Tech-invite3GPPspecsSIPRFCs
Overview21222324252627282931323334353637384‑5x

Content for  TS 31.102  Word version:  17.1.0

Top   Top   Up   Prev   Next
0…   3…   4…   4.2.9…   4.2.17…   4.2.26…   4.2.34…   4.2.44…   4.2.52…   4.2.60…   4.2.68…   4.2.76…   4.2.85…   4.2.93…   4.2.101…   4.2.107…   4.3…   4.4.2…   4.4.2.4…   4.4.3…   4.4.4…   4.4.5…   4.4.6…   4.4.8…   4.4.8.7…   4.4.9…   4.4.11…   4.4.11.7…   4.5…   4.6…   4.7   5…   5.2   5.3   5.4…   5.9…   6…   7…   7.1.2…   7.3…   A   B…   D   E…   G   H…   I…   L…   M…

 

7  USIM Commands

7.1  AUTHENTICATE

7.1.1  Command description

The function can be used in several different contexts:
  • a 3G security context, when 3G authentication vectors (RAND, XRES, CK, IK, AUTN) are available (i.e. the UE is located in the UTRAN, or in a GSM radio access network which is connected to a 3G or 3G capable VLR/SGSN), or
  • a GSM security context, when GSM authentication data are available only (i.e. the UE is located in the GSM radio access network which is connected to a non-3G capable VLR/SGSN)
  • a VGCS/VBS security context, when VGCS/VBS authentication data is available
  • a GBA_U security context, when a GBA bootstrapping procedure is requested
  • a MBMS security context, when a MBMS security procedure is requested
  • a Local Key Establishment security context, when a Local Key Establishment procedure is requested.
The function is used in GSM or 3G security context during the procedure for authenticating the USIM to its HE and vice versa. In addition, a cipher key and an integrity key are calculated. For the execution of the command the USIM uses the subscriber authentication key K, which is stored in the USIM.
The function is used in VGCS/VBS security context during the procedure for retrieving the VGCS/VBS Short Term Key (VSTK) used by the terminal in establishing VGCS/VBS calls.
The function is used in GBA security context in two different modes:
  1. Bootstrapping Mode: during the procedure for mutual authenticating of the USIM and the Bootstrapping Server Function (BSF) and for deriving bootstrapped key material from the AKA run.
  2. NAF Derivation Mode: during the procedure for deriving Network Application Function (NAF) specific keys from previous bootstrapped key material.
The function is used in MBMS security context in two different modes:
  1. MSK Update Mode: during the procedure for updating an MBMS Service Key (MSK).
  2. MTK Generation Mode: during the procedure for retrieving the MBMS Traffic Key (MTK) used by the terminal to decrypt MBMS data.
The function is related to a particular USIM and shall not be executable unless the USIM application has been selected and activated, and the current directory is the USIM ADF or any subdirectory under this ADF and a successful PIN verification procedure has been performed (see clause 5).
Up

7.1.1.1  3G security contextWord‑p. 265
The USIM first computes the anonymity key AK = f5K (RAND) and retrieves the sequence number SQN = (SQN ⊕ AK) ⊕ AK.
Then the USIM computes XMAC = f1K (SQN || RAND || AMF) and compares this with the MAC which is included in AUTN. If they are different, the USIM abandons the function.
Next the USIM verifies that the received sequence number SQN is previously unused. If it is unused and its value is lower than SQNMS, it shall still be accepted if it is among the last 32 sequence numbers generated. A possible verification method is described in TS 33.102.
If the USIM detects the sequence numbers to be invalid, this is considered as a synchronisation failure and the USIM abandons the function. In this case the command response is AUTS, where:
AUTS = Conc(SQNMS) || MACS;
Conc(SQNMS) = SQNMS ⊕ f5*K(RAND) is the concealed value of the counter SQNMS in the USIM; and.
MACS = f1*K(SQNMS || RAND || AMF) where:
RAND is the random value received in the current user authentication request;
the AMF assumes a dummy value of all zeroes so that it does not need to be transmitted in clear in the resynchronisation message.
If the sequence number is considered in the correct range, the USIM computes RES = f2K (RAND), the cipher key CK = f3K (RAND) and the integrity key IK = f4K (RAND) and includes these in the command response. Note that if this is more efficient, RES, CK and IK could also be computed earlier at any time after receiving RAND.
The use of AMF is HE specific and while processing the command, the content of the AMF has to be interpreted in the appropriate manner. The AMF may e.g. be used for support of multiple algorithms or keys or for changing the size of lists, see TS 33.102.
If Service No. 27 is "available", the USIM calculates the GSM response parameter KC, using the conversion function defined in TS 33.102.
Input:
  • RAND, AUTN (AUTN:= SQN ⊕ AK || AMF || MAC).
Output:
  • RES, CK, IK if Service No. 27 is "not available", or
  • RES, CK, IK, KC if Service No. 27 is "available", or
  • AUTS.
Up

7.1.1.2  GSM security contextWord‑p. 266
USIM operation in an GSM security context is supported if Service No. 38 is "available".
The USIM computes RES = f2K (RAND), the cipher key CK = f3K (RAND) and the integrity key IK = f4K (RAND). Next the USIM calculates the GSM response parameters SRES and KC, using the conversion functions defined in TS 33.102.
Input:
  • RAND.
Output:
  • SRES; KC.
Up

7.1.1.3  VGCS/VBS security context |R6|

USIM operation in a VGCS/VBS security context is supported if both Service No. 57 and Service No. 64 are "available" (VGCS security context) or if both Service No. 58 and Service No. 65 are "available" (VBS security context).
The USIM computes the Short Term Key (VSTK) associated with a particular VGCS/VBS Group Identifier (Group_Id). For this computation, the USIM uses the Voice Group (for VGCS) or Broadcast Group (for VBS) Key (V_Ki) identified by their respective Group_Id and Master Group Key Identifier (VK_Id). The USIM retrieves the Group_Id and the service flag (VGCS or VBS) from the received Voice Service Identifier (Vservice_Id).
The USIM shall first search if the Group_Id corresponds to a stored VGCS Group Identifier in EF VGCS or a stored VBS Group Identifier in EF VBS.
Then, the USIM shall retrieve the V_Ki corresponding to the given Group_Id and VK_Id.
Then the USIM uses V_Ki and VSTK_RAND as input parameters for the A8_V key derivation function (as defined in TS 43.020) in order to compute and returns VSTK.
Input:
  • Vservice_Id, VK_Id, VSTK_RAND
Output:
  • VSTK.
Up

7.1.1.4  GBA security context (Bootstrapping Mode) |R6|

USIM operations in GBA security context are supported if service No. 68 is "available".
The USIM receives the RAND and AUTN*. The USIM first computes the anonymity key AK = f5K (RAND) and retrieves the sequence number SQN = (SQN ⊕ AK) ⊕ AK.
The USIM calculates IK = f4K (RAND) and MAC (by performing the MAC modification function described in TS 33.220). Then the USIM computes XMAC = f1K (SQN || RAND || AMF) and compares this with the MAC previously produced. If they are different, the USIM abandons the function.
Then the USIM performs the checking of AUTN* as in UMTS security context. If the USIM detects the sequence numbers to be invalid, this is considered as a synchronisation failure and the USIM abandons the function. In this case the command response is AUTS, which is computed as in UMTS security context.
If the sequence number is considered in the correct range, the USIM computes RES = f2K (RAND) and the cipher key CK = f3K (RAND).
The USIM then derives and stores GBA_U bootstrapped key material from CK, IK values. The USIM shall also stores RAND in the RAND field of EF GBABP
The USIM stores GBA_U bootstrapped key material from only one bootstrapping procedure. The previous bootstrapped key material, if present, shall be replaced by the new one. This key material is linked with the data contained in EF GBABP : RAND, which is updated by the USIM and B-TID, which shall be further updated by the ME.
RES is included in the command response after flipping the least significant bit.
Input:
  • RAND, AUTN*
Output:
  • RES
or
  • AUTS
Up

7.1.1.5  GBA security context (NAF Derivation Mode) |R6|Word‑p. 267
USIM operations in GBA security context are supported if service No. 68 is "available".
The USIM receives the NAF_ID and IMPI.
The USIM performs Ks_ext_NAF and Ks_int_NAF derivation as defined in TS 33.220 using the key material from the previous GBA_U bootstrapping procedure.
If no key material is available this is considered as a GBA Bootstrapping failure and the USIM abandons the function. The status word '6985' (Conditions of use not satisfied) is returned.
Otherwise, the USIM stores Ks_int_NAF and associated B-TID together with NAF_ID. The Ks_int_NAF keys related to other NAF_Ids, which are already stored in the USIM, shall not be affected. The USIM updates EF GBANL as follows:
  • If a record with the given NAF_ID already exists, the USIM updates the B-TID field of this record with the B-TID value associated to the GBA_U bootstrapped key involved in this GBA_U NAF derivation procedure.
  • If a record with the given NAF_ID does not exist, the USIM uses an empty record to store the NAF_ID and the B-TID value associated to the GBA_U bootstrapped key involved in this GBA_U NAF Derivation procedure.
  • In case no empty record is available the USIM shall overwrite an existing record to store the NAF_ID and the B-TID value associated to the GBA_U bootstrapped key involved in this GBA_U NAF Derivation procedure. To determine the record to overwrite, the USIM shall construct a list of record numbers by storing in the list first position the record number of the last used (i.e. involved in an Authentication command) or derived Ks_int_NAF and by shifting down the remaining list elements. The last record number in this list corresponds to the record to overwrite when the USIM runs out of free records. If an existing record corresponding to a Ks_int_NAF key in use is overwritten, the application Ks_int_NAF shall not be affected (e.g. in case a Ks_int_NAF was put into use as an MBMS MUK key, the MUK key shall continue to be available for the MBMS application).
Then, the USIM returns Ks_ext_NAF.
Input:
  • NAF_ID, IMPI
Output:
  • Ks_ext_NAF
Up

7.1.1.6  MBMS security context (MSK Update Mode) |R6|Word‑p. 268
USIM operations in MBMS security context are supported if service No. 69 is "available".
The USIM receives the MIKEY packet containing an MSK update message. First, the USIM uses the MUK ID to identify the Ks_int_NAF corresponding with a previous bootstrapping procedure.
The USIM shall check if a new NAF derivation procedure involving the received Idi in the MIKEY message has been performed or if it is the first time that this Idi is used. If this check cannot be performed because the corresponding Ks_int_NAF key was overwritten, the USIM abandons the function and returns the status word '6985' (Conditions of use not satisfied). In case of a new NAF derivation procedure or a new Idi, the USIM shall store the last bootstrapped Ks_int_NAF as the last generated MUK and update EF MUK as follows:
  • If a record with the received Idi (included in the MUK ID: see TS 33.246) value is already present, then the MUK ID is stored in the corresponding field of this record, and the associated Time Stamp Counter (TS) field is reset. Additionally, the USIM internally stores the last successfully used MUK (i.e. MUK that was used during the last successful MSK update procedure), along with its MUK ID for further use (e.g. to detect Key freshness failure).
  • If a record with the received Idi does not exist, the USIM uses an empty record to include the MUK ID, and reset the associated TS field.
  • In case there is no empty record available in EF MUK the USIM abandons the function and the status word '9867' (Authentication error, no available memory space in EF MUK) is returned.
If the received MUK ID does not correspond to the last generated MUK (i.e. last bootstrapped MUK) then the USIM proceeds as follows:
  • If the received MUK ID corresponds to the last successfully used MUK then the USIM uses this MUK to verify the integrity of the message. If the verification is unsuccessful, the USIM abandons the function and returns the status word '9862' (Authentication error, incorrect MAC). If the verification is successful, the USIM abandons the function and returns the status word '9865' (Key Freshness Failure), indicating to the ME that the received MIKEY message is protected using the last successfully used MUK that does not correspond to the last generated MUK (the new B-TID shall be put into use: see TS 33.246). In this case, the USIM shall not return a MIKEY verification message.
  • Otherwise, this is considered as a bootstrapping failure (incorrect MUK) and the USIM abandons the function. The status word '6A88' (Referenced data not found) is returned.
    Otherwise, if the received MUK ID corresponds to the last generated MUK, the USIM uses the MUK value for MSK validation and derivation functions as described in TS 33.246. If the validation is unsuccessful, the status word '9862' (Authentication error, incorrect MAC) is returned and the USIM abandons the function.
    After a successful MSK Update procedure the USIM stores the received credentials (e.g. MSK and/or Key Validity data) and updates EF MSK as follows:
  • If a record with the received Key Domain ID and Key Group part (i.e. Key Group part of the MSK ID) already exists, USIM stores the older MSK ID (if any) and its associated TS as the 2nd MSK ID and TS. The newer MSK ID is stored as the 1st MSK ID. In case the received MSK message has the same MSK ID as a stored MSK, the TS associated to this stored MSK is stored as the 1st TS. Otherwise, the 1st TS value is reset. The number of stored MSK IDs and corresponding TS shall be set to '02' if the USIM stores two different MSK IDs. The USIM shall not store two MSK IDs with the same Key Number part in the same record.
  • If a record with the received Key Domain ID and Key Group part does not exist, the USIM uses an empty record to include those values. The received MSK ID is stored as the 1st MSK ID and the associated TS is reset. The 2nd MSK ID and the associated TS are set to 'FF FF'. The number of stored MSK IDs and corresponding TS shall be set to '01'. In case there is no empty record available in EF MSK the USIM abandons the function and the status word '9866' (Authentication error, no available memory space) is returned.
  • In the case of a BM-SC solicited pull procedure (i.e. when the Key Number part of the MSK ID is set to 0x0), EF MSK is not updated.
Then, the USIM stores the Time Stamp field (retrieved from the MIKEY message) in its corresponding field under EF MUK.
The USIM stores internally the last successfully used MUK along with its MUK ID for further use. This MUK may be used beyond its GBA validity (i.e. after the derivation of a new Ks_int_NAF resulting from a new bootstrap procedure) to verify the integrity of a MIKEY message in order to detect a synchronization failure. This may occur if the last derived Ks_int_NAF did not reach the BM-SC.
The MSK is not necessarily updated in the MIKEY message, since a MSK transport message can be sent e.g. to update the Key Validity data or as part of a BM-SC solicited pull procedure. In such a case the USIM shall use the status word '9000' to inform the ME that the MIKEY message validation using the last generated MUK has succeeded.
Finally, if the V-bit in the HDR field of the received MIKEY message is set then the USIM shall produce a MSK Verification Message as described in TS 33.246. In this case the command response is the MIKEY verification message.
Input:
  • MIKEY message
Output:
  • MIKEY message, or
  • None
Up

7.1.1.7Void

7.1.1.8  MBMS security context (MTK Generation Mode) |R6|Word‑p. 269
USIM operations in MBMS security context are supported if service No. 69 is "available".
The USIM receives the MIKEY message containing an MBMS MTK and a Salt key (if Salt key is available). First, the USIM retrieves the MSK with the Key Domain ID and the MSK ID given by the Extension payload of the MIKEY message (as described in TS 33.246).
If the needed MSK does not exist, this is considered as a MSK failure and the USIM abandons the function. The status word '6A88' (Referenced data not found) is returned.
If the key validity data of the MSK indicates an invalidated MSK (i.e. SEQl is greater than SEQu) then the USIM returns the status word '6985' (Conditions of use not satisfied) and abandons the function. SEQl and SEQu are defined in TS 33.246.
Otherwise, the USIM performs the MBMS Generation and Validation Function (MGV-F) as described in TS 33.246 using MSK.
If the USIM detects that the given MTK ID is invalid, this is considered as a SEQp freshness failure and the USIM abandons the function. The status word '9865' (Key freshness failure) is returned.
If the integrity validation of the MIKEY message is unsuccessful, the USIM abandons the function and returns the status word '9862' (Authentication error, incorrect MAC).
After successful MGV_F procedure the USIM stores the Time Stamp field (retrieved from the MIKEY message) as the Time Stamp Counter (TS) associated with the involved MSK under EF MSK
The USIM also stores MTK ID (retrieved from the MIKEY message) as the SEQl associated with MSK.
Then, the USIM returns MTK and Salt key (if Salt key is available).
Input:
  • MIKEY message
Output:
  • MTK and Salt (if available).
Up

7.1.1.9  MBMS security context (MSK Deletion Mode) |R6|Word‑p. 270
USIM operations in MBMS security context are supported if service No. 69 is "available".
The USIM receives the Key Domain ID and the Key Group part of the MSK ID. The USIM shall identify in the EF MSK the record containing MSK IDs having this Key Domain ID and Key Group part.
If no record is identified, the USIM abandons the function and returns the status word '6A88' (Referenced data not found).
If a record is found, the USIM shall delete all corresponding MSKs and set to 'FF' the bytes of this record.
Input:
  • Key Domain ID, MSK ID Key Group part
Output:
  • None.
Up

7.1.1.10  MBMS security context (MUK Deletion Mode) |R6|

USIM operations in MBMS security context are supported if service No. 69 is "available".
The USIM shall identify in EF MUK the record containing the received MUK ID.
If no record is identified, the USIM abandons the function and returns the status word '6A88' (Referenced data not found).
If a record is found, the USIM shall delete the corresponding MUK and set to 'FF' the bytes of this record. If a corresponding Ks_int_NAF key is present (i.e. with the same NAF_ID), it shall be deleted and its corresponding record in EF GBANL shall be set to 'FF'. In case the corresponding Ks key is present (i.e. with the same B-TID), it shall be deleted and the content of EF GBABP shall be set to 'FF'.
Input:
  • MUK ID TLV
Output:
  • None
Up

7.1.1.11  Local Key Establishment security context (Key Derivation mode) |R7|Word‑p. 271
USIM operations in this security context are supported if service No. 68 and service No. 76 are "available".
The USIM receives the NAF_ID corresponding to the NAF Key Centre, the Terminal_ID, the Terminal_appli_ID, the UICC_appli_ID, RANDx, the Counter Limit value and the MAC as described in TS 33.110.
The USIM uses the NAF_ID to identify the Ks_int_NAF associated to the NAF Key Centre. If no valid Ks_int_NAF is available, this is considered as a Key Establishment failure and the USIM abandons the function. The status word '6A88' (Referenced data not found) is returned.
If the Ks_local key derivation is not authorized by the local UICC policy (e.g. Terminal_appli_ID/UICC_appli_ID association not authorized or Terminal_ID value not authorized), the USIM abandons the function. The status word '6985' (Conditions of use not satisfied) is returned.
Otherwise, the USIM retrieves the appropriate Ks_int_NAF, derives Ks_local as described in TS 33.110. The USIM verifies the MAC value received from the Terminal as described in TS 33.110:
  • If the verification is unsuccessful, the USIM abandons the function and returns the status word '9862' (Authentication error, incorrect MAC).
  • If the verification is successful, the USIM stores Ks_local and associated parameters Terminal_ID, Terminal_appli_ID, UICC_appli_ID, RANDx and the Ks_local Counter Limit. The USIM returns the Local Key Establishment Operation Response TLV (indicating a successful Key Derivation operation) and a response MAC, which is derived as described in TS 33.110.
The minimum number of Local keys that can be stored by the USIM shall be defined by the service provider at the pre-issuance of the card.
In case the maximum number of Local Key was already reached or there is not enough available memory in the USIM, the USIM shall overwrite a Local Key and its associated data in order to store the new one. To determine the Ks_local to overwrite, the USIM shall construct a list of Ks_local identifiers by storing in the list first position the Ks_local identifier of the last used or derived Ks_local and by shifting down the remaining list elements. The last Ks_local identifier in this list corresponds to the Ks_local to overwrite when the USIM runs out of free memory or when the maximum number of Ks_local keys is reached. If an existing Ks_local in use is overwritten, the application using Ks_local shall not be affected.
Input:
  • Local Key Establishment Mode (Key Derivation mode), Counter Limit, request MAC, Key Identifier (i.e. NAF_ID, Terminal_ID, Terminal_appli_ID, UICC_appli_ID, RANDx)
Output:
  • Key Derivation operation status, response MAC.
Up

7.1.1.12  Local Key Establishment security context (Key Availability Check mode) |R7|

USIM operations in this security context are supported if service No. 68 and service No. 76 are "available".
The USIM receives a Ks_local identifier. The USIM checks if a corresponding valid Ks_local is available. If a valid Ks_local key is available the Local Key Establishment Operation Response TLV (indicating a successful Key Availability Check operation) is returned. In case no valid Ks_local key is available the command fails and the status word '6A88' (Referenced data not found) is returned.
Input:
  • Local Key Establishment Mode (Key Availability Check mode), Key identifier (i.e. NAF_ID, Terminal_ID, Terminal_appli_ID, UICC_appli_ID, RANDx).
Output:
  • Key Availability Check Operation Status.
Up

Up   Top   ToC