DESFire Command Set
MIFARE DESFire command names, command codes, and which generation supports each — EV1, EV2, and EV3. Search by command or code, or filter by class. Native application-layer commands and their ISO 7816-4 wrapped equivalents are both listed.
How to read this
DESFire exposes a native application-layer command set on top of ISO/IEC 14443-4. Each command has a one-byte code. The EV1 / EV2 / EV3 columns show whether a command exists on that generation — Yes, No, or Yes with a noted behavioural difference. A handful of commands gained their first support in EV2 (delegated applications, multiple key sets, Transaction MAC, Proximity Check), and EV3 mostly refines existing commands rather than adding many new ones.
Where two codes are shown (for example 0xBD / 0xAD), the command has more than one documented opcode form. The ISO 7816-4 class lists the standards-wrapped equivalents (SELECT, READ BINARY, READ RECORD, INTERNAL / EXTERNAL AUTHENTICATE) that let a DESFire card be driven by a generic ISO 7816-4 stack. This is an architecture-level interface reference: byte-level framing, secure-messaging payloads, and exploit-relevant detail are intentionally out of scope.
Command classes
The command table above is grouped by functional class. Filtering by class is the fastest way to answer “what can I do at this point in the session?” — because DESFire gates most commands behind authentication state and per-file access rights.
- Security & authentication — AuthenticateISO, AuthenticateAES, and the EV2 AuthenticateEV2First / EV2NonFirst handshakes that open a secure-messaging session, plus ChangeKey, ChangeKeySettings, and GetKeyVersion. These establish the session keys that authorise everything else.
- PICC & application management — CreateApplication, DeleteApplication, SelectApplication, GetApplicationIDs, GetVersion, and FormatPICC. EV2 adds delegated applications and multiple key sets at this layer.
- File management — the Create*File family (standard-data, backup-data, value, linear-record, cyclic-record), GetFileIDs, GetFileSettings, and ChangeFileSettings. File settings carry the access-rights nibbles that decide which key may read, write, or change a file.
- Data manipulation — ReadData / WriteData, the value-file operations GetValue, Credit, Debit, and LimitedCredit, the record operations ReadRecords / WriteRecord / ClearRecordFile, and the transaction boundary CommitTransaction / AbortTransaction. Value and backup files only become durable once the transaction is committed.
- ISO 7816-4 wrapped — the standards-mode equivalents (ISOSelectFile, ISOReadBinary, ISOReadRecords, ISOUpdateBinary, ISOInternalAuthenticate) that let a generic ISO 7816-4 middleware stack drive a DESFire card without speaking the native protocol.
If you are bringing up a reader, a transit validator, or a personalisation script, this reference answers three practical questions quickly: does the command exist on the generation you are targeting, what is its one-byte code, and which functional class (and therefore which authentication state) it belongs to. For the response side of each exchange, pair it with the DESFire status decoder; for file access-rights bytes, the access-rights decoder; and for generation-level context, DESFire EV1/EV2/EV3 architecture and the generation-differences write-up.
About this reference
Source
Summarised from public NXP MIFARE DESFire EV1 / EV2 / EV3 datasheets. Command names and codes are factual interface data; difference notes are our own wording.
Companion tools
DESFire status decoder · File settings parser · Access-rights decoder
Related reference
Frequently asked questions
What is the difference between native and ISO-wrapped commands?
Native DESFire commands are a compact one-byte code with their own status byte. ISO 7816-4 wrapped commands carry the same operation inside a standard APDU with SW1/SW2, which is what most reader stacks send.
Why do commands differ across EV1, EV2 and EV3?
Later generations added capability rather than replacing it. EV2 introduced transaction MAC, delegated application management and proximity checking; EV3 extended again. EV1 commands generally still work.
What does status 0xAF mean mid-command?
Additional frame: the exchange is incomplete and the card expects a continuation. It is a normal part of multi-frame commands, not an error.
Which commands need an authenticated session?
Anything the file or application access rights restrict. Authentication state resets when you select a different application, so it must be re-established each time.
What is the practical command sequence?
Select the application, authenticate with the appropriate key, then read or write files. Most integration failures are a missing or mis-ordered step in that sequence.