Page 78 - From GMS to LTE
P. 78
64 From GSM to LTE-Advanced Pro and 5G
From a logical point of view, data are stored on a GSM SIM card in directories and
files, in a manner similar to the storage on a PC’s hard drive. The file and folder struc-
tures are specified in 3GPP TS 31.102 [34]. In the specification, the root directory is
called the main file (MF), which is somewhat confusing at first. Subsequent directories
are called dedicated files (DF), and normal files are called elementary files (EF). As there
is only a very limited amount of memory on the SIM card, files are not identified via file
and directory names. Instead, hexadecimal numbers with a length of four digits are
used, which require only 2 B memory. The standard nevertheless assigns names to these
numbers, which are, however, not stored on the SIM card. The root directory, for exam-
ple, is identified by ID 0x3F00, the GSM directory is identified by ID 0x7F20 and the file
containing the IMSI is identified by ID 0x6F07. To read the IMSI from the SIM card, the
mobile device thus has to open the following path and file: 0x3F00 0x7F20 0x6F07.
To simplify access to the data contained on the SIM card for the mobile device, a file
can have one of the following three file formats:
Transparent. The file is seen as a sequence of bytes. The file for the IMSI, for exam-
●
ple, is of this format. How the mobile device has to interpret the content of the files is
again specified in 3GPP TS 31.002 [34].
Linear fixed. This file type contains records of a fixed length and is used, for exam-
●
ple, for the file that contains the telephone book records. Each phone record uses one
record of the linear fixed file.
Cyclic. This file type is similar to the linear fixed file type but contains an additional
●
pointer that points to the last modified record. Once the pointer reaches the last
record of the file, it wraps over again to the first record of the file. This format is used,
for example, for the file in which the phone numbers which have previously been
called are stored.
A number of different access right attributes are used to protect the files on the SIM
card. By using these attributes, the card manufacturer can control whether a file is read
only or write only when accessed by the mobile device. A layered security concept also
permits network operators to change files which are read only for the mobile device
over the air by sending special provisioning SMS messages.
The mobile device can only access the SIM card if the user has typed in the PIN when
the phone is started. The mobile device then uses the PIN to unlock the SIM card. SIM
cards of some network operators, however, allow deactivation of the password protec-
tion and thus the user does not have to type in a PIN code when the mobile device is
switched on. Despite unlocking the SIM card with the PIN, the mobile device is still
restricted to only being able to read or write certain files. Thus, it is not possible, for
example, to read or write to the file that contains the secret key Ki even after unlocking
the SIM card with the PIN.
Details on how the mobile device and the SIM card communicate with each other
have been specified in ETSI TS 102 221 [35]. For this interface, layer 2 command and
response messages have been defined, which are called Application Protocol Data Units
(APDUs). When a mobile device wants to exchange data with the SIM card, a command
APDU is sent to the SIM card. The SIM card analyzes the command APDU, performs
the requested operation and returns the result in a response APDU. The SIM card only
has a passive role in this communication as it can only send response APDUs back to
the mobile device.