MifarePlus卡如何从level1切换到level3
摘要
MifarePlus卡,SL1,SL3
MifarePlus Level3的数据及密钥存储结构和Mifareone有所区别,结构如下:
块相对地址 | 块地址 | AES对应密钥块地址 | ||
Sector0 | ||||
Block0 | 数据块 | 0x0000 | A密钥:0x4000 B密钥:0x4001 | |
Block1 | 数据块 | 0x0001 | ||
Block2 | 数据块 | 0x0002 | ||
Block3 | Level1 :KeyA+KeyB, Level3: data+config | 0x0003 | ||
Sector1 | ||||
Block0 | 数据块 | 0x0004 | A密钥:0x4002 B密钥:0x4003 | |
Block1 | 数据块 | 0x0005 | ||
Block2 | 数据块 | 0x0006 | ||
Block3 | Level1 :KeyA+KeyB, Level3: data+config | 0x0007 | ||
…. | ||||
Sector31 | ||||
Block0 | 数据块 | 0x007C | A密钥:0x403E B密钥:0x403F | |
Block1 | 数据块 | 0x007D | ||
Block2 | 数据块 | 0x007E | ||
Block3 | Level1 :KeyA+KeyB, Level3: data+config | 0x007F | ||
Sector32 | ||||
Block0 | 数据块 | 0x80 | A密钥:0x4040 B密钥:0x4041 | |
Block1 | 数据块 | 0x81 | ||
… | 数据块 | … | ||
Block15 | Level1 :KeyA+KeyB, Level3: data+config | 0x8F | ||
… | ||||
Sector39 | ||||
Block0 | 数据块 | 0xF0 | A密钥:0x404EB密钥:0x404F | |
Block1 | 数据块 | 0xF1 | ||
… | 数据块 | … | ||
Block15 | Level1 :KeyA+KeyB, Level3: data+config | 0xFF | ||
配置块 | ||||
MFP Configuration Block | 0xB000 | |||
Installation Identifier | 0xB001 | |||
ATS Information | 0xB002 | |||
Field Configuration Block | 0xB003 | |||
Key 块 | ||||
AES Sector Keys | 0x4000~0x403F | |||
AES Sector Keys | 0x4040~0x404F | 默认值FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF | ||
Originality Key | 0x8000 | 默认值FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF | ||
Card Master Key | 0x9000 | 默认值FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF | ||
Card Configuration Key | 0x9001 | 默认值FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF | ||
Level2 switch Key | 0x9002 | 默认值FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF | ||
Level3 switch Key | 0x9003 | 默认值FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF | ||
SL1 Card Authentication Key | 0x9004 | 默认值FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF | ||
Select VC Key | 0xA000 | 默认值FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF | ||
Proximity Check Key | 0xA001 | 默认值FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF | ||
VC Polling ENC Key | 0xA080 | 默认值FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF | ||
VC Polling MAC Key | 0xA081 | 默认值FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF |
注意:
1、 蓝色和黄色部分是关联部分。即数据区和密钥区对应部分(仅仅是在Level 2/3才对应,因只有级别2/3才使用到AES密钥认证)。
2、 在安全级别Level 1,是和Mifare classic 兼容的,每个扇区最后一块为密钥和配置块。
3、 AES 密钥分为A/B密钥是人为划分,是为了同Mifare classic 概念相同。在PLUS内部一个扇区是对应地址连续的AES密钥块。
4、 主要掌握如下key:
AES Sector Keys:
在Level2/3 中对数据的授权采用AES Key授权。该密钥可以在Level0写入。
CardMasterKey:
通过对该Key的授权,可以改变Card Configuration Key和Level2/3 switch Key
Card Configuration Key:
通过对该key的授权,可以改变MFP Configuration Block配置块内容。
Level2 switch Key:
通过对该key的授权,可以从Level1切换Level2。
Level3 switch Key:
通过对该key的授权,可以从Level2切换Level3,或从Level1切换到Level3。
5、 在Level0,除了出厂写入的用户不能修改的密钥外,都可以以明文方式写入,一般在Level0做初始化操作。注意,必须在该安全级别写入0x9000~0x9003块。
6、 Level3 级别支持明文、AES加密、加密且带MAC方式读写方式。本读卡器采用的是最保密的方式读写MifarePlus块:加密且带MAC方式。