SB nº AN-6 : Clarification to Application Selection (Clarification)
Application Note Bulletin no. 06, June 1st, 2002 Clarification to Application Selection This note applies to EMV 2000 Integrated Circuit Card Specification for Payment Systems Version 4.0 Book 1. The following notes are intended to clarify functionality that was not fully carried over from EMV 3.1.1, and to expand on certain details of the application selection process. 1. Description of Clarifications Section 8.3.2 (i) The description of application selection does not explicitly include details of how the Application Selection Indicator (ASI) should be used with PSE directory entries, as is included in Section 8.3.3 for List of AIDs selection. In step 3, the terminal uses the ASI to determine whether an exact match between the ADF name in the card and the AID in the terminal is required or whether a partial match is allowed. If the ASI requires an exact match but the match is partial, the terminal does not add the application to the candidate list. If the ASI does not require an exact match or if there is a full match, the terminal adds the application to the candidate list. (ii) In step 4, the text does not fully echo the flow defined in Figure 14. Note that if the terminal interrupts processing of the current directory to process a subdirectory, it places resumption information on the stack before branching to process the subdirectory. This allows processing of the parent directory to resume after processing of the subdirectory is complete, without reselection of the parent directory. (iii) Text in Figure 14 is changed from 'Card Blocked?' to 'SW1 SW2 = '6A81?' to be consistent with the text in step 1. Section 8.3.3. (i) Step 6 describes whether a partially matching application should be added to the candidate list. Note that in the third sentence the phrase ‘only one occurrence is allowed’ means that an exact match (both in length and name) is required between the AID in the terminal and the ADF name in the card if the application is to be added to the candidate list for final selection. (ii) Further in step 6, if a partially matching application is rejected because the ASI requires an exact match, terminal efficiency can be improved by branching to step 5 rather than step 7 as indicated. Note that branching to step 7 will produce the same result but may involve the unnecessary processing of several more partial matches. An updated version of Figure 15 is attached to this note to illustrate this improvement.
(iii) Change "Card Blocked?" in Figure 15 to "SW1 SW2 '6A81'?" to be consistent with text. 2. Specification change notice: For clarification, in future revisions of the EMV Specifications it is intended to make the following changes to Book 1 section 8: Section 8.3.2 The following text will replace step 3. ‘If the entry is for an ADF and the ADF name matches one of the applications supported by the terminal as defined in section 8.3.1, the application joins the ‘candidate list’ for final application selection under control of the Application Selection Indicator (ASI). The ASI indicates whether the AID in the terminal shall match exactly (both in length and name) or need only partially match the associated ADF name in the card (tag '4F'). The application is added to the candidate list in either of the following cases: § the AID entry retrieved is an exact match § the ASI for the AID in the terminal indicates that a partial match is allowed The application is not added to the candidate list if the ADF entry retrieved is not an exact match and the ASI for the AID in the terminal indicates that an exact match is required.’ The following text will replace the first sentence of step 4: ‘If the entry is for a DDF, the terminal interrupts processing of the current directory record, places resumption information on the stack, and selects the DDF indicated using the DDF name.’ Replace Figure 14 with the new Figure 14 attached to this Application Note. Section 8.3.3 In the third sentence of step 6 replace ‘only one occurrence is required’ with ‘an exact match (in both length and name) is required’. At the end of step 6, replace ‘proceed to step 7’ with ‘proceed to step 5’. Replace the last sentence in step 7 with "If the ICC returns SW1 SW2 = '9000', '62xx', or '63xx', the terminal returns to Step 3. If it returns a different SW1 SW2, the terminal goes to Step 5."
Replace Figure 15 with the new Figure 15 attached to this Application Note. Section 8.3.4 In Step 2, add "if the API is present" after "for that application" at the end of the first sentence.
Application Selection using PSE Directories Begin Application Selection Terminal supports PSE? Yes Select DFNAME = '1PAY.SYS.DDF01' Terminate Session SW1 SW2 ='6A81'? No PSE found? Yes PSE blocked? No Empty Candidate list If the terminal and card support implicit selection as defined by ISO 7816-4, it is performed prior to this step No Selection from No terminal list Yes See "Using a List of AIDs" in next section No Get SFI for directory from FCI Interrupt current directory & place resumption information on stack Set record number for read to 1 Read directory record Get DDFname from entry Record found? No Yes Select new DDF No Is there an No entry in this record? Term inal supports application? Yes ADF is exact match of AID? No Check terminal's Applic. Sel. Incicator No Yes Yes Get first entry from record Is entry for an ADF? Yes No Partial match allowed? Yes Add to candidate list No Is there an entry on the directory stack? Are there any No entries on the candidate list? Yes Get prev directory entry from stack Resume processing previous directory Yes Candidate List is complete. Choose application from candidate list. Is there another entry in No this record? Yes Get next entry Increment record number for next read by 1 Figure 14 - Terminal Logic Using Directories
Application Selection using Terminal List of AIDs Begin Application Selection Empty Candidate list Get first AID from terminal list SELECT File using DFname = AID Must be identical, including length Yes SW1 SW2 Yes = '6A81'? No Terminate session File found? No Yes DFname in FCI Yes = AID? No Check Application Selection Indicator in terminal Application blocked? No Add FCI information to candidate list Partial Name No match allowed? Yes Is there another AID in list? Yes Get next AID from list No Finished. Go to final selection SELECT File using DFname = AID Application Add FCI Yes blocked? No Information to candidate list SELECT NEXT Yes with DFname = terminal AID No SW1 SW2 = 9000, 62xx, or 63xx Figure 15 – Using the List of Applications in the Terminal