chariotsolutions / phonegap-nfc

PhoneGap NFC Plugin
MIT License
706 stars 559 forks source link

The tag ID #206

Closed clarklight closed 8 years ago

clarklight commented 8 years ago

I have a quick question about the tag ID.

1.) Is it unique? 2.) Can a user override it(So if someone clone a card?)?

I just want to know if i can rely on it being secure. Or if i would build a unique set of ID myself then lock the card up??

don commented 8 years ago

It depends on the tag type. Mifare Classic 4 byte ids are reused. I think most 7 byte ids on other tags should be unique, but you'd need to check with the tag manufacturer to be sure.

You're not supposed to be able to change the tag id. I've heard of non-conformant tags that let you change the id, but I've never used one.

allannaranjo commented 8 years ago

Even you cannot prevent users from cloning your tag you can store the Id and make sure you store the tag id associated with the content. To encrypt I use an sha256 library. Allan On Oct 8, 2015 10:25 AM, "Don Coleman" notifications@github.com wrote:

It depends on the tag type. Mifare Classic 4 byte ids are reused. I think most 7 byte ids on other tags should be unique, but you'd need to check with the tag manufacturer to be sure.

You're not supposed to be able to change the tag id. I've heard of non-conformant tags that let you change the id, but I've never used one.

— Reply to this email directly or view it on GitHub https://github.com/chariotsolutions/phonegap-nfc/issues/206#issuecomment-146578459 .

clarklight commented 8 years ago

@allannaranjo but if someone use a card emulator and clone the whole thing, and when the server reads it and decrypt it, the replica card would be able to cause action to the db tho. but thanks for the advice anyway.

On NXP documentation they said they have the "anti-cloning" mechanism for the new NTAG 21x family but i am not sure if it is as tough as it says.... if the password protected area can be easily read, and the card id can be cloned with emulator...