[英]MIFARE Classic 1K load authentication keys failure with ACR122U
I am using an ACR122U NFC reader/writer and a MIFARE Classic 1K card.我使用的是 ACR122U NFC 读写器和 MIFARE Classic 1K 卡。 To load authentication keys for the MIFARE card, I use the following APDU command:要加载 MIFARE 卡的身份验证密钥,我使用以下 APDU 命令:
FF 82 20 00 06 FF FF FF FF FF FF
The reader responds with 90 00
(indicating success).阅读器响应90 00
(表示成功)。 However, on another PC I have the same reader/writer and the same tag but I receive the response code 63 00
, which means that the operation failed.但是,在另一台 PC 上,我有相同的读取器/写入器和相同的标签,但我收到响应代码63 00
,这意味着操作失败。
When I read the ACR122U documentation it states the command as当我阅读 ACR122U 文档时,它将命令声明为
FF 82 00 00 06 <KEY>
This byte is named key structure and its value is 00 in the documentation.这个字节被命名为密钥结构,在文档中它的值为 00。 Can this byte be the source of this problem?这个字节可能是这个问题的根源吗?
Can anyone help me on this and explain the value of the key structure byte?任何人都可以帮助我并解释密钥结构字节的值吗?
I'm rather surprised that you found one ACR122U that supports key structure (P1) set to 0x20.我很惊讶您发现一个 ACR122U 支持设置为 0x20 的密钥结构 (P1)。 The API manual of the reader (see section 5.1 Load Authentication Keys ) clearly indicates that values other than 0x00 are reserved (ie must not be used). 阅读器的API 手册(请参阅第 5.1 节加载验证密钥)明确指出 0x00 以外的值是保留的(即不得使用)。 This means that the ACR122U only supports card keys (ie authentication keys for cards) in volatile memory (ie keys are cleared from memory when the reader is unplugged).这意味着 ACR122U 仅支持易失性存储器中的卡密钥(即卡的验证密钥)(即当读卡器拔下时,密钥会从存储器中清除)。
You can find the definition of the key structure (P1) byte in the PC/SC specification (in Part 3. Requirements for PC-Connected Interface Devices ):您可以在PC/SC 规范中找到密钥结构 (P1) 字节的定义(在Part 3. Requirements for PC-Connected Interface Devices 中):
Load Authentication Keys加载身份验证密钥
find the attached picture找到附加的图片
Key Structure: 00 key loaded into the reader volatile memory Key Number: 00~01 key location on the reader Key: the key value loaded into the reader eg {FF FF FF FF FF FF}密钥结构:00 密钥载入读写器易失性存储器 密钥编号:00~01 读写器上的密钥位置 密钥:载入读写器的密钥值,例如 {FF FF FF FF FF FF}
the response : 90 00 the operation completed successfully : 63 00 the operation failed响应:90 00 操作成功完成:63 00 操作失败
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.