Reputation: 21
I came across this discussion Get Static NFC Tag Id with HCE mode and I have some questions on how NFC technology works in card emulation mode on smartphones, particularly when it comes to unlocking doors.
How do iPhone devices differ from Samsung devices in this regard? The phone models I am mostly interested in are iPhone 13, Samsung Galaxy S21 and Samsung Galaxy A32.
Upvotes: 2
Views: 11813
Reputation: 10232
First off a NFC UID is not designed to be Unique or have any level of security attached to it. It just has to be likely to be different when multiple Tags are in range.
Thus a lot of phones now generate a random UID as a security feature to prevent it's use in tracking phones.
Some Tag types have a programmable UID's or where not normally programmable there are clones available with programmable UID's
So forget about using UID's for a door lock.
But to try and answer your questions
There re companies like Passkit that have commercial solutions that work with the built in software.
But as a normal developer on iPhone you don't have access to this on Android it allows you to emulate the behaviour of a Type 4 Tag (you need and app to provide this functionality and install the service but it does not need the app to be running for it to work).
UID is not something the secure element usually does and the UID is mostly dynamically generated. The secure element most handles emulation of AID's (Application ID's) of Type 4 Tags.
UID's are mostly randomly generated as explained before.
Mostly UID's are unimportant to Tag emulation, therefore you can emulate more than one Type 4 Tag (having Tags with the same AID is more difficult but you are less likely to have that)
If the data is freely readable or it has the necessary password and or decryption keys then yes it can read a tag and copy the data. And emulate it if it is a Type 4 Tag. (Not all Tags are Type 4)
Lots of security measures need to be added and it is quite difficult/impossible to actually make a secure NFC door lock. (yes you can make it more difficult to hack but never impossible, there are too many ways like "man in the middle" type attacks, custom hardware, even rooted Android phones)
You can also reverse your thinking and it's the door lock that emulates the Tag and the phone just needs be a NFC reader/writer which all NFC enabled phones can do.
Or more common is to use bluetooth in the door lock as that is more ubiquitous in phones.
Upvotes: 2