How can I prevent (overwriting or format or cloning anything else) my NFC TAG?

1.4k views Asked by At

First, sorry for my poor English.

I created an application that can read and write NFC tags. I want to ensure the tag is not copied or overwritten by another application or format.

I found an application called "NFC Tools" which has "Set password" and "Remove password" features. When the "Set password" password has been set, if you try to write in other applications, they throw an IOException. If you turn off the password using the function called "Remove password", then you can write to it.

So I have to implement this feature in my application, I would like to get what I want. However, I could not find the sample source.

Web links and example source or another way or recommend anything. Thank you.

1

There are 1 answers

0
jlbofh On

Ok what i know is:

  1. The way to prevent overwrite or format the tag is method makeReadOnly() but, as you know, you can't modify the tag later. Mifare cards can "lock" a sector but actually only old smartphones are able to manipulate Mifare RFID (Classic or Ultralight) cards, (only can read the card ID).

  2. Prevent duplication isn't possible but you will be able to detect duplicates in conjuntion with your reader application using for example some kind of checksum, encryption or sign method that includes the card ID and if the tag type you use hasn't a writable ID (You can get Mifare classic card with writable ID).