PyScard - 执行 GET RESPONSE 后获得的数据的解释是什么?
PyScard - What is the interpretation of the data obtained after executing GET RESPONSE?
我正在尝试使用 pyScard 和 ISO 7816 命令找出接触式智能卡中的文件层次结构。
我做的第一件事是使用
选择主文件(INS = 0xA4)
connection.execute([0x0, 0xA4, 0x0, 0x0, 0x0])
这个 returns ([ ], 0x61, 0x19) 这意味着我必须 运行 一个 GET_RESPONSE (INS = 0xC0) 命令才能得到答案。
这样做我 运行
connection.execute([0x0, 0xC0, 0x0, 0x0, 0x19])
其中returns一组字节(除了0x90 00)。
如果我理解正确,通过 运行 宁 SELECT FILE 我已经选择了主文件,但我似乎没有找到对我通过 GET 收到的那些字节的解释回应,这是什么意思?你如何解读它们?
谢谢!! :)
谢谢!!
GET RESPONSE has no definition of its own for a card speaking T=0, which you seem to have. You have to look at SELECT command. Its quite clear, that a typical card will return a number of FCIs (file control parameter data objects) wrapped in an 62/64/6F tag in TLV-format, but you have to compare this by looking at the response you receive. A card can return something completely proprietary however and still claim to conform to 7816-4. Without an OS manual you are out of luck then.
我正在尝试使用 pyScard 和 ISO 7816 命令找出接触式智能卡中的文件层次结构。
我做的第一件事是使用
选择主文件(INS = 0xA4) connection.execute([0x0, 0xA4, 0x0, 0x0, 0x0])
这个 returns ([ ], 0x61, 0x19) 这意味着我必须 运行 一个 GET_RESPONSE (INS = 0xC0) 命令才能得到答案。
这样做我 运行
connection.execute([0x0, 0xC0, 0x0, 0x0, 0x19])
其中returns一组字节(除了0x90 00)。
如果我理解正确,通过 运行 宁 SELECT FILE 我已经选择了主文件,但我似乎没有找到对我通过 GET 收到的那些字节的解释回应,这是什么意思?你如何解读它们?
谢谢!! :)
谢谢
GET RESPONSE has no definition of its own for a card speaking T=0, which you seem to have. You have to look at SELECT command. Its quite clear, that a typical card will return a number of FCIs (file control parameter data objects) wrapped in an 62/64/6F tag in TLV-format, but you have to compare this by looking at the response you receive. A card can return something completely proprietary however and still claim to conform to 7816-4. Without an OS manual you are out of luck then.