MIFARE DESFire EV1, EV2 and EV3: What Changed

6 min read188 courses on OnlySecurity

DESFire is the card most security vendors point to when they say a site should leave MIFARE Classic. It has a real file system, AES authentication and a hardware design built to resist attack. It is not a drop-in cure, because the security depends on how the issuer configures the applications and keys. This guide explains how DESFire is organised, what each generation added and how to inspect a card. Test only cards and systems you own or are authorised to assess.

The structure

A DESFire card holds several separate applications: up to 28 on an EV1, and as many as the memory allows on EV2 and EV3. Each application has its own keys, one card master key sits above them, and an application can hold up to 32 files and up to 14 keys. A reader selects an application by its three-byte identifier, authenticates with one of that application’s keys and can then read or write the files inside it. This means an access control system and a payment scheme can share a card, with neither able to see the other’s data.

Each application holds files of several kinds: standard data files, backup data files, value files, linear record files and cyclic record files, with a sixth type, the transaction MAC file, added in EV2. The card also has a master application level, which holds the card master key and the settings that control whether new applications can be created without that key. Whether an unauthenticated reader can list applications or files depends on those settings.

Tree of a DESFire card: a master application at AID 000000 holding card-wide configuration, and further applications each with up to 14 keys and its own files. File types include, for example, standard, value and record files, and each declares the keys for read, write and change settings plus a plain, maced or encrypted communication mode. hf mfdes lsapp --no-auth can list applications without a key where the card allows; hf mfdes getuid needs authentication.
Structure first: which applications, which keys, which files.

The generations

  1. DESFire (the original, MF3ICD40). Used DES and Triple DES. At CHES 2011 David Oswald and Christof Paar of Ruhr-University Bochum published a non-invasive power analysis attack that recovered the full 112-bit 3DES key of this chip with standard measurement equipment.
  2. DESFire EV1. Added AES-128 alongside DES and 3DES, with 2 KB, 4 KB and 8 KB memory sizes, up to 28 applications and Common Criteria EAL4+ certification. It keeps a backwards compatible mode for the original chip.
  3. DESFire EV2. Common Criteria EAL5+, no fixed limit on applications, a new transaction MAC file that lets the card prove which transactions it processed, multiple key sets per application, shared application management (MIsmartApp), a virtual card architecture and a proximity check that protects against relay attacks.
  4. DESFire EV3. Kept the EV2 features and added a transaction timer and Secure Dynamic Messaging, which mirrors a Secure Unique NFC (SUN) message into the NDEF data so that each tap produces a changing, authenticated value such as a URL.

Check the NXP data sheets for the full feature list of each generation, as the memory sizes and options differ between variants.

Identifying and inspecting a card

hf search
hf mfdes info

hf mfdes info identifies the card as DESFire, reports the version information (the generation, memory size and hardware and software versions) and, where the card allows it, the originality signature, the list of application IDs and the available memory. Then:

hf mfdes getappnames
hf mfdes lsapp

These list the applications on the card, and hf mfdes lsapp --files also lists each application’s files and their settings if the card settings allow it. Depending on the card settings, listing needs the master key or the --no-auth flag. hf mfdes chk -f mfdes_default_keys checks the client’s list of default keys against your own card, and hf mfdes dump dumps the files you can read. hf mfdes read reads a single file.

Security in plain terms

The cryptography is sound. The common failures are in how cards are set up:

  1. Default or weak keys, which hf mfdes chk finds immediately.
  2. The same key on every card, so one recovered key opens them all, rather than keys that are derived from each card’s UID.
  3. Application settings that allow anyone to list or read files.
  4. Relay: a card that works over the air can be relayed to a reader in a different place, unless the system uses the EV2 proximity check or another distance bound.

A well-configured DESFire deployment is strong. A badly configured one can fall to the first default key.

What it can be copied to

A DESFire card with unknown keys cannot be copied. With the keys, an assessor can read the files from your own card and can recreate its applications, files and keys on a blank DESFire card. What cannot be copied is the chip identity: the UID and the NXP originality signature are fixed at manufacture, so a system that derives each card’s keys from its UID, or checks the UID or the signature, rejects the copy. A copy that keeps the original UID needs a device that emulates the DESFire protocol, such as the hf mfdes sim emulator, new in v4.23346. So DESFire resists cloning only when each card has its own keys, ideally derived from its UID, and the system checks the UID or the originality signature; with keys shared across cards, it rests entirely on keeping those keys secret.

Where it is used

Transport schemes, building access, campus and corporate badges and secure ID programmes.

To practise inspecting and testing DESFire cards on a structured path, see MIFARE DESFire Security with the Proxmark. The wider Proxmark3 workflow is covered in Proxmark: RFID Research and Cloning and the RFID and NFC Ultimate Course.

Proxmark3 commands

These commands were checked against Iceman client v4.23346, released September 2026. Run -h on any of them for the options in your own build.

  1. hf mfdes info, hf mfdes getversion and hf mfdes freemem identify the card and its memory.
  2. hf mfdes detect finds the key type and tries a list of keys, and hf mfdes chk checks keys. From v4.23346 hf mfdes chk runs with no arguments and checks every declared key number.
  3. hf mfdes lsapp, hf mfdes getaids, hf mfdes getappnames, hf mfdes lsfiles and hf mfdes getfilesettings map the applications and files.
  4. hf mfdes dump reads all files the supplied keys can read and, from v4.23346, walks the whole card and saves a JSON card image. hf mfdes view, new in v4.23346, shows a saved dump.
  5. hf mfdes sim, hf mfdes eload, hf mfdes esave, hf mfdes eview and hf mfdes etest work with the DESFire EV1 emulator, which is new in v4.23346.
  6. hf mfdes auth, hf mfdes read and hf mfdes write work with keys you hold. hf mfdes formatpicc erases the card, so use it only on a card you own.

Each chip in this guide has its own entry in the RFID and NFC Chip Database: MIFARE DESFire EV1 2K, MIFARE DESFire EV1 4K and MIFARE DESFire EV1 8K.

More in this series

Start with the hub guide, How to Identify an RFID or NFC Card. Related reading: MIFARE Plus and MIFARE Classic.

More from this author