简体   繁体   English

如何更改Mifare Classic 1k键A和键B.

[英]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.

相关问题 使用密钥A和B读取Mifare 1k卡 - Reading Mifare 1k card with Key A and B 如何使用MIFARE 1k classic在多个块中写入NDEF记录? - How to write NDEF record across multiple blocks with MIFARE 1k classic? NFC MIFARE Classic 1K 无法读取或写入 - NFC MIFARE Classic 1K cannot read or write 从WinForm应用程序读取Mifare 1k - Reading Mifare 1k from a WinForm application 使用密钥 B 的 C# Mifare 扇区身份验证代码 - C# Mifare sector Authentication Code using key B c#如何使用数字角色一键式sdk减少指纹模板字节大小以适合mifare 1k卡 - c# how to reduce Fingerprint template byte size to fit in mifare 1k card using digital persona one touch sdk 如何通过连接到Web应用程序中本地计算机的ACR122U NFC标签读取器读取mifare 1k卡 - How to read a mifare 1k card through ACR122U NFC Tag reader connected to local machine in a web application MIFARE Classic - 什么会导致“全零密钥”和“未知密钥”错误? - MIFARE Classic - What could cause "All-zero key" and "Unknown key" error? Mifare Classic 4k中拖车扇区的位顺序 - Bit Order Of Trailor Sector in Mifare Classic 4k 如何在C#中编写一个看起来像A的递归函数(key,B(key,C(key,ValFactory(key))))? - How to write a recursive function in C# that looks like A(key, B(key, C(key, ValFactory(key))))?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM