本文介绍了Mifare 更改 KEY A 和 B的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 ACR122U 非接触式 NFC 读卡器.我买了很多空白的 RFID Mifare 4k 标签.他们默认的Authentication KEY A和KEY B是FF FF FF FF FF FF.

I have an ACR122U Contactless NFC reader. I bought a lot of blank RFID Mifare 4k tags. Their default Authentication KEY A and KEY B is FF FF FF FF FF FF.

现在我想把它们改成别的东西.我正在使用 APDU 结构.我正在发送这样的命令并且效果很好:

Now I want to change them to something else. I'm using APDU structure. I'm sending commands like this and it works well:

byte[] baData = { 0x01, 0x00, (byte)i, 0x60, 0x00 };
APDUCommand apdux3 = new APDUCommand((byte)0xFF, (byte)0x86, (byte)0x00, (byte)0x00, baData, 0x05);

效果很好.我不知道这个接口和模型是什么意思,但是使用这种类型和结构,我想改变KEY A和KEY B.

It works well. I don't know what this interface and model means, but using this type and structure, I want to change KEY A and KEY B.

请帮帮我.我找不到任何文件.

Please help me. I can't find any document.

问候

推荐答案

没错,芯片在出厂时默认按键为 FF FF FF FF FF FF FF 用于按键 A 和 B.

That's true, chips are delivered with default key FF FF FF FF FF FF for key A and B.

要更改它们,您必须使用正确的访问位对卡进行身份验证.

To change them you have to authenticate the card with the correct access bits.

注意:Mifare 密钥的组成如下:

Note: the Mifare key is composed as follow:

  • 密钥 A 的 6 个字节
  • 4 个字节用于访问位
  • 键 B 的 6 个字节是可选的,可以设置为 00 或任何其他值

要更改您的密钥,您必须对 Sector Trailer 进行身份验证,并且如果您也想更改它们,请编写您的新密钥 + 新访问条件.

To change your keys you have to authenticate the Sector Trailer and the write your new keys + new access conditions if you want to change them too.

新密钥 A = 00 11 22 33 44 55访问位不被覆盖未使用键 B(所以 FF FF FF FF FF FF)

New key A = 00 11 22 33 44 55Access bits not overwrittenKey B not used (so FF FF FF FF FF FF)

=> 写入扇区拖尾 00 11 22 33 44 55 FF 0F 00 FF FF FF FF FF FF FF

=> Write to Sector Trailer 00 11 22 33 44 55 FF 0F 00 FF FF FF FF FF FF FF

在恩智浦网站上或直接在以下链接中提供更多详细信息:https://www.nxp.com/docs/en/data-sheet/MF1S50YYX_V1.pdf

Further details are on the NXP website available or directly at the following link: https://www.nxp.com/docs/en/data-sheet/MF1S50YYX_V1.pdf

默认访问位通常是 FF 0F 00 允许写入和读取每个块以及读取和写入密钥 B.

A default Access Bits is usually FF 0F 00 that allow to write and read each block and to read and write key B.

这篇关于Mifare 更改 KEY A 和 B的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-21 08:38