Forum › MIFARE general topics and applications › DesfireEV1 Change the Default DES Key (all 0's) to AES › Reply To: DesfireEV1 Change the Default DES Key (all 0's) to AES
Dear User,
What I can see here is that you forget to include the KeyVersion into the data preparation before encryption. When updating a key from 2K3DES or 3K3DES to AES, the 16 bytes long key needs to be concatenated with the key version (which I guess is 00 in your case), the CRC16, and filled up with padding in order to reach a multiple of the blocksize.
The data to encrypt would look like this = 0000000000000000000000000000000000 C8B60000000000, so one more bytes of zeros needs to be added before the CRC16 and the padding.
Afterwards you need to encrypt it and send the command Cmd = C4 || encrypted data.
I hope with including the key version it is working for you.
Best regards,
Sandra
What I can see here is that you forget to include the KeyVersion into the data preparation before encryption. When updating a key from 2K3DES or 3K3DES to AES, the 16 bytes long key needs to be concatenated with the key version (which I guess is 00 in your case), the CRC16, and filled up with padding in order to reach a multiple of the blocksize.
The data to encrypt would look like this = 0000000000000000000000000000000000 C8B60000000000, so one more bytes of zeros needs to be added before the CRC16 and the padding.
Afterwards you need to encrypt it and send the command Cmd = C4 || encrypted data.
I hope with including the key version it is working for you.
Best regards,
Sandra
+ 0
|
- 0