无法进行身份验证作为NDEF标签的MIFARE经典标签 [英] Unable to authenticate to a MIFARE Classic tag used as NDEF tag

查看:641
本文介绍了无法进行身份验证作为NDEF标签的MIFARE经典标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是ACR 1255U-J1通过蓝牙连接的外接读卡器。我用来访问读者的图书馆是acsbt-1.0.0 preview7。我用下面的命令来验证MIFARE经典标签的部门1(4座):

I'm using an ACR 1255U-J1 as external reader connected through Bluetooth. The library I use to access the reader is acsbt-1.0.0preview7. I use the following commands to authenticate to sector 1 (block 4) of a MIFARE Classic tag:


FF 82 0000 06 FFFFFFFFFFFF
FF 86 0000 05 01 00 04 60 00

当我验证到一个空的MIFARE经典标签(与制造商默认配置),我收到响应状态字 9000 。这表明验证成功。

When I authenticate to an empty MIFARE Classic tag (with manufacturer default configuration), I receive the response status word 9000. This indicates that authentication was successful.

然而,当我尝试验证到已格式化用作NDEF标签的MIFARE经典标签,返回的状态字 6300

However, when I try to authenticate to a MIFARE Classic tag that has been formatted for use as an NDEF tag, the returned status word is 6300.

有标签格式之间的差异来验证?

Is there a difference between tag formats to authenticate?

推荐答案

状态字 6300 表示认证失败。因此,你最有可能使用的身份验证错了钥匙。

The status word 6300 indicates that authentication fails. Thus you are most likely using the wrong key for authentication.

您目前正在尝试用密钥A进行验证( 0x60的)与键值 FFFFFFFFFFFF 扇区1( 0×04 ,因为它开始于4座)。

You currently try to authenticate with key A (0x60) with the key value FFFFFFFFFFFF to sector 1 (0x04, since it starts at block 4).

在MIFARE经典标签的格式用作NDEF标签用于以下数据表中定义恩智浦专有的NDEF映射规范:

NXP's proprietary NDEF mapping specification defined in the following datasheet is used when a MIFARE Classic tag is formatted for use as an NDEF tag:

  • NFC Type MIFARE Classic Tag Operation
  • MIFARE Classic as NFC Type MIFARE Classic Tag

这NDEF映射更改访问键明确定义的值:

That NDEF mapping changes the access keys to well-defined values:


  • MAD 0扇区(和行业16 4K卡):

  • MAD sector 0 (and sector 16 on 4K cards):


  • 键A将被​​设置为 A0A1A2A3A4A5

  • 密钥B可以被设置为任何值。 Android的,例如,会离开它的默认值 FFFFFFFFFFFF

  • 准入条件​​可以设置为与这两个键或者允许只读与一键访问和读取键B /写访问要么允许读/写访问。

NDEF扇区(如在MAD中声明的范围内,1..15(和17..39上4K卡)):

NDEF sectors (as declared in the MAD, within the range 1..15 (and 17..39 on 4K cards)):


  • 键A将被​​设置为 D3F7D3F7D3F7

  • 密钥B可以被设置为任何值。 Android的,例如,会离开它的默认值 FFFFFFFFFFFF

  • 准入条件​​可以设置为与这两个键或者允许只读与一键访问和读取键B /写访问要么允许读/写访问。

(如在MAD中声明的范围内,1..15(和17..39上4K卡)内),它们不用于NDEF映射其他部门:

Other sectors (as declared in the MAD, within the range 1..15 (and 17..39 on 4K cards)) that are not used for the NDEF mapping:


  • 键和访问条件都被设置为特定应用程序(或默认)值并没有被NDEF映射规范感动。

因此​​,当标签使用NDEF映射和尝试来验证第一NDEF部门,你反而需要使用NDEF键带有值 D3F7D3F7D3F7 而不是:

Thus, as the tag uses the NDEF mapping and you try to authenticate to the first NDEF sector, you would instead need to use the NDEF key A with the value D3F7D3F7D3F7 instead:


FF 82 0000 06 D3F7D3F7D3F7
FF 86 0000 05 01 00 04 60 00

请注意,根据接入位的配置,你或许只读取密钥A的访问。

Note that depending on the configuration of the access bits you might only have read access with key A.

这篇关于无法进行身份验证作为NDEF标签的MIFARE经典标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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