Mifare 1K验证密钥 [英] Mifare 1K authentication keys
问题描述
我有一个MIFARE 1K标签.可以使用认证密钥A来写入/读取某些块,而可以使用认证密钥B来写入其他块. 为什么?如何更改所有要写入/读取的块,例如,使用键A?
I have a MIFARE 1K tag. Some blocks can be written/read using authentication key A, while other block can be written using authentication key B. Why? How can I change all blocks to be written/read, for example, with key A?
例如,我可以使用键A编写键块07,也可以为此键块更改键A,但是我不能使用键B来写键块,也不能更改键B表示此键块.
For example, I can write the key block 07 using key A, and I can also change the key A for this key block, but I can't write on it using key B, and I can't change the key B for this key block.
为什么我应该使用键A而不是键B进行读写?有什么区别?
Why should I write/read using key A instead of key B? What's the difference?
推荐答案
MIFARE Classic卡的每个扇区都有两个身份验证密钥:密钥A和密钥B.这两个密钥以及访问条件存储在每个密钥的最后一个块中部门(所谓的部门预告片).部门预告片如下所示:
Each sector of a MIFARE Classic card has two authentication keys: key A and key B. These two keys together with access conditions are stored in the last block of each sector (the so-called sector trailer). The sector trailer looks like this:
+-----------------------------+--------------+----+-----------------------------+
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
+-----------------------------+--------------+----+-----------------------------+
| Key A | Access Conditions | Key B |
| (6 bytes) | (4 bytes) | (6 bytes) |
+-----------------------------+--------------+----+-----------------------------+
访问条件定义了如何访问扇区中的块:
The access conditions define how you can access the blocks in the sector:
- 使用密钥A进行身份验证后可以发出的命令(读,写,值块操作)
- 使用密钥B进行身份验证后可以发出的命令(读,写,值块操作)
- 如果密钥B完全用作身份验证密钥.
典型的情况是:
- 仅可以使用密钥A进行身份验证.密钥A具有只读访问权限.
- 仅可以使用密钥A进行身份验证.密钥A具有读/写访问权限.
- 两个密钥都可以进行身份验证.密钥A具有只读访问权限.密钥B具有读/写访问权限.
- 两个密钥都可以进行身份验证.密钥A和B具有只读访问权限.
您可以在 查看全文