MIFARE Classic vs DESFire: Developer Comparison
← Back to all smart card and NFC readers
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.
MIFARE Classic vs DESFire at a Glance
| Topic | MIFARE Classic (1K / EV1 1K) | MIFARE DESFire (EV1 / EV2 / EV3) |
|---|---|---|
| Card type | Memory card with fixed sector structure | Microcontroller card with a file system you define |
| Memory layout | 1 KB = 16 sectors × 4 blocks × 16 bytes; last block of each sector is the sector trailer | Card (PICC) level → applications → up to 32 files per application |
| Number of "containers" | 16 sectors on a 1K card, fixed | EV1: up to 28 applications; EV2 and EV3: as many as the memory allows |
| Cipher | Crypto1 (proprietary stream cipher), 48-bit keys | Single DES, 2-key 3DES, 3-key 3DES and AES-128 |
| Keys | Key A and key B per sector, stored in the sector trailer | Card master key; per application up to 14 keys (EV2/EV3: up to 16 key sets) |
| Who holds the key during a read | The reader (loaded with FF 82), then the reader authenticates | Your application or a SAM; the reader passes the exchange through |
| Security status | Crypto1 is publicly broken; NXP points security-relevant uses to DESFire and Plus | Current NXP family; EV2 and EV3 are Common Criteria EAL5+ (NXP) |
| Commands on an ACS reader | PC/SC pseudo-APDUs: FF 82, FF 86, FF B0 | Native DESFire commands wrapped as 90 <cmd> 00 00 …, or ISO 7816-4 |
| Success / error replies | 90 00; 63 00 or 69 82 on failure | 91 00; 91 AF more data; 91 AE authentication error |
| Typical use today | Low-stakes IDs and legacy systems | Access control, transport, closed-loop payment, multi-application cards |
Sources for each row are in the sections below and in Sources.
Memory Model: Sectors and Blocks vs Applications and Files
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 figure | DESFire EV1 | DESFire EV2 | DESFire EV3 |
|---|---|---|---|
| Applications per card | 28 | No limit (memory-bound) | No limit (memory-bound) |
| Files per application | 32 | 32 | 32 |
| Key sets per application | 1 | Up to 16 (rolling) | Up to 16 (rolling) |
| User memory products | 2, 4, 8 KB | 2, 4, 8, 16 KB | 2, 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.
Authentication: Crypto1 vs DES, 3DES and AES
| Aspect | MIFARE Classic | MIFARE DESFire |
|---|---|---|
| Algorithm | Crypto1, a proprietary NXP stream cipher | Single DES, 2-key and 3-key 3DES, AES-128 (all three generations, per NXP's EV3 short data sheet table 1) |
| Key length | 48 bits (6 bytes) | DES 56 bits; 3DES 112/168 bits; AES 128 bits |
| Scope of a key | One sector (key A / key B) | The card (master key) or one application (numbered keys); file access rights refer to key numbers |
| Authenticate command | On ACS readers: FF 86 General Authenticate, with the key already loaded into the reader by FF 82 | Sent 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 authentication | Reads and writes in that sector, as the access bits allow | A session key protects the following commands, according to each file's communication mode |
| Key diversification | Possible in your software, but does not make Crypto1 strong | Standard practice (NXP AN10922): one master key, a different key on every card |
| SAM support | Rare | Common: 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.
Security Status: Why Classic Is Legacy
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.
Command Sets on an ACS Reader
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.
| Task | MIFARE Classic (ACS pseudo-APDU) | MIFARE DESFire (wrapped native) |
|---|---|---|
| Get the UID | FF CA 00 00 00 | FF CA 00 00 00 (random ID may be enabled, see below) |
| Identify the card | ATR: 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 key | FF 82 00 <loc> 06 <6-byte key> (into the reader) | No reader key; the key is used by your software or a SAM |
| Authenticate | FF 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 read | Block number in the read command | SelectApplication 90 5A 00 00 03 <AID> 00 |
| List contents | Not possible: the layout is fixed and the meaning is in your software | GetApplicationIDs 90 6A …, GetFileIDs 90 6F …, GetFileSettings 90 F5 … |
| Read data | FF B0 00 <block> 10 (16 bytes) | ReadData 90 BD 00 00 07 <file> <offset> <length> 00; long replies continue with 91 AF |
| Status | 90 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.
What Changes in Your Code
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 program | With MIFARE Classic | With MIFARE DESFire |
|---|---|---|
| Card detection | Check the ATR card name | Check for an ISO 14443-4 ATR, then GetVersion to confirm DESFire and its generation |
| Addressing | Sector and block numbers | AID, file number, offset and length |
| Key handling | 6-byte keys loaded into the reader's volatile key slots | 16-byte (AES) keys used by your crypto code or held in a SAM; session keys after authentication |
| Crypto code | None 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 command | 16 bytes per block | Any length within the file, sent in frames with 91 AF chaining |
| Counters / balances | Value blocks | Value files, with backup and commit for safe updates |
| UID as identifier | Fixed UID | Fixed 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 handling | 63 00 / 69 82 | 91 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.
Migration Planning: MIFARE Classic to DESFire
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 equivalent | Decision to make |
|---|---|---|
| Card number / employee ID in a data block | Standard data file, read with free or key-protected access | Plain, MACed or fully encrypted communication |
| Balance in a value block | Value file (limits set at creation) | Which key may debit and which may credit |
| Last-use log spread over several blocks | Cyclic record file | Record size and number of records |
| Several systems sharing one card by sector | One application per system, each with its own keys | AID 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.
Which ACS Readers Support Each Card
What ACS lists on each product page (checked 2 Dec 2026). "Listed" means ACS names it; BSD has not yet tested these combinations.
| Reader | MIFARE Classic | MIFARE DESFire | SAM slot | Status |
|---|---|---|---|---|
| ACR1252U | Listed ("MIFARE Classic Card" protocol) | Listed by name ("MIFARE DESFire") | Yes, 1 (ISO 7816 Class A) | Current |
| ACR1552U | Listed ("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 |
| ACR122U | Listed ("MIFARE Classic Card" protocol) | Not named; ISO 14443-4 compliant cards listed | No built-in slot | End-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.
Which Should You Choose?
| Your situation | Choose | Why |
|---|---|---|
| New access control, transport, payment or multi-application card | DESFire EV3 | Standard AES cryptography, file-level access rights, current NXP generation |
| Existing EV2 system adding cards | DESFire EV2 or EV3 | NXP 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 copied | Classic can still do | Cheap and widely supported, but plan to move |
| Stored value or sensitive access on Classic today | Migrate to DESFire | Crypto1 is broken; key changes do not fix it |
| Phone-readable links or labels, no security | Neither | NTAG / 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.
What BSD Still Has to Test
- 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.
Sources
Checked on 2 Dec 2026 unless stated otherwise:
- NXP, MIFARE Classic EV1 1K data sheet MF1S50yyX/V1, rev. 3.2, 23 May 2018, Company Public (memory organisation, CRYPTO1)
- NXP, AN12752 MIFARE DESFire EV3 feature and functionality comparison, rev. 1.4, 24 July 2023, Company Public (tables 1-4 and 7, section 3.2)
- NXP, MIFARE DESFire EV3 product short data sheet MF3D(H)x3, rev. 3.1, 11 January 2024 (table 1, sections 2.1.3 and 2.1.5)
- NXP AN10922 (key diversification) and NXP's MIFARE Classic product page, as cited on the key management page (checked 30 Nov 2026)
- ACS product pages: ACR1252U, ACR1552U, ACR122U (supported cards, protocols, SAM slot, end-of-life notice)
- ACS command details (FF 82, FF 86, FF B0, status words, DESFire wrapping) as summarised from the ACS manuals on BSD's MIFARE Classic and DESFire guides
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.
