Topic: Changing a AES key...
I'm working on DESFire EV1. After authentication, I want to change a AES key of card but I receive a code error 0x1e (CRC or MAC does not match data Padding bytes not valid).
The data I sent to card as follows:
CRC32_1 over: Cmd + Key No + (New Key ^ Old Key) + New Key Version
CRC32_2 over: New Key
AES ( New Key + New Key Version + CRC32_1 + CRC32_2 + 7 bytes zero(padding))
Send: Cmd + Key No + encrypted AES data
P.s: I use AES CBC mode.