0
votes

I have a smart card that contains a Mifare Desfire EV1 contactless chip, and I am trying to send an authentication request with masterkey to the contactless part (Mifare Desfire), so I am sending this command :

 -- Auth Req with Master key
         >>> cmd  = 90 AA 00 00 01 00 00
         <<< data =
         <<< sw   = 68 84

I don't know why I am getting this error code, it seems that the command was send to contat ship ?

Can you help me please to figure out what's the problem ? is there any step before to "activate" to contactless part ?

BtW : I tried with those readers : Omnikey5321v2 and ACR122U-A9

Thank you!

1

1 Answers

0
votes

I'm not sure what the response status you are getting (SW = 0x68 84) actually means. However, it seems that you are missing the LE byte in your command.

Wrapping of native MIFARE DESFire EV1 APDUs:

CLA    | INS     | P1    | P2    | LC        | Data        | LE
0x90     MIFARE    0x00    0x00    Length of   MIFARE        0x00
         DESFire                   wrapped     DESFire EV1
         EV1 CMD                   data        command
         Code                                  parameter(s)

Like P1 & P2, the LE byte should be always present and set to 0x00, and any other values are not allowed.

So your authentication command should actually be:

cmd  = 90 AA 00 00 01 00 00 00