Desfire EV1 file Write Error

Forum / MIFARE general topics and applications / Desfire EV1 file Write Error

  • 22. April 2017 at 10:22
    I need to know how to Write to a file in Desfire EV1.
    It happened that the access rights of the file created was 217F.
    There is no problem for me to read the file when the communication mode of the file is plain or maced.
    But i can't write even when the communication settings is MACed.We had posted this problem earlier.

    but according to the reply
    we started testing with MACed file.
    I can confirm my CMAC calculation algorithm and Session Key calculation,Authentication process are correct since i have verified it using
    Crypto Test Tool by (abu.ismail@nxp.com)
    Here are the steps i do.
    1.Select Application.
    2.Authenticate with Key No dedicated for Read&Write Access(Key 7) KEY 7 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00(default key).
    3.Assemble Session Key from RandA and Rand B. Session Key- EBA8CA3974B4033B(8bytes since using SingleDES)
    4.Generate Subkeys for CMAC.
    5.Process command 3D 00 00 00 00 02 00 00 68 67 to write "h","g" as data (Write 2bytes to file 00 which expects Maced communication).
    6.Generate CMAC 3A E4 67 3E E6 A7 17 7A for the above command.
    7.Append CMAC after the above command and send to CARD.{3D 00 00 00 00 02 00 00 68 67 3A E4 67 3E E6 A7 17 7A}
    8.The response i receive is AE (Authentication Error).
    Expecting a reply with detailed explanation on Write process.
    + 0  |  - 0

    Re: Desfire EV1 file Write Error

    22. April 2017 at 10:27
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.