Mifare Classic data template

Overview

Use this template to read arbitrary data from one or more blocks of a Mifare Classic card.

Use this template to read arbitrary data from one or more blocks of a Mifare Plus card configured for Security Level 1 (Mifare Classic emulation).

Configuration

Register t0: select of Mifare Classic data template

Register 03t0 (1 byte) selects the template. Set it to 61 to select this template.

Register t1: output format

Register 03t1 defines the output format. Refer to Template engine : Data Output Format.

Register t2: output prefix

Register 03t2 defines the output prefix. Refer to Template engine : Output Prefix.

Register t3: AID, Address, Byte offset / Bit offset

Register 03t3 (5 bytes) allows to finely specify where the data is stored in the card.

Bytes Bits Content
0-1 Mifare Application IDentifier (AID)
2 Block number
3 Offset of data in bytes
4 Second Offset of data in bits

Register t5: secret key and communication mode

The authentication key could be stored either directly in the non-volatile memory at address 03t5) or in the SpringCore device's Secure Element. The second method has to be preferred.

The register also stores the communication mode: ReadPlainMACed , ReadEncrypted, ReadMACed, ReadPlain, ReadUnMACed, ReadUnMACedResponseMACed, ReadPlainUnMACed and ReadPlainUnMACedResponseMACed.

Secret key stored in the template

Register 03t5 (1 or 7 bytes) stores the key version to use (A or B) and the secret key itself.

Bytes Bits Content
0 7 Key selector:
10 : key B
00 : key A
6-4 RFU, must be 000
3-0 Use key number from E2PROM secure storage
This option is olny used if no key value is set.
1-6 Value of the key
6 bytes Mifare Classic key

Secret key stored in the Secure Element

Register 03t5 (2 bytes) stores the key version to use (A or B) and the address of the key in the Secure Element.

Bytes Bits Content
0 7 Key selector:
10 : key B
00 : key A
6-0 RFU, must be 0000000
1 7-5 000
4-0 Address of the key in the Secure Element. Use 11 for template 1, 12 for template 2, 13 for template 3 and 14 for template 4. Any other value is prohibited.