Reply To: the problem with ChangeKey at DesFire EV1

Forum MIFARE SmartCard IC`s MIFARE DESFire the problem with ChangeKey at DesFire EV1 Reply To: the problem with ChangeKey at DesFire EV1

Re: the problem with ChangeKey at DesFire EV1

12. October 2016 at 6:01
oh God,I wrote a lot of content has disappeared.
here is my detail completly:

Authenticate : (with key number 0x00)

to PICC :0A 00
from PICC:AF 63 C5 4D CF 6F 3A 6F C9
to PICC :AF 49 1E 89 0D E9 AC E9 32 9C 5C 6D 55 D9 FA 36 D7
from PICC:00 B7 D1 DA 7C E0 DD 98 6B

I'm success in Authenticate, and get SessionKey 00 01 02 03 f6 b0 33 39(for easy to read the Key I set the RndA = 00 01 02 03 04 05 06 07).

next I send the ChangeKetSettings, set the keySetting to 0x0f. I get the CRC of 0x0f is 0x09,0xa9, so my SendData is 0f 09 a9 00 00 00 00 00
then i do DECRYPT with SendData , the result is cb 64 3f d0 30 e6 87 da

to PICC :54 CB 64 3F D0 30 E6 87 DA
from PICC:00

success! so is My Des code and CRC code are Correct ?

next i send the ChangeKey, I want to change the key 00 (master key), and I Authenticated with key 00 successful, so according to the document I need to send 16Byte New Key + 2Byte CRC + 6Byte 0x00
New Key = 11 22 33 44 55 66 77 88 11 22 33 44 55 66 77 88
Get the CRC = F 02
so SendData = 11 22 33 44 55 66 77 88 11 22 33 44 55 66 77 88 BF 02 00 00 00 00 00 00
then i do DECRYPT with SendData , the result = ce 27 61 0e 8c 09 01 39 df 05 52 4a d9 6f 76 b1 9a 18 52 e9 12 68 12 e3

to PICC :c4 00 ce 27 61 0e 8c 09 01 39 df 05 52 4a d9 6f 76 b1 9a 18 52 e9 12 68 12 e3
from PICC:1E

+ 0  |  - 0