Reply To: MIFARE Changing Keys

Forum MIFARE and NFC Reader IC`s MIFARE Changing Keys Reply To: MIFARE Changing Keys

Re: MIFARE Changing Keys

22. May 2020 at 14:42
Hi Nigel,

The general procedure of changing a key on a MIFARE DESFire EV1 is:

  1. Get the key version
    If you use several key versions you must know which key version is used with the current card. GetKeyVersion can be executed without authentication. In case you use always version 0, you can skip this.


  2. Authenticate to the key number you want to change.
    The authentication uses encrypted blocks. It is not easy to implement this “by hand”. I recommend to read the AN:
    AN0945 MIFARE DESFire EV1 - Features and Hints


  3. Change the key value.
    You can only change the value of the key but not the cipher. There is one exception: for the PICC Master Key you can also change the cipher. Same recommendation as above, the encrypted data blocks uses CRC and CMAC which requires the datasheet and the AN0945.


If it is an option for you, the implementation with TapLinx SDK is quite easier. All the encrypted communication is handled inside of TapLinx. This makes the communication straight forward for you. TapLinx SDK is available for Android and as Java SDK for desktop systems.

If TapLinx is not an option, you must implement the cipher by yourself. You should use urgently the datasheet and the mentioned AN.

The TapLinx team
+ 0  |  - 0