简体   繁体   English

为什么在智能卡中选择 '90 00' 状态字作为成功响应?

[英]Why '90 00' status word is chosen for sucessful response in smart cards?

ISO 7816-3 (Cards with contacts — Electrical interface and transmission protocols) defines that response value of 90 00 as 'Process completed normally'. ISO 7816-3(带触点的卡 - 电气接口和传输协议)将响应值90 00定义为“过程正常完成”。

It is unlike conventions in programming languages which return value 0 is considered as success and normal termination of applications.它不同于编程语言中的约定,返回值0被认为是应用程序的成功和正常终止。

Does anyone know what is the reason for this?有谁知道这是什么原因?

ISO 7816-4 (2013) specifies for status bytes: ISO 7816-4 (2013) 为状态字节指定:

SW1-SW2 indicates the processing state. Due to the specifications in ISO/IEC 7816-3, any value different from '6XXX' and '9XXX' is invalid. SW1-SW2 表示处理 state。由于 ISO/IEC 7816-3 中的规范,任何不同于 '6XXX' 和 '9XXX' 的值都是无效的。

Note, that 6X and 9X are on the other hand invalid for INS byte with the same reference given.请注意,另一方面,6X 和 9X 对于具有相同引用的 INS 字节无效。

This issue derives from character-based T=0 protocol, see the section Procedure bytes in 7816-3:此问题源自基于字符的 T=0 协议,请参阅 7816-3 中的Procedure bytes部分:

If the value is '6X' or '9X' [...] it is a SW1 byte.如果值为“6X”或“9X”[...],则它是一个 SW1 字节。

Summary: The first smart card protocol T=0 had the need for characteristic byte values, probably to re-sync after communication problems.摘要:第一个智能卡协议 T=0 需要特征字节值,可能是为了在通信出现问题后重新同步。 Zero is no good choice for that, since it is needed for other purposes as well (Even for an application this applies, eg if the card does not send an answer at all).零不是一个好的选择,因为它也需要用于其他目的(即使对于应用程序也是如此,例如,如果卡根本不发送答案)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM