Lets say I'm using NFC cards for access control. NFC cards/stickers are easily readable and writable, so my worry is that the data on them could easily be cloned onto another card/sticker and bypass the security.
My idea to detect cloning is to include 2 pieces of info on each card:
- User Id
- Random value
So lets say the following happens:
- User A's card is cloned by user B, so now user B also has a card with that data
- When user A enters, a new random value is generated and saved both on the card and in the backend. This random value must be presented in the next access attempt.
- User B tries to enter with his cloned card containing user A's "User Id", but has an incorrect "Random value", so he is not allowed to enter.
Does this seem like a good way to fix this issue? Are there other ways?