Other interindustry data elements
The following interindustry data elements provide a generic support to application identification and selection. Application label — Referenced by tag ’50′, this interindustry data element is not defined in ISO/IEC 7816. The application provider defines it for use at the man-machine interface, e.g., a trademark to display. File reference — Referenced by tag ’51′, this interindustry data element is defined in 5.3.1.2.
Discretionary data (or template) — Referenced by tag ’53′ (or ’73′), this interindustry data element (or template) consists of relevant data elements (or nests data objects) defined by the application provider.
Uniform resource locator — Referenced by tag ’5F50′, this interindustry data element is a uniform resource locator (URL) as defined in IETF RFC 1738[19] and IETF RFC 2396[20]. It points to part of the software required in the interface device to communicate with the application in the card.

Application selection

The card shall support at least one of the following application selection methods.

1) Implicit application selection

2) Application selection using an application identifier (AID, see 8.2.1.2) as DF name

3) Application selection using EF.DIR or EF.ATR

Implicit application selection

If an application is implicitly selected, then an application identifier should be present in the historical bytes (see 8.1.1) or in the initial data string (see 8.1.2). Such a presence denotes an implicitly selected application. If an application is implicitly selected with no application identifier in the historical bytes and in the initial data string, then an application identifier shall be present in EF.ATR (see 8.2.1.1).

NOTE The implicit application selection is not recommended for multi-application cards.

Application selection using AID as DF name

In a multi-application environment, the card shall respond positively to a SELECT command specifying any application identifier (AID, see 8.2.1.2) as DF name. The interface device may thus explicitly select an application without previously checking the presence of the application in the card.

The card shall support a SELECT command with CLA INS P1 P2 set to ’00A4 0400′ for the first selection with a given and preferably complete application identifier in the command data field (see Table 39). Depending on whether the application is present or not, the card shall either complete or abort the command. In the case of a selection with a truncated DF name, the full DF name will be made available in the response data field as the file control parameter referenced by tag ’84′ (see Table 12). If the card supports selection with a truncated DF name, then the first selection is implementation-dependent, e.g., the first occurrence in a static list or the last activated application in a previous session. For the next selections, if any, the card shall support a SELECT command with CLA INS P1 P2 set to ’00A4 0402′ with the same command data field.

Application selection using EF.DIR or EF.ATR

For a multi-application interface device, the use of EF.DIR or EF.ATR may be more efficient than the previous method.

 If an application identifier data object is not part of an application template and not accompanied by a file reference or command-to-perform data object, then the selection shall use AID as DF name.

 If an application identifier data object is part of an application template together with a file reference data

object (see 5.3.1.2), the value field of which consists of two or more bytes, then the selection by path shall

be performed according to 8.3.

 If an application identifier data object is part of an application template together with one or more

command-to-perform data objects, then the application selection is done by the indicated command(s). If

several, they shall be performed in the order presented in the template. 

 Selection by path

This service allows selection of EFs and un-named DFs by using a path, i.e., a file reference data element (see 5.3.1.2) consisting of three or more bytes.  When the length is even, the path is either absolute or relative depending on whether the first two bytes are set to ’3F00′ or not. The last two bytes identify either a DF or an EF.

  • For a path to a DF, the selection should be done by one or more SELECT commands, with CLA INS P1 P2 Lc set to ’00A4 0100 02′.
  • For a path to an EF, if the length is four or more, the selection should be done by one or more SELECT commands, with CLA INS P1 P2 Lc set to ’00A4 0100 02′. The last and possibly only selection uses the last two bytes of the path (an EF identifier) with CLA INS P1 P2 Lc set to ’00A4 0200 02′.

 When the length is odd, the path is qualified. It consists of either an absolute path without ’3F00′, or a relative path without the identifier of the current DF, followed by a byte to use as P1 in one or more SELECT commands. The value of P1 fixes the selection method.

  • If the value of P1 is ’08′ or ’09′, then the card shall support a SELECT command where the qualified path specifies P1, Lc and the data field and where P2 is set to ’00′.
  • In the other cases, the card shall support one or more SELECT commands with P1 set to the last byte of the qualified path and P2 Lc set to ’0002′. Every file along the path shall be selected sequentially.

8.4 Data retrieval

This service allows the interface device to read data stored in DFs and in EFs.

Once a DF has been selected, the contents relevant to interchange shall be the response data field to a GET DATA command (see 7.4.2) consisting of CLA INS set to ’00CA’ followed by P1-P2 set to ’00FF’ for BER-TLV data objects or to ’02FF’ for SIMPLE-TLV data objects, followed by a Le field containing only bytes set to ’00′.

Once an EF has been selected, the contents relevant to interchange shall be the response data field to a READ command according to the file descriptor byte (see Table 14), if present in the control parameters.

 The READ BINARY command consists of CLA INS P1 P2 set to ’00B0 0000′ followed by a Le field containing only bytes set to ’00′.

 The READ RECORD (S) command consists of CLA INS P1 P2 set to ’00B2 0005′ followed by a Le field containing only bytes set to ’00′.

 The GET DATA command consists of CLA INS P1 P2 set to ’00CA0000′, followed by a Le field containing only bytes set to ’00′.

In the absence of file descriptor byte in the control parameters of an EF, the command APDU is as follows.

 If the first software function table is present in the historical bytes or in EF.ATR and if it indicates the support of records, then the command APDU is a READ RECORD (S) as above.

 Otherwise, i.e., when the table is absent in the historical bytes and in EF.ATR or if the table does not indicate the support of records, the command APDU is a READ BINARY as above.

8.5 Data element retrieval

This service allows the interface device to retrieve interindustry data elements used for interchange.

 Before selecting an application, interindustry data objects should be retrieved directly or indirectly from the historical bytes (see 8.1.1), the initial data string, EF.ATR and EF.DIR, in that order, when present. These interindustry data objects shall be interpreted according to tag allocation schemes.

 Once an application is selected, interindustry data objects should be retrieved directly or indirectly from the management data (see 5.3.3) of the application DF and from specific EFs within the current DF.

Interindustry data objects may be present in the management data of any file Interindustry data elements may be retrieved in files referenced in a wrapper. Selection of an un-named DF or an EF known by its path is defined in 8.3. Reading data in a selected EF or DF is defined in 8.4. Interindustry data objects may be retrieved by GET DATA commands