I'm trying to read a Paypass Maestro Mastercard. So I send the following SELECT PPSE command:
00 A4 04 00 0E 32 50 41 59 2E 53 59 53 2E 44 44 46 30 31 00
I get the following response:
6F 2C 84 0E 32 50 41 59 2E 53 59 53 2E 44 44 46
30 31 A5 1A BF 0C 17 61 15 4F 0C A0 00 00 00 04
30 60 C1 23 45 67 89 87 01 03 9F 2A 01 02
With a successful selection: SW1SW2=9000
When I tried to decode the response with a TLV Decoder I've got the following:
6F File Control Information (FCI) Template
84 Dedicated File (DF) Name
325041592E5359532E4444463031
A5 File Control Information (FCI) Proprietary Template
BF0C File Control Information (FCI) Issuer Discretionary Data
61 Application Template
4F Application Identifier (AID) – card
A0000000043060C123456789
87 Application Priority Indicator
03
9F2A Unknown tag
02
I don't know how to interpret this result which contains the unknown Tag 9F2A. And what about the Maestro card's AID? I searched and I found that is:
A0000000043060
Could anyone help me to resolve this issue?
9F2A
?The tag 9F2A
contains the kernel identifier for this EMV application. In your case this tag indicates that EMV Contactless Kernel 2 must be used to process the EMV card application. You can find the kernel specification in EMV Contactless Specifications for Payment Systems - Book C-2: Kernel 2 Specification (which you can download from http://emvco.com/).
In order to understand how to interpret the response to the SELECT PPSE command, you should read into EMV Contactless Specifications for Payment Systems - Book B: Entry Point Specification.
The PPSE is a directory that lists all EMV applications that are available on the card. Each entry in this list is contained in one application template (tag 61
). In your case the list contains one entry.
This entry consists of an application identifier (AID) (tag 4F
), an application priority indicator (tag 87
), and a kernel identifier (tag 9F2A
).
The prefix of the AID suggests that this is a Maestro card (i.e. the RID is A000000004 which is the registered identifier for MasterCard and the PIX starts with 3060 which is typically used for the Maestro brand). This also matches the kernel identifier referring to Kernel 2 which implements the MasterCard PayPass protocol.
The AID is the value that you use to select the EMV payment application using a SELECT (by AID/DF name) command APDU. So you would next issue a SELECT command for this application:
00 A4 04 00 0C A0 00 00 00 04 30 60 C1 23 45 67 89 00
You can the continue processing according to the Kernel 2 specification.