Reply To: Mifare DesFire Authentication

Forum MIFARE and NFC Reader IC`s Mifare DesFire Authentication Reply To: Mifare DesFire Authentication

Re: Mifare DesFire Authentication

9. February 2022 at 8:19
Please,

I need your help. I have to AES authenticate my DESFire EV1 4K card. Can you tell me should I use the same IV along the three-pass authentication or is it calculated in each step? The problem is in the last step. Decrypted RndA' from the card is not the same as my RndA'. Here are the steps I use:

1. Receive encrypted RndB from the card.
2. Decrypt encrypted RndB (IV - 16 bytes of zeros).
3. Rotate RndB one byte to the left (RndB')
4. Generate RndA
5. Concatenate RndA and RndB'
6. Encrypt concatenated value (IV - still 16 bytes of zeros)
7. The card responds successfully and gives me encrypted RndA'
8. Decrypt encrypted RndA' (IV - still 16 bytes of zeros)
9. Rotate my RndA one byte to the left (RndA')
10. Decrypted RndA' is not equal to my RndA'

Thank you in advance.

Kind regards,
Zeljko
+ 0  |  - 0