Mifare访问条件计算 [英] Mifare Access condition calculation

查看:149
本文介绍了Mifare访问条件计算的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道该帖子:- Mifare Classic的锁定机制1K

但是,实际上还不清楚-如何在此字符串中计算类似FF 07 80 FF的值:

However, it is really not clear - how a value like FF 07 80 FF is calculated in this string:

D3 F7 D3 F7 D3 F7 FF 07 80 FF 00 00 00 00 00 00

这意味着可以用键A读取这些块,并用键B写入这些块,但是不允许inc/dec.

This means that the blocks can be read with key A and written with Key B but does not allow inc/dec.

如果我必须支持递增和递减运算,访问位应该是什么样子.我知道C1,C2和C3必须为1,1,0,这如何反映到字节6、7和8.

How should the access bits look like if I have to support increment and decrement operations. I understand that C1, C2 and C3 must be 1,1,0 how does this reflect to the byte 6, 7 and 8.

任何帮助将不胜感激.

推荐答案

访问位FF 07 80转换为

C1 = 0x0 => C1_3 = 0, C1_2 = 0, C1_1 = 0, C1_0 = 0
C2 = 0x0 => C2_3 = 0, C2_2 = 0, C2_1 = 0, C2_0 = 0
C3 = 0x8 => C3_3 = 1, C3_2 = 0, C3_1 = 0, C3_0 = 0

因此只能使用键A (Cx_3 = 0 0 1)来读取和写入扇区预告片.只能使用键A (Cx_{0,1,2} = 0 0 0,由于尾随块的访问条件而禁用键B)对数据块执行所有操作(读,写,递增,递减等).

So the sector trailer can be read and written using key A only (Cx_3 = 0 0 1). All operations (read, write, increment, decrement, etc) can be performed on the data blocks using key A only (Cx_{0,1,2} = 0 0 0, key B is disabled due to the access conditions of the trailer block).

如果您希望能够使用键A读取所有块,使用键B进行写入,使用键B执行值块递增以及使用键A和B执行值块递减等,则可以使用如下访问条件:

If you want be able to read all blocks with key A, write with key B, perform value block increments with key B and perform value block decrement, etc. with keys A and B, you could use access conditions like this:

  • 扇区尾部仅使用键B写入:Cx_3 = 0 1 1
  • 数据/值块:用键A读/减,用键B写/增量:Cx_{0,1,2} = 1 1 0

C1_3 = 0, C1_2 = 1, C1_1 = 1, C1_0 = 1 => C1 = 0x7
C2_3 = 1, C2_2 = 1, C2_1 = 1, C2_0 = 1 => C2 = 0xF
C3_3 = 1, C3_2 = 0, C3_1 = 0, C3_0 = 0 => C3 = 0x8

这导致访问位08 77 8F.因此,您的部门预告片可能如下所示(键A = D3F7D3F7D3F7,键B = 000000000000):

This leads to the access bits 08 77 8F. Hence, you sector trailer could look like this (with key A = D3F7D3F7D3F7 and key B = 000000000000):

D3F7D3F7D3F7 08778F FF 000000000000

这篇关于Mifare访问条件计算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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