MIFARE Classic vs DESFire: Developer Comparison

What is the difference between MIFARE Classic and MIFARE DESFire for a developer? MIFARE Classic is a memory card: fixed sectors of 16-byte blocks, each sector locked by two 48-bit keys and NXP's proprietary Crypto1 cipher, which is publicly known to be broken. On an ACS reader you load a key into the reader and read blocks with the pseudo-APDUs FF 82, FF 86 and FF B0. MIFARE DESFire (EV1, EV2, EV3) is a microcontroller card: you create applications that hold files, protected by DES, 3DES or AES keys, and you talk to the card itself with native DESFire commands wrapped in ISO 7816-4 APDUs (90 xx 00 00 …). For anything new that protects money, access or personal data, choose DESFire EV3 (or EV2); keep Classic only for low-stakes identifiers, and plan the migration.

This page is the side-by-side developer view: memory model, authentication, security status, command sets, what changes in your code, how to plan a move from Classic to DESFire, and which ACS readers handle each card. DESFire facts come only from NXP documents marked "Company Public"; MIFARE Classic facts from NXP's public MIFARE Classic EV1 1K data sheet; ACS facts from the ACS product pages (checked 2 Dec 2026). Want to buy cards rather than compare them? See MIFARE cards.

Not yet tested by BSD. This is a reference comparison built from NXP and ACS documents. BSD will run the read-only Classic and DESFire tests listed below on its ACR1252U, ACR1552U and ACR122U and add the results here.

TopicMIFARE Classic (1K / EV1 1K)MIFARE DESFire (EV1 / EV2 / EV3)
Card typeMemory card with fixed sector structureMicrocontroller card with a file system you define
Memory layout1 KB = 16 sectors × 4 blocks × 16 bytes; last block of each sector is the sector trailerCard (PICC) level → applications → up to 32 files per application
Number of "containers"16 sectors on a 1K card, fixedEV1: up to 28 applications; EV2 and EV3: as many as the memory allows
CipherCrypto1 (proprietary stream cipher), 48-bit keysSingle DES, 2-key 3DES, 3-key 3DES and AES-128
KeysKey A and key B per sector, stored in the sector trailerCard master key; per application up to 14 keys (EV2/EV3: up to 16 key sets)
Who holds the key during a readThe reader (loaded with FF 82), then the reader authenticatesYour application or a SAM; the reader passes the exchange through
Security statusCrypto1 is publicly broken; NXP points security-relevant uses to DESFire and PlusCurrent NXP family; EV2 and EV3 are Common Criteria EAL5+ (NXP)
Commands on an ACS readerPC/SC pseudo-APDUs: FF 82, FF 86, FF B0Native DESFire commands wrapped as 90 <cmd> 00 00 …, or ISO 7816-4
Success / error replies90 00; 63 00 or 69 82 on failure91 00; 91 AF more data; 91 AE authentication error
Typical use todayLow-stakes IDs and legacy systemsAccess control, transport, closed-loop payment, multi-application cards

Sources for each row are in the sections below and in Sources.

MIFARE Classic: a fixed grid

NXP's MIFARE Classic EV1 1K data sheet describes 1 KB of EEPROM organised as 16 sectors of 4 blocks, each block 16 bytes. The fourth block of every sector is the sector trailer: key A, the access bits and key B. Block 0 holds the manufacturer data. Everything else is yours, but only in 16-byte blocks and only inside the sector your key opens. A 4K card has more sectors and larger sectors in its upper half; BSD's MIFARE test guide covers the 4K differences.

Your application decides what each block means (for example "sector 1, block 4 = employee number"). The card knows nothing about that meaning. The block-by-block layout and the trailer are explained in How to read MIFARE Classic cards in C#.

MIFARE DESFire: a small file system

DESFire has three levels. The card (PICC) level holds the card master key and the list of applications. Each application has a 3-byte application ID (AID), its own keys and up to 32 files. NXP's EV3 short data sheet lists six file types: standard data, backup data, value, linear record, cyclic record and transaction MAC. Each file has its own access rights (which key may read, write, read-and-write or change settings) and a communication mode: plain, MACed or fully encrypted.

NXP figureDESFire EV1DESFire EV2DESFire EV3
Applications per card28No limit (memory-bound)No limit (memory-bound)
Files per application323232
Key sets per application1Up to 16 (rolling)Up to 16 (rolling)
User memory products2, 4, 8 KB2, 4, 8, 16 KB2, 4, 8, 16 KB

From NXP AN12752 rev. 1.4 (tables 3 and 4, section 3.2) and the MIFARE DESFire EV3 short data sheet rev. 3.1 (table 1). Exact usable bytes per product are in AN12752 table 4.

The practical difference: on Classic you find data by sector and block number; on DESFire you select an application, then read a file by file number, offset and length. A DESFire card fresh from the factory has no applications at all, so someone has to create the application, files and keys before the card is issued. That step is part of any migration (see migration planning). How a DESFire card is read step by step is covered in How to read MIFARE DESFire cards.

AspectMIFARE ClassicMIFARE DESFire
AlgorithmCrypto1, a proprietary NXP stream cipherSingle DES, 2-key and 3-key 3DES, AES-128 (all three generations, per NXP's EV3 short data sheet table 1)
Key length48 bits (6 bytes)DES 56 bits; 3DES 112/168 bits; AES 128 bits
Scope of a keyOne sector (key A / key B)The card (master key) or one application (numbered keys); file access rights refer to key numbers
Authenticate commandOn ACS readers: FF 86 General Authenticate, with the key already loaded into the reader by FF 82Sent to the card: 0A (DES/3DES), 1A (ISO), AA (AES) on EV1 and later; 71/77 AuthenticateEV2First/NonFirst on EV2 and EV3 (NXP AN12752 table 2)
After authenticationReads and writes in that sector, as the access bits allowA session key protects the following commands, according to each file's communication mode
Key diversificationPossible in your software, but does not make Crypto1 strongStandard practice (NXP AN10922): one master key, a different key on every card
SAM supportRareCommon: keys stay in a SAM in the reader's SAM slot

For Classic, how key A, key B and the access bits work is on MIFARE authentication and key management. For DESFire, the authentication commands are explained conceptually on DESFire APDU commands. Neither page, and not this one, gives key-recovery help: BSD works only with factory default keys on its own test cards, or with keys the card issuer provides.

Default keys. A new MIFARE Classic card ships with NXP's documented transport keys, which must be changed before a card goes into service. For DESFire EV1, EV2 and EV3 the delivery value of the card master key is in NXP's NDA data sheet, so BSD does not state it; whatever it is, it must be replaced during personalisation.

MIFARE Classic's Crypto1 cipher is publicly known to be broken. Academic researchers have published weaknesses in the cipher and its implementation since 2008, and NXP itself refers customers who need security-relevant applications to the MIFARE DESFire and MIFARE Plus families. In practice this means a determined attacker can read or copy Classic data without knowing your keys, so changing keys or diversifying them does not make Classic safe for stored value or sensitive access. BSD does not describe attack methods or tools; the background and NXP's position are summarised on MIFARE Classic security and migration.

MIFARE DESFire uses standard, public algorithms. NXP lists Common Criteria EAL5+ (hardware and software) for DESFire EV2 and EV3, and EAL4+ for EV1. DESFire EV2 added multiple key sets, transaction MAC files and new secure messaging; EV3 added Secure Dynamic Messaging, a transaction timer and other features (NXP AN12752 table 1). A DESFire system is still only as strong as its key management: keys left at delivery values, one key on every card, or keys stored inside client software weaken it badly.

Where Classic is still acceptable: as a card number for low-stakes uses (a library card, a canteen ID checked against a server database) where a copied card causes little loss. Where it is not: stored value on the card, access to sensitive areas, or anything where the card itself is the proof.

Both card types are reached through the same Windows PC/SC calls (SCardConnect, SCardTransmit), but the bytes you send are completely different. MIFARE Classic has no APDU interface of its own, so ACS readers translate PC/SC "pseudo-APDUs" (class FF) into Classic commands. DESFire is an ISO 14443-4 card, so the reader passes your APDUs straight through to the card.

TaskMIFARE Classic (ACS pseudo-APDU)MIFARE DESFire (wrapped native)
Get the UIDFF CA 00 00 00FF CA 00 00 00 (random ID may be enabled, see below)
Identify the cardATR: PC/SC storage-card ATR with card name 00 01 (1K) or 00 02 (4K)ATR: ISO 14443-4 ATR (3B 8n 80 01 …), then GetVersion 90 60 00 00 00
Load a keyFF 82 00 <loc> 06 <6-byte key> (into the reader)No reader key; the key is used by your software or a SAM
AuthenticateFF 86 00 00 05 01 00 <block> 60|61 <loc>Authenticate commands 0A / 1A / AA / 71 to the card, with several exchanges
Choose where to readBlock number in the read commandSelectApplication 90 5A 00 00 03 <AID> 00
List contentsNot possible: the layout is fixed and the meaning is in your softwareGetApplicationIDs 90 6A …, GetFileIDs 90 6F …, GetFileSettings 90 F5 …
Read dataFF B0 00 <block> 10 (16 bytes)ReadData 90 BD 00 00 07 <file> <offset> <length> 00; long replies continue with 91 AF
Status90 00 OK; 63 00 failed (ACS); 69 82 (PC/SC Part 3)91 00 OK; 91 AF more frames; 91 AE authentication error; 91 9D permission denied

The Classic sequence, its byte meanings and a compiled C# program are on How to read MIFARE Classic cards in C#. The full DESFire command list with EV1/EV2/EV3 support is on DESFire APDU commands, and wrapping (native vs ISO-wrapped) is explained in its framing section. ACS's class FF pseudo-APDUs in general are covered in How to send APDU commands.

Errors look different too. A Classic read that fails usually means the wrong key or the wrong sector: see MIFARE authentication failed. A DESFire exchange that fails can fail at the PC/SC layer, the ISO 14443-4 layer or the DESFire status byte: see DESFire communication errors.

Moving an application from Classic to DESFire is not a change of a few command bytes. These are the parts that change, with the reason:

Part of your programWith MIFARE ClassicWith MIFARE DESFire
Card detectionCheck the ATR card nameCheck for an ISO 14443-4 ATR, then GetVersion to confirm DESFire and its generation
AddressingSector and block numbersAID, file number, offset and length
Key handling6-byte keys loaded into the reader's volatile key slots16-byte (AES) keys used by your crypto code or held in a SAM; session keys after authentication
Crypto codeNone in your program (the reader does Crypto1)Mutual authentication and, for MACed or encrypted files, MAC/encryption in your code, an NXP library or a SAM
Data size per command16 bytes per blockAny length within the file, sent in frames with 91 AF chaining
Counters / balancesValue blocksValue files, with backup and commit for safe updates
UID as identifierFixed UIDFixed by default, but DESFire supports a random ID: if the issuer enables it, the UID changes on every tap and is useless as a card number. Read a card number from a file instead.
Error handling63 00 / 69 8291 xx codes plus ISO 14443-4 errors (91 AE, 91 9D, 91 AF chain)

A working read-only starting point for each card exists on BSD's site: the MIFARE Classic C# program and the DESFire C# program (both .NET 10, compiled by BSD, not yet tested on a reader). They share the same PC/SC wrapper, so a dual-card application can route by card type after the ATR check.

The five-step outline is on the key management page. This is the developer's planning checklist behind it.

1. Inventory

  • Every sector and block in use, what it stores, and who writes it (issuing desk, top-up point, terminal).
  • Every reader and terminal, its model and firmware. ACR122U readers are end-of-life at ACS, so a migration is a good moment to replace them (see reader support).
  • Whether the system trusts the UID alone. If it does, decide now where the card number will live on DESFire.

2. Map Classic data to DESFire files

Classic data (example)DESFire equivalentDecision to make
Card number / employee ID in a data blockStandard data file, read with free or key-protected accessPlain, MACed or fully encrypted communication
Balance in a value blockValue file (limits set at creation)Which key may debit and which may credit
Last-use log spread over several blocksCyclic record fileRecord size and number of records
Several systems sharing one card by sectorOne application per system, each with its own keysAID allocation; EV2/EV3 delegated application management if a third party adds applications later

3. Design keys before writing code

  • Use AES keys, diversified per card from a master key (NXP AN10922; see key diversification).
  • Decide where master keys live: a SAM in the reader's SAM slot, or a server or HSM. Never in the client program or a config file (see key storage and the SAM slot guide).
  • Separate test keys from production keys from day one.

4. Build dual-card software

  • Detect the card type from the ATR and route to the Classic or DESFire code path.
  • Keep the business logic (who is this card, is it allowed) independent of the card type, so the Classic path can be removed later without touching it.
  • Test both paths on every reader model in the field.

5. Personalise and issue DESFire cards

  • Personalisation (create the application and files, set access rights, replace delivery keys) is done once per card at a controlled issuing station. It changes the card permanently, so script it, test it on spare cards and log it. BSD's public guides stay read-only and do not cover it; BSD can build it as a project (see below).
  • Issue DESFire to new users and as replacements first.

6. Run in parallel, then retire Classic

  • Set a cut-off date, then disable the Classic path in the terminals and stop accepting Classic cards.

Discuss a Classic-to-DESFire Migration

What ACS lists on each product page (checked 2 Dec 2026). "Listed" means ACS names it; BSD has not yet tested these combinations.

ReaderMIFARE ClassicMIFARE DESFireSAM slotStatus
ACR1252UListed ("MIFARE Classic Card" protocol)Listed by name ("MIFARE DESFire")Yes, 1 (ISO 7816 Class A)Current
ACR1552UListed ("MIFARE Classic Card" protocol)Not named; ACS lists ISO 14443-4 compliant cards, which DESFire is (see ACR1552U and DESFire)Yes, 1 (ISO 7816 Class A)Current
ACR122UListed ("MIFARE Classic Card" protocol)Not named; ISO 14443-4 compliant cards listedNo built-in slotEnd-of-life at ACS

All three read both card types through PC/SC, so they suit a dual-card migration period. For a new DESFire system with keys in a SAM, the ACR1252U or ACR1552U is the practical choice; compare them on ACR1552U vs ACR1252U, or see how to choose an ACS NFC reader.

BSD utilities: BSD's Default Key reader utilities read MIFARE Classic with the factory key only, and DESFire with keys left at factory settings; they cannot change keys. Card identity is free; reading and writing data needs a BSD licence key. Get the ACR1252U utility or the ACR1552U utility.

Your situationChooseWhy
New access control, transport, payment or multi-application cardDESFire EV3Standard AES cryptography, file-level access rights, current NXP generation
Existing EV2 system adding cardsDESFire EV2 or EV3NXP describes EV3 as the latest addition to the family; check your software supports it before switching
Simple ID checked against a server, low loss if copiedClassic can still doCheap and widely supported, but plan to move
Stored value or sensitive access on Classic todayMigrate to DESFireCrypto1 is broken; key changes do not fix it
Phone-readable links or labels, no securityNeitherNTAG / Ultralight tags; see writing NDEF to NTAG

For card prices and quantities, see MIFARE cards. BSD supplies MIFARE Classic, DESFire, Ultralight and Plus cards and the ACS readers above.

  • The ATR of a MIFARE Classic 1K card and of a DESFire card on the ACR1252U, ACR1552U and ACR122U (Windows 11), to confirm the detection rule above.
  • The Classic read sequence (factory key, own test card) and the DESFire GetVersion and free-read sequence on the same three readers.
  • Running both read-only C# programs one after the other with both cards, as a dual-card check.

Checked on 2 Dec 2026 unless stated otherwise:

BSD Infotech is an independent ACS supplier and integrator, not the manufacturer. ACS, the ACS logo and ACS product names belong to Advanced Card Systems Ltd. MIFARE, MIFARE Classic, MIFARE DESFire, MIFARE Plus, MIFARE Ultralight and NTAG are trademarks of NXP B.V.

Planning a move from MIFARE Classic to DESFire?

Tell us your cards, readers and software. BSD Infotech supplies ACS readers and MIFARE cards and builds the software for both.