What's the difference between DESFire and DESFire EV1 cards?
contactless-smartcard, fingerprinting, mifare, nfc, smartcard
Solution
MIFARE DESFire EV1 is the followup generation of MIFARE DESFire. DESFire EV1 adds support for new cryptographic algorithms (specifically AES) and improves security of crypto operations against side-channel attacks known for MIFARE DESFire.
You could distinguish the the two versions by sending a GetVersion command (command code 0x60) to the card.
If you are using the native command mode, this would look something like:
READER ---> CARD: 60
CARD <--- READER: AF 04 01 XX XX XX XX 05
READER ---> CARD: AF
CARD <--- READER: AF 04 01 01 HH LL XX 05
READER ---> CARD: AF
CARD <--- READER: 00 XX XX XX XX XX XX XX XX XX XX XX XX XX XX
The byte `HH` contains the major software version, which is 0x00 for DESFire and 0x01 for DESFire EV1.
If you are using a PC/SC reader to communicate with the card, you would probably need to use the DESFire APDU-wrapped native command set instead:
READER ---> CARD: 90 60 00 00 00
CARD <--- READER: 04 01 XX XX XX XX 05 91 AF
READER ---> CARD: 90 AF 00 00 00
CARD <--- READER: 04 01 01 HH LL XX 05 91 AF
READER ---> CARD: 90 AF 00 00 00
CARD <--- READER: XX XX XX XX XX XX XX XX XX XX XX XX XX XX 91 00
Problem
I have a contactless card and I know it is a MIFARE card. I have no document and no authentication key. After a reset, I received the following ATS: ``` myubuntu@lol-MS-7693:~$ nfc-list nfc-list uses libnfc 1.7.1 NFC device: ACS / ACR122U PICC Interface opened 1 ISO14443A passive target(s) found: ISO/IEC 14443A (106 kbps) target: ATQA (SENS_RES): 03 44 UID (NFCID1): 04 8c 4c 92 e9 48 80 SAK (SEL_RES): 20 ATS: 75 77 81 02 80 ``` After searching above ATS in google, I found the following info here: So, my card is either a DESFire card or a DESFire EV1 card. The question is, how can I detect which of the two my card is precisely?