Skip to content

Instantly share code, notes, and snippets.

@joswr1ght
Last active February 24, 2022 20:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joswr1ght/f55599671cd1f244ef24c5bea25fd02d to your computer and use it in GitHub Desktop.
Save joswr1ght/f55599671cd1f244ef24c5bea25fd02d to your computer and use it in GitHub Desktop.
MIFARE DESFire AID Mapping

MIFARE DESFire AID Mapping

Entered here for prosperity and so I don't have to search for this ever again.

The MIFARE DESFire Application Identifier (AID) is a 3-byte value that represents the application ID used for RFID functionality that holds files. This can be a MIFARE Classic AID structure (2 bytes) adapted for use with the expanded MIFARE DESFire AID (3 bytes).

https://www.nxp.com/docs/en/application-note/AN10787.pdf

A 2-byte MIFARE Classic AID adapted to MIFARE DESFire uses a leading nibble of 0xf and a trailing nibble of 0x0 - 0xf. The middle 2 bytes are the MIFARE Classic AID. ex., 0x7009 is the Timelox AB MIFARE Classic AID; 0xf7009x is the adapted AID for MIFARE DESFire.

Annex C of AN10787 shows the cluster code values. The first byte of the MIFARE Classic AID is the cluster code, the 2nd byte is the application code. The MIFARE Classic AID 0x7009 has a cluster code of 0x70 that is associated with hotel use.

It looks as if MIFARE accepts registrations for AIDs, but doesn't openly publish a list other than the cluster code values. An old list of AIDs is leaked at Yumpu and a Wayback archive.

For non-Classic AID use, it's not clear how the first nibble is handled in an AID (e.g., when the first nibble is not 0xf). The 3-byte value is the AID, but is the 2nd and 3rd nibble still the cluster code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment