When sending the FormatPICC command to a MIFARE DESFire EV1 card, I observe the following behavior:
PCD ---> PICC -------------- 0xFC ---> <--- 0x00 or 0x00 + MAC or ERROR CODE
- If authenticated with the command 0x0A (legacy (3)DES authentication), the response to the FormatPICC command is only one byte (0x00).
- If authenticated with the command 0xAA (AES authentication), the response to the FormatPICC command is the status byte (0x00) plus the MAC.
When I send another command (e.g. GetVersion (0x60)), the response does not contain the MAC regardless of which authentication was used (0x0A or 0xAA).
Why is that difference? Should I still calculate the MAC for such commands (to update crypto state)? Is there some document that explains that?