Reply To: MIFARE DESFire EV2 – how to encrypt data with custom key

Forum MIFARE general topics and applications MIFARE DESFire EV2 – how to encrypt data with custom key Reply To: MIFARE DESFire EV2 – how to encrypt data with custom key

Re: MIFARE DESFire EV2 – how to encrypt data with custom key

15. June 2020 at 9:01
Hi N0AGI,

You must always take in mind, the user can remove the card from the reader at any time! In a read operation, all what can happen is the operation was not successful and the user must apply the card again. In a write operation you must prohibit to corrupt the file data.

All files except the StandardDataFile, are BackupFiles. This means they have a main and a mirror area. In a write operation you write to the mirror area and with CommitTransaction() the mirror file is the new main area and the previous main is the new mirror area. If the write is interrupted, only the mirror area contains invalid data, but the main area contains the unchanged data. You start a transaction with the command BeginTransaction() and you can cancel it with AbortTransaction().

The cost you have to pay is the file size. A backup file is twice as it is used data size. For files where you only read, you would use a StandardDataFile. It is a good idea to have a feedback for the user. Either a green LED or an acoustical beep can signal the removing of the card from the reader.

The TapLinx team
+ 0  |  - 0