Reply To: DESFire EV1 AES. CMAC is missing from the PICC response?

Forum MIFARE and NFC Reader IC`s DESFire EV1 AES. CMAC is missing from the PICC response? Reply To: DESFire EV1 AES. CMAC is missing from the PICC response?

Re: DESFire EV1 AES. CMAC is missing from the PICC response?

24. January 2017 at 16:24
Reason for my problem:

It turns out that the application 0xAAAAAA has been created with "0" keys.

Therefore the snippet that I wrote above where the CMAC is missing could have been caused by the application being in its original state (DES) so no CMAC.


Start from a formatted DESFire EV1 Card but with application 0 PICC key as AES key version 0x42.

SelectApplication 0
AuthenticateAes key 0
GetKeyVersion R-APDU: 0x42 + CMAC + status
GetFreeMem R-APDU: 0xF80 + CMAC + status
CreateApplication 0x00AAAAAA, settings 0xFF, number of keys 0 R-APDU: CMAC + status
GetApplicationIds R-APDU: 0xAAAAAA + CMAC + status
SelectApplication 0x00AAAAAA R-APDU: status
CreateStdDataFile file 0xf, MDCM_PLAIN, access rights 0xEEEE, file size 64 R-APDU: status + NO CMAC
CreateBackupDataFile file 5, MDCM_PLAIN, access rights 0xEEEE, file size 64 R-APDU: status + NO CMAC
CreateValueFile file 4, MDCM_PLAIN, access rights 0xEEEE R-APDU: status + NO CMAC
CreateLinearRecordFile file 0, MDCM_PLAIN, access rights 0xEEEE R-APDU: status + NO CMAC
GetFileSettings of file number 0xF R-APDU: FileSettings + status NO CMAC
ReadData 50 bytes length, offset 0, R-APDU: 50 bytes of data + status NO CMAC

I can see that I lost the CMAC as soon as I selected the application 0xAAAAAA that has "no key".



+ 0  |  - 0