[英]How to change the Mifare Classic 1k key A and Key B
I am using a Mifare classic 1k reader, and it comes with the default key A and B which is: 我使用的是Mifare经典1k阅读器,它带有默认键A和B,它是:
FFFFFFFFFFFF
Using the Key A to read and write works. 使用密钥A来读写作品。 but I want to change the keys.
但我想改变钥匙。
Is there anyway to get the correct access bits for the sector and what is the format? 无论如何都要获得扇区的正确访问位和格式是什么?
What I have done now is, 我现在做的是,
<newKey>+ access bits + <oldKEY>
212121212121078069FFFFFFFFFFFF
The access bits 078069
I got from reading block 7 of sector 1, which is like this: 我从读取扇区1的块7得到的访问位
078069
,如下所示:
000000000000FF078069FFFFFFFFFFFF
But there is error. 但是有错误。
Are the access bits incorrect or is the format wrong? 访问位是否不正确或格式错误?
Depending on the access control settings of the sector trailer, you may need to authenticate with key A or key B to be able to write keys. 根据扇区尾部的访问控制设置,您可能需要使用密钥A或密钥B进行身份验证才能写入密钥。 See the section 8.7 (and specifically 8.7.2) of the datasheet at http://www.nxp.com/documents/data_sheet/MF1S70YYX.pdf on how to encode/decode the access control bits in the sector trailer.
有关如何对扇区预告片中的访问控制位进行编码/解码,请参见http://www.nxp.com/documents/data_sheet/MF1S70YYX.pdf中数据表的第8.7节(特别是8.7.2)。
What you need to do is, if access bits have permission (and your's seems like they do), is to write: 你需要做的是,如果访问位有权限(并且你的看起来像他们那样),那就是写:
AAAAAAAAAAAA078069BBBBBBBBBBBB
where AAAAAAAAAAAA and BBBBBBBBBBBB are the NEW A & B keys, respectively. 其中AAAAAAAAAAAA和BBBBBBBBBBBB分别是新的A&B键。 (You never write the old keys, you authenticate with onthem first).
(你永远不会写旧密钥,先通过onthem进行身份验证)。
When you read, using key A, you'll always get 当您阅读时,使用密钥A,您将永远得到
000000000000078069BBBBBBBBBBBB
Key A will allways be masked 密钥A将被掩盖
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.