Bernecker&Rainer Industrie-Elektronik Ges.m.b.H 5E903029 Manuel D’Utilisation

Page de 29
MIFARE 
18
Data sheet V 1.00 5E9030.29
5.5 Access rights
There are various options for parameter 2 depending on the configuration.
MIFARE access rights (parameter 2)
Config
Key_CMD
Key_EEPROM
Key_TEMP
Para2
6-byte key
Sector for key in reader's EEP-
ROM
Uses the temporarily stored key: Dummy value (0-63)
Table 8: MIFARE access rights (parameter 2)
"A" = Authentication with key A, "B" = Authentication with key B
Sector = 0-63
Source and target block = 0-254 (depends on type: 0-63 for MIFARE 1K, 0-254 for MIFARE 4K;
for "Decrement", "Increment" and "Restore", the source block must be a value block)
Data and key = 00- FF (no leading "0x", bytes can optionally be separated by a space)
Value = 4 bytes including sign bit
All commands and parameters are in ASCII. Data is in 00h hex format.
Para1
Para2
Para3
Para4
Para5
Block (typically 3 - sector trail-
er)
Access rights for block 0 (data
block)
Access rights for block 1 (data
block)
Access rights for block 2 (data
block)
Access rights for block 3 (sec-
tor trailer)
Table 9: MIFARE access rights (5-byte parameters)
Value
RD
WR
INCR
DECREMENT / TRANSFER / RESTORE
Comment
0x00
A / B
A / B
A / B
A / B
Full access with every key (de-
fault factory setting)
0x01
A / B
B
-
-
0x02
A / B
-
-
-
0x03
A / B
B
B
A / B
Value block
0x04
A / B
-
-
A / B
Value block
0x05
B
-
-
-
0x06
B
B
-
-
0x07
-
-
-
-
No access
Table 10: MIFARE access rights - Parameters 2, 3 and 4 (data blocks)
If key B is read in the corresponding sector trailer, it cannot be used for authentication (all of the yellow rows in
the table above).
Consequences: When the reader attempts to authenticate a block in a sector with Key B (access conditions
marked in gray), then the card will refuse all subsequent memory access following the authentication.
Value
Key A
Access bits
Key B
Comment
RD
WR
RD
WR
RD
WR
0x00
-
A
A
-
A
A
Key B can be read.
0x01
-
B
A / B
-
-
B
0x02
-
-
A
-
A
-
Key B can be read.
0x03
-
-
A / B
-
-
-
No access
0x04
-
A
A
A
A
A
Key B can be read (factory default).
0x05
-
-
A / B
B
-
-
0x06
-
B
A / B
B
-
B
0x07
-
-
A / B
-
-
-
No access
Table 11: MIFARE access rights - Parameter 5 (sector trailer)
The rows marked in yellow are access conditions where key B can be read and used for data.