File names
In modern smart card operating systems, files are without exception addressed by logical names, rather than being accessed using direct physical addresses. The latter approach was perfectly normal in the smart card world earlier on, and there are a few smart card microcontrollers that still use it.With simple applications that occupy precisely defined memory regions, direct physical access can save a lot of memory space. It also does not result in any loss of userfriendliness, since all files are accessed by the computer in the terminal. However, direct physical access does not in any way match the criteria of modern software design, and it also creates major problems with regard to software enhancements and smart card microcontrollers with differing address spaces. All schemes that use logical file names are significantly better, and above all much easier to extend.Without question, it can be assumed that in a few years file addressing using logical names will be the only type of file addressing used in smart cards with microcontrollers.With memory cards, on the other hand, physical file addressing will continue to be used for the foreseeable future.

File identifier (FID)
The system described here is based on the ISO/IEC 7816-4 standard, and it is in principle reflected in all other international smart card standards. Every file, including directory files, has a 2-byte file identifier (FID), which can be used to select the file. For historical reasons, the FID of the MF is’3F00′. This FID is reserved for the MF within the entire logical address space. The logical file name’FFFF’is reserved for future applications, and may not be used. There are also other FIDs that are reserved by the ISO standard and by other standards. The GSM application is a typical example of the fact that various groups of FIDs cannot be freely used. In the GSM 11.11 specification, the more significant byte is determined by the location of the file within the directory structure (file tree). This coding has developed historically and originates from the first French smart cards. GSM DFs have a value of’7F’for the first (more significant) byte. The FIDs of EFs located directly below the MF have’2F’as the first byte, and the FIDs of EFs located underneath a DF start with’6F’. The less significant bytes are numbered sequentially. This specification applies only to the GSM application and is not a general standard. In other situations, the full 2-byte address region of the FID can be fully exploited and is not subject to any restrictions. EFDIR has an FID of’2F00′. It has a linear fixed structure and consists of at least one record. Each record is in turn a constructed data object containing data about a particular application in the smart card. This typically consists of the AID and a textual designation of the application in question. EFDIR can also contain additional data, such as the path to the application. The purpose of EFDIR is to display the applications present in a smart card to a terminal in a standardized format. The FIDs in the file tree must be chosen such that the files can be unambiguously selected. It is thus prohibited for two different files within the same DF to have the same FID. A DF may also not have the same FID as an EF located directly underneath it, since this would mean that the operating system would have to decide whether to select the DF first or the EF. The following rules apply to the selection of unique FIDs:
Rule 1: all DFs and EFs within a single directory must have different FIDs.
Rule 2: nested directories (DFs) may not have the same FIDs.
Rule 3: an EF within a directory (MF or DF) may not have the same FID as the next higher or next lower directory.

Short file identifier (SFI)
Short file identifiers may be used for implicit file selection in the immediate context of a command. Short file identifiers are optional for EFs, so they do not necessarily have to be assigned. An SFI is passed as a command parameter for implicit selection of a file and is therefore only 5 bits long. It can thus take on values between 1 and 30, since a short file identifier of’0′addresses the current EF.

DF name
A DF consists of a collection of files used by an individual application. A DF is a sort of directory or folder, and it can contain both EFs and other DFs. In the future, the address space provided by the 2-byte FID could become too small. Consequently, each DF has a ‘DF name’ in addition to its FID. As specified in the ISO/IEC 7816-4 standard, the DF name has a length of 1 to 16 bytes. The DF name provides sufficient address space to allow every smart card application to be unambiguously identified throughout the world. Since DF names are freely chosen, it is possible for two different DFs to sometimes have the sameDFname. Consequently, DF names are normally only used together with AIDs (application identifiers), as defined in the ISO/IEC 7816-5 standard. An AID may have a length between 5 and 16 bytes and is composed of two data elements defined by ISO. The AID is thus a subset of the DF name.

Structure and coding of the application identifier (AID)
The application identifier (AID) consists of two data elements. The first data element is the registered identifier (RID), which has a fixed length of 5 bytes. It is assigned by a national or international registration authority and includes a country code, an application category and a number that refers to the application provider. This numerical coding means that each RID is assigned only once, so that it can be used worldwide to identify a particular application. Unfortunately, the lists of assigned RIDs are confidential, so they cannot be published.However, some examples of RIDs that have been made public can be found in Section 16.8, ‘Selected RIDs’. Addresses of national and international RID registration authorities are located in Section 16.7, ‘Registration Authorities for RIDs’. If necessary, an application provider can place a proprietary application identifier extension (PIX) after the RID. The PIX, which may be up to 11 bytes long, is the optional second part of the AID. It may consist of a serial number and a version number, for example, which could be used for naming the application.