Mifare UltraLight AES ID Template

Description

Use the Mifare UltraLight AES ID Template to read the UID of a Mifare UltraLight AES card configure for Random ID.

Registers

This Template uses 5 configuration registers:

Alias Offset Name Description
LKL 0 Lookup List Set to 64 to use this Template
TOF 1 Output Size and Format See details below
AUT 5 Authentication See details below
OPT 4 Options Template-specific Options
PFX 2 Prefix Template-specific Prefix

TOF - Output Size and Format

Offset : 1

Size : 2

Bit    Role Values
7-6 Invert the ID before transmitting? 0 : Do not invert ID bytes (order is 040...80)
3 : Invert ID bytes (order is 80...04)
5 RFU
4 RFU
3-0 Length and Format 0 : Decimal, 10 digits (truncation on 4-B)
1 : Raw (hex), 4 bytes (32 bits)
2 : Raw (hex), 8 bytes (64 bits)
3 : Raw (hex), 5 bytes (40 bits)
4 : Raw (hex), 10 bytes (80 bits)
5 : Raw (hex), 7 bytes (56 bits)
6 : Raw (hex), 11 bytes (88 bits)
7 : RFU
8 : Raw (hex), 16 bytes (128 bits)
9 : Raw (hex), 20 bytes (160 bits)
10 : Raw (hex), 24 bytes (196 bits)
11 : Raw (hex), 32 bytes (256 bits)
12 : Decimal, 12 digits (truncation on 5-B)
13 : Decimal, 13 digits (truncation on 5-B)
14 : Decimal, variable length
15 : Raw (hex), variable length

AUT - Authentication

Offset : 5

Size : 18

Byte 0 : Authentication Key

Bit    Role Values
7-2 RFU
0-1 Key Index inside the Mifare UltraLight AES According to datasheet, 0=DataProtKey, 1=UIDRetrKey, 2=OriginalityKey

Byte 1 : rfu0

Bytes 2-17 : Value of AES Secret Key

OPT - Options

Offset : 4

Size : 1

If this register is set, the Reader adds a token to its output to tell the receiver what kind of credential has been read.

Bit    Role Values
7 Shall the Reader keep on trying other Templates if this one succeeds? 0 : Exit the Template loop if the Card has been read by this Template
1 : Continue with the next Template
6-4 RFU
3-2 Position of the Card Type Token 0 : Before the Prefix
1 : After the Prefix, before the Data
2 : After the Data (before the Suffix)
3 : RFU
1-0 Add a Card Type Token to the output stream? 0 : Do not add a Card Type Token
1 : Add Card Type Token in hex (64)
2 : Add Card Type Token as char (U)
3 : RFU

PFX - Prefix

Offset : 2

Size : 8

A Template-specific Prefix, that is added after the Reader’s global Prefix.

Remark : Use \t for a Tab, \n for Enter, \b for Back space, \v for Vertical space.