1
votes

I am trying to read AFL - application file locator in EMV debit card. for some cards when i am passing apdu like -

0x80, 0xA8, 0x00, 0x00, 0x02, 0x83, 0x00 ,0x00 (with no PDOL )

here it is giving 0x900 but for some cards it is giving 0x6984

For those cards which is giving 0x6984 , i tried to send apdu like-

0x80, 0xA8, 0x00, 0x00, 0x04, 0x83, 0x02, 0x08,0x26 , 0x00; with PDOL value and here it is working fine and giving AFL as required.

as per standards says:-

6.5.8.3 Data Field Sent in the Command Message The data field of the command message is a data object coded according to the PDOL provided by the ICC, as defined in section 5.4, and is introduced by the tag '83'. When the data object list is not provided by the ICC, the terminal sets the length field of the template to zero. Otherwise, the length field of the template is the total length of the value fields of the data objects transmitted to the ICC

what i understand is - PDOL is first provdie by ICC and then we use it in GPO command.

i am confused about why some card working good wiht no PDOL or some card not. and what is the significance of PDOL in GPO, how i get the PDOL from ICC and how we use it in GPO command??

1
You may also want to look into this question/answer regarding construction of the GPO command and how to find the PDOL (which is usually in the EMV applications FCI)Michael Roland

1 Answers

4
votes

Obviously, providing PDOL through records is bad because if you don't know the PDOL you can not send the GET PROCESSING OPTIONS APDU and therefore you can not get the list of available records.

The PDOL may be present in FCI data with tag '9F38' which is itself under the constructed tag 'A5'.

Parse PDOL just as any other Data Object List. As specified in EMV Integrated Circuit Card Specifications for Payment Systems, Book 3: Application Specification, Version 4.3, November 2011, Section 5.4:

"A DOL is a concatenated list of entries, with each entry representing a single data element to be included in the constructed field. The format of each entry is a one- or two-byte tag identifying the desired data object, followed by a one-byte length which represents the number of bytes the field shall occupy in the command data."

And when you send the DOL related data in your GET PROCESSING OPTIONS APDU, you can refer to the same chapter of the specification:

"To minimise processing within the ICC, such a list is not TLV encoded but is a single constructed field built by concatenating several data elements together."