2015-06-18 94 views
3

我通過ACR讀者使用Visa電子借記卡進行通信和我從GET PROCESSING OPTIONS命令如下回應:如何解釋來自GET處理選項的響應?

80 0A 1C 00 08 01 03 00 10 01 01 00 90 00 

我應該如何理解這種反應,如果沒有AFL(應用文件定位器)也沒有任何AIP(應用交換配置文件)在裏面?以下是完整的通訊記錄:

SELECT PSEv2: 00 A4 04 00 0E 32 50 41 59 2E 53 59 53 2E 44 44 46 30 31 00 
SELECT PSEv2 returned: 6A82 - Wrong parameter(s) P1 P2; file not found 

SELECT PSEv1: 00 A4 04 00 0E 31 50 41 59 2E 53 59 53 2E 44 44 46 30 31 00 
SELECT PSEv1 returned: 6A82 - Wrong parameter(s) P1 P2; file not found 

SELECT ADF: 00 A4 04 00 07 A0 00 00 01 52 30 10 00 
SELECT ADF returned: 6A82 - Wrong parameter(s) P1 P2; file not found 

SELECT ADF: 00 A4 04 00 07 A0 00 00 00 03 10 10 00 
SELECT ADF returned: 6A82 - Wrong parameter(s) P1 P2; file not found 

SELECT ADF: 00 A4 04 00 07 A0 00 00 00 03 20 10 00 
SELECT ADF returned: 6F 2C 84 07 A0 00 00 00 03 20 10 A5 21 50 0D 56 49 53 41 20 45 4C 45 43 54 52 4F 4E 87 01 01 5F 2D 04 62 67 65 6E BF 0C 05 9F 4D 02 0B 0A 90 00 

SELECT ADF: 00 A4 04 00 05 A0 00 00 00 25 00 
SELECT ADF returned: 6A82 - Wrong parameter(s) P1 P2; file not found 

SELECT ADF: 00 A4 04 00 07 A0 00 00 00 04 10 10 00 
SELECT ADF returned: 6A82 - Wrong parameter(s) P1 P2; file not found 

SELECT ADF: 00 A4 04 00 07 A0 00 00 00 03 20 10 00 
SELECT ADF returned: 6F 2C 84 07 A0 00 00 00 03 20 10 A5 21 50 0D 56 49 53 41 20 45 4C 45 43 54 52 4F 4E 87 01 01 5F 2D 04 62 67 65 6E BF 0C 05 9F 4D 02 0B 0A 90 00 

GET PROCESSING OPTIONS: 80 A8 00 00 02 83 00 00 
GET PROCESSING OPTIONS returned: 80 0A 1C 00 08 01 03 00 10 01 01 00 90 00 

非常感謝!

回答

2

EMV規範可以幫助你瞭解細節。 在響應只有標記0x82和0x94值沒有標記和長度部分。

獲取處理選項(GPO)命令響應BER-TLV編碼的數據。 在您的樣品:在標籤0x80的 「模板,響應消息格式1」 填充標記爲0x82 「EMV,應用交互特徵(AIP)」 值2字節其餘標籤0x94之間「EMV,應用程序文件定位器(AFL)「值。

下面是與EMV APDU command/response parser

> 80 A8 00 00 02 83 00 00 
< 80 0A 1C 00 08 01 03 00 10 01 01 00 90 00 

A8: # EMV, Get Processing Options 
- rq:#"80A8000002830000" # ISO 7816-3, Case 4 
    - CLA: "80" # Class byte 
    - INS: "A8" # Instruction 
    - P1P2: "0000" # Parameters 1 and 2 
    - LcData:#"028300" 
    - len: "02" # . 
    - val:#"8300" # . 
     - RFU: "8300" # Authorisation Cryptogram RFU 
    - Le: "00" # . 
- rs:#"800A1C0008010300100101009000" # Response 
    - SW1SW2:#"9000" # Status byte 1 and 2 
    - SW1: "90" # Status byte 1 // Normal processing 
    - SW2: "00" # Status byte 2 
    - DATA:#"800A1C000801030010010100" # . 
    - x80:#"800A1C000801030010010100" 
     - tag: "80" 
     - len: "0A" # // 10 
     - val:#"1C000801030010010100" # Template, Response Message Format 1. 
     - x82:#"1C00" # EMV, Application Interchange Profile (AIP) 
      - val:#"1C00" # Application Interchange Profile (AIP). 
      - B01: "1C" 
       # ___1____ - bit 5, Cardholder verification is supported 
       # ____1___ - bit 4, Terminal Risk Management is to be performed 
       # _____1__ - bit 3, Issuer Authentication is supported 
      - B02: "00" # RFU 
     - x94:#"0801030010010100" # EMV, Application File Locator (AFL) 
      - val:#"0801030010010100" # Application File Locator (AFL). 
      - S1:#"08010300" # AFL Record 
       - B01: "08" # SFI [xxxxx___] // 1 
       - B02: "01" # From record // 1 
       - B03: "03" # To record // 3 
       - B04: "00" # First hashed 
      - S2:#"10010100" # AFL Record 
       - B01: "10" # SFI [xxxxx___] // 2 
       - B02: "01" # From record // 1 
       - B03: "01" # To record // 1 
       - B04: "00" # First hashed 
結果