Tomcat
Professional
- Messages
- 2,689
- Reaction score
- 963
- Points
- 113
The operating system of the card's microchip supports the Tree File Structure defined by the ISO 7816-4 standard. Most of the card application data is stored in files in this file structure. The files are located in the user part of the EEPROM (User Memory), which is slightly smaller than the entire EEPROM, since part of this memory is reserved for the needs of the operating system.
According to the ISO 7816-4 standard, there are two types of files in the IPC:
An example of the file structure of the card is shown in Fig. 3.1.
The figure shows that the root directory of the MF file contains one elementary file EF1 and two directories DF1 and DF2.
An MF-level EF1 file can contain general card-wide administrative and security information. For example, such general information can be
Binary file
Binary file
Linear file with 2 entries
Binary file
DF2 E-Wallet Application
| ---------- (EF21)
I --------- (EF22)
I
1 --------- DF21
Rice. 3.1. An example of an IPC file structure
MasterCard
^? 9
include the serial number of the microcircuit (ICC Serial Number), PIN-code of the card holder, access control keys at the stage of card transportation, shared between the card supplier and its issuer, etc.
The DF1 directory contains four elementary files containing data for the payment application, while the DF2 directory contains two elementary files and a DF21 subdirectory containing data for the e-wallet application.
In general terms, the structure of the FCI (file header) is defined in section 5.1.5 of the ISO 7816-4 standard. In accordance with this standard, the FCI can be represented in the form of three data objects, shown in table. 3.3.
Tab. 3.3. FCI structure
The FCP (File Control Parameters) Template object contains file control parameters such as file name, file identifier, size, descriptor, maximum record size, file access conditions, etc. This object is mainly used by the operating system of the card.
An FMD (File Management Data) Template object is used to represent the control data of a card application, such as the Application Label and Application Expiration Date.
The FCI Template object in accordance with ISO 7816-4 can store both file control parameters and file (application) control data. In the EMV specifications, the FCI Template object is defined for DF files only and contains the file name and information used to identify and select the card application. The FCI Template data object is returned by the card to the terminal in response to the SELECT command (see section 3.10). FCP Template and FMD Template objects do not apply in EMV. It is believed that they are determined at the stage of "marking" the card by its manufacturer and have no relation to the functionality of the applications supported by the card.
And yet, when describing DF and EF files, to illustrate mechanisms for creating / deleting files, accessing files, allocating memory for storing files, etc. we will use the FCI object.
According to the ISO 7816-4 standard, there are two types of files in the IPC:
- DF files (Dedicated File), or directories, which are logical structures that define sections of the user part of the EEPROM memory and contain other DF files and EF files (Elementary File). The card contains at least one DF file called an MF (Master File) file. The MF file is the root file of the tree file structure of the card and thus contains all the IPC files. This is the only required card file. As directories, DF files do not directly contain data, but are so-called entry points to other DF and EF files. The operating system of the card and card applications may require DF file information to perform their functions. This information is contained in a file header called File Control Information (FCI);
- EF (Elementary File) files containing the data of the card and its applications. Each EF file must belong to one of the card DF files (possibly an MF file), which is called the parent DF file (Parent DF) in relation to this elementary file. As with DF files, each EF file can have an FCI "header".
An example of the file structure of the card is shown in Fig. 3.1.
The figure shows that the root directory of the MF file contains one elementary file EF1 and two directories DF1 and DF2.
An MF-level EF1 file can contain general card-wide administrative and security information. For example, such general information can be


Binary file
Binary file
Linear file with 2 entries
Binary file
DF2 E-Wallet Application
| ---------- (EF21)
I --------- (EF22)
I
1 --------- DF21
Rice. 3.1. An example of an IPC file structure
MasterCard
^? 9
include the serial number of the microcircuit (ICC Serial Number), PIN-code of the card holder, access control keys at the stage of card transportation, shared between the card supplier and its issuer, etc.
The DF1 directory contains four elementary files containing data for the payment application, while the DF2 directory contains two elementary files and a DF21 subdirectory containing data for the e-wallet application.
In general terms, the structure of the FCI (file header) is defined in section 5.1.5 of the ISO 7816-4 standard. In accordance with this standard, the FCI can be represented in the form of three data objects, shown in table. 3.3.
Tab. 3.3. FCI structure
Tag | Value |
'62'h | FCP Template |
'64'h | FMD Template |
'6F'h | FCI Template |
The FCP (File Control Parameters) Template object contains file control parameters such as file name, file identifier, size, descriptor, maximum record size, file access conditions, etc. This object is mainly used by the operating system of the card.
An FMD (File Management Data) Template object is used to represent the control data of a card application, such as the Application Label and Application Expiration Date.
The FCI Template object in accordance with ISO 7816-4 can store both file control parameters and file (application) control data. In the EMV specifications, the FCI Template object is defined for DF files only and contains the file name and information used to identify and select the card application. The FCI Template data object is returned by the card to the terminal in response to the SELECT command (see section 3.10). FCP Template and FMD Template objects do not apply in EMV. It is believed that they are determined at the stage of "marking" the card by its manufacturer and have no relation to the functionality of the applications supported by the card.
And yet, when describing DF and EF files, to illustrate mechanisms for creating / deleting files, accessing files, allocating memory for storing files, etc. we will use the FCI object.