Digital Signal Processing Reference
In-Depth Information
S = 0, Y = 0, manufacturer-block
Sector 0
S
=
0, Y
=
0, manuf. block
SNR
TAG, size, ...
Production
Sector 1
S = 0, Y = 1, directory
Y
=
3, sector trailer:
Access
conditions
Sector 2
Key A
GPB
Key B
S = 0, Y = 2, directory
Sector 3
S
=
0, Y
=
3, trailer
0x69: Card not personalized
non-standard
Sector 4
Sector 0
Bit 8
Bit 0
Sector 5 ...
Y
=
1..2, Application directory:
INFO
CRC
ID7
ID6
ID5
ID4
ID3
ID2
ID1
R.F.U.
APPL (1 = multi/
0 = mono)
DIR available (1 = yes /0 =
DIR version
ID$F
ID$E ID$D
ID$C ID$B ID$A
ID9
ID8
Sector 0xE
Byte 0xF
Byte 0
Read with
key:
write with
key:
Increment
with key:
Dec, trf, rst
with key:
Sector 0xF
INFO: 1 byte header, 1 byte 8-bit-CRC
IDn: 2 bytes application identifier, sector n
16 sectors × 4 blocks × 16
A/B
B
-
-
Figure 10.18 The data structure of the MIFARE application directory consists of an arrange-
ment of 15 pointers (ID1 to ID$F), which point to the subsequent sectors
Info: 2 bytes
MSB
S
=
0, Y
=
1..2, application directory
LSB
INFO
CRC
@Y
=
1
ID7
ID6
ID5
ID4
ID3
ID2
ID1
Info-byte
8 bit-CRC
ID$F
ID$E
ID$D
ID$C
ID$B
ID$A
ID9
ID8
@Y = 2
Bit 8
Bit 0
Byte 0xF
Byte 0
Application-ID for sector-X: 2 byte:
MSB
LSB
R.F.U.
Function cluster
Application code
Pointer to CPS
(CPS
=
Card publisher sector)
8 bits (256 allocations)
00h ... FFh = Application code (cluster<>00h)
00h ... FFh = Administration code (suffix)
8 bits (256 allocations)
01h ... FFh = Function cluster
00h = Administration-code (prefix)
#00 00h sector free
#00 01h sector
#00 02h sector reserved
#00 03h DIR continued (future)
#00 04h card holder (name, sex)
# .... r.f.u.
Figure 10.19 Data structure of the MIFARE application directory: it is possible to find out
what applications are located in each sector from the contents of the 15 pointers (ID1 to ID$F)
Sector 0 itself does not require an ID pointer, because the MAD itself is stored in
sector 0. The 2 bytes that this leaves free are used to store an 8-bit CRC, which is
used to check the MAD structure for errors, and an info byte. A note can be recorded
in the lowest 4 bits of the info byte, giving the sector ID of the card publisher. In our
example, this would be the sector ID of one of the sectors in which the data belonging
to the city of Munich is stored. This allows the reader to determine the card publisher,
even if more than one application is recorded on the smart card.
 
Search WWH ::




Custom Search