获取数据APDU命令的不同标签和响应格式 [英] Get Data APDU command different tags and response format

查看:420
本文介绍了获取数据APDU命令的不同标签和响应格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您可能已经知道, Gloabal平台卡规范定义了一个名为 Get Data 的命令. em>从智能卡中检索一些信息.

As you may know, Gloabal Platform Card Specification defines a command named Get Data to retrieve some information from the smart card.

GlobalPlatformPro 是与智能卡通信的流行工具之一.当我使用此工具列出卡上已安装的小程序时,将显示以下输出:

GlobalPlatformPro is one of the popular tools for communication with smart cards. When I list the installed applets on the card using this tool, I have the following output:

D:\3-TestTools\SmartCard>GP -list -d -v -i
//Useless Info Censored
ATR: 3B6800000073C84012009000
//Select APDU Command
A>> T=0 (4+0000) 00A40400 00
A<< (0018+2) (48ms) 6F108408A000000003000000A5049F6501FF 9000

***** Card info:
A>> T=0 (4+0000) 80CA9F7F 00
A<< (0045+2) (65ms) 9F7F2A4250010C425102902610116000099A5A0AF9425211694253117E00000000000000000000000000000000 9000
Card CPLC:
ICFabricator: 4250
ICType: 010C
OperatingSystemID: 4251
OperatingSystemReleaseDate: 0290
OperatingSystemReleaseLevel: 2610
ICFabricationDate: 1160
ICSerialNumber: 00099A5A
ICBatchIdentifier: 0AF9
ICModuleFabricator: 4252
ICModulePackagingDate: 1169
ICCManufacturer: 4253
ICEmbeddingDate: 117E
ICPrePersonalizer: 0000
ICPrePersonalizationEquipmentDate: 0000
ICPrePersonalizationEquipmentID: 00000000
ICPersonalizer: 0000
ICPersonalizationDate: 0000
ICPersonalizationEquipmentID: 00000000

***** CARD DATA
A>> T=0 (4+0000) 80CA0066 00
A<< (0078+2) (95ms) 664C734A06072A864886FC6B01600C060A2A864886FC6B02020101630906072A864886FC6B03640B06092A864886FC6B040215650B0609
2B8510864864020103660C060A2B060104012A026E0102 9000
GlobalPlatform card
Version: 2.1.1
TAG3: 1.2.840.114283.3
SCP version: SCP_02_15
TAG5: 1.3.656.840.100.2.1.3
TAG6: 1.3.6.1.4.1.42.2.110.1.2

***** KEY INFO
A>> T=0 (4+0000) 80CA00E0 00
A<< (0020+2) (47ms) E012C00401018010C00402018010C00403018010 9000
VER:1 ID:1 TYPE:DES3 LEN:16
VER:1 ID:2 TYPE:DES3 LEN:16
VER:1 ID:3 TYPE:DES3 LEN:16

//Useless Info Censored

如上所示,该工具使用以下APDU命令从卡中提取了Card InfoCard DataKey Info:

As you see above, the tool extracted Card Info, Card Data and Key Info from the card using following APDU commands:

  • 卡信息:80 CA 9F 7F
  • 卡数据:80 CA 00 66
  • 关键信息:80 CA 00 E0
  • Card Info : 80 CA 9F 7F
  • Card Data : 80 CA 00 66
  • Key Info : 80 CA 00 E0

问题:

    全球平台卡规范中提到了
  1. 标记E066,但没有标记9F 7F!规范在哪里?

  1. Tags E0 and 66 are mentioned in Global Platform Card Specification, but the tag 9F 7F don't! Where is it specification?

如《全球平台规范》中所述,Card Data(标签66)的格式在 ISO/IEC 7816第6部分中定义.但是在此文档中只有一个表格,如下所示:

As it is mentioned in the Global Platform Specification, the format of Card Data (Tag 66) is defined in ISO/IEC 7816 Part 6. But in this document there is only a table as below:

如上所述,该表的内容与GPP工具输出中的输出确实不同.如何解释输出(获取数据APDU命令响应)?

As you see above, the contents of this table is really different from the output that I can see in GPP tool output. How I can interpret the outputs (Get Data APDU command responses)?

推荐答案

(在Global Platform 2.2.1和ISO/IEC 7816-6:2004的上下文中)

(In context of Global Platform 2.2.1 and ISO/IEC 7816-6:2004)

  • 标记'E0'(密钥信息模板):

  • 在全球平台中定义(请参阅第11.3.3.1节以及表11-27和11-28).

标记 '66'(卡数据):

  • 在ISO 7816-6中定义-它可能包含名为"Discretionary Data Objects"的标签"73",其描述为未定义的数据对象的串联" ISO/IEC 7816"(请参见表6).

  • Defined in ISO 7816-6 -- it may contain tag '73' called "Discretionary Data Objects" described as "Concatenation of data objects not defined in ISO/IEC 7816" (see Table 6).

全局平台将标签"66"(卡数据)中标签"73"的内容定义为卡识别数据"(请参见7.4.1.3节,附录H.2和表H-1).此定义符合ISO 7816.

Global Platform defines the contents of tag '73' within tag '66' (Card data) as "Card Recognition Data" (see section 7.4.1.3, appendix H.2 and Table H-1). This definition is in line with ISO 7816.

标记'9F7F'(CPLC/卡片生产生命周期数据):

Tag '9F7F' (CPLC / Card Production Life Cycle Data):

  • 在"Visa集成电路卡/卡规范"中定义,该视图不是公开的(但可以使用google找到). Open Platform 2.0.1(GP的前身)定义了CPLC应该可以通过GET DATA命令进行检索-但它不会告诉特定的标签.
  • Defined in "Visa Integrated Circuit Card / Card Specification" which is not public (but might be found using google). The Open Platform 2.0.1 (predecessor of GP) defines that CPLC should be retrievable with the GET DATA command -- but it does not tell the particular tag.

希望这有道理...祝你好运!

Hope this makes some sense...good luck!

这篇关于获取数据APDU命令的不同标签和响应格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆