Reply To: KeyA and KeyB and how to protect the contacless card from cloning?

Forum MIFARE general topics and applications KeyA and KeyB and how to protect the contacless card from cloning? Reply To: KeyA and KeyB and how to protect the contacless card from cloning?

Re: KeyA and KeyB and how to protect the contacless card from cloning?

23. February 2016 at 9:02
Hi NTMS,

Three remarks from my side:

  • As you can see in the screenshots, I started a new sequence after the keys has changed. This mean you should remove the card and tap again to the reader. After a successful authenticate the reader may use a session key for the following transactions. If you tap and authenticate again, a new session is created with new internal key settings (this may implemented inside of the reader driver).

  • I would test the personalizing with a Shell and send the APDU commands directly to the card. You can do it with a contactless reader with USB directly with your PC. You can use the GPShell for your first steps. If everything works, you program it into your application.

  • Basically you should always use as less commands for communicating to the card as possible. You have to deal always with the “tear down” situation. This means the user remove the card early from the reader and some operations are not ready. This is critical for write operations. As developer you can use a beep to sign to the user he can remove the card now and you can use value data blocks.


Good luck for your next MIFARE applications.
The MIFARE Team
+ 0  |  - 0