SmartCardIO EMV Reader, find my card type with only the ATR number

社会主义新天地 提交于 2019-12-01 01:09:13

AID (Application ID) = RID(Registered Application ID) || PIX (Property Application Extension)

The best way how to recognize what application is installed on card - make Select PSE. Detailed description in EMV Book 1, 12 Application Selection, 12.3.2 Using the PSE.

Full algorithm you can find on Figure 17: Terminal Logic Using Directories.

Quick algorithm:

1) Command Select PSE or PPSE.

  Send: 00 A4 04 00 0E 31 50 41 59 2E 53 59 53 2E 44 44 46 30 31 00

  Responce will will contain:
   '6F' FCI Template M
      '84' DF Name M
      'A5' FCI Proprietary Template M
        '88' SFI of the Directory Elementary File M
        '5F2D' Language Preference O
        '9F11' Issuer Code Table Index O
        'BF0C' FCI Issuer Discretionary Data O

Here you can find SFI of PSE.

2) Command ReadRecord 1 SFI X

 Send: 00 B2 01 0C 00

  Receive list of tag. 
   '70' Application Elementary File (AEF) Data Template                
      '61' Application Template                                           
        '70' Application Elementary File (AEF) Data Template                
          '61' Application Template                                           
            '4F' Application Identifier (AID)
            '50' Application Label
            ...  and so on

Look there for Tag '4F' Application Identifier (AID). From it you can extract and compare RID.

Аlso you can:

1) Get own list of AID and successively SELECT application from it.

2) SELECT Default or Next applications and get AID from response.

There is no way to get RID values from card with ATR. ATR is used to identify card hardware and software, it is not used to get info about installed applications(visa, visa electron, mastercard etc) https://eftlab.com/index.php/site-map/knowledge-base/212-emv-rid

There is one way to get installed applications , reading Payment System Environment(PSE ) of card . You can send Read PSE commands to contact cards and Read Proximity PSE command for contactless cards

Contact PSE:

00A404000E315041592E5359532E4444463031

Contactless PPSE:

00A404000E325041592E5359532E444446303100

And then you must parse if there is more than one installed application.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!