A
A
Alexander Pankov2014-01-12 13:04:21
NFC
Alexander Pankov, 2014-01-12 13:04:21

NFC Programming

Hello. I want to implement something like this. I know that this is not advisable and no one needs it - I just want to know if this is possible at all and if possible, how is it better?
The point is that the Computer, or rather the OS, at startup would ask the user not to enter a password, but to provide, for example, his phone, which has NFC.
In total, we have a computer, we have an NFC-Reader connected to it.
That is, it is necessary to write an application that, before loading the main system, will forgive such authentication ... (like a USB key, but only a phone that is always with you and you don’t have to stick and enter anything anywhere, NFC).
So how is this supposed to happen?
1) Let's take java as an example (although it's probably not possible to launch a java application in the user's choice window, or am I wrong?). So, I found the API . In my opinion, java works great with smart cards (it seems to be the same as NFC). When the user puts his phone on the NFC-reader, the listener in the program is triggered, handles the event and grants the user access or privileges, well, it doesn’t matter.
2) NFC means data exchange. What is the main question? A phone with NFC what data and how and can it send to the NFC-Reader at all, and is it possible to read them from there? For example, with NFC tags, the phone reads, but does not send data to the NFC tag. By data, I mean at least some small line, for example, the SN or MAC of a phone, which uniquely identifies the owner in the computer system. For example, there is a database, the string received via the NFC channel by the application will be sent to the database, processed somehow and the application receives a response with instructions on what to do, the user sees the result on the screen (went out - welcome).
Thanks in advance for your reply.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Spetros, 2014-01-12
@Spetros

The implementation of such a thing is possible, logging in using NFC is essentially no different than logging in with other tokens. There is plenty of information about them on the Internet.
I am answering your "main question", because The title covers quite a wide area of ​​knowledge.
To solve your problem, you plan to use two active devices: an NFC reader and a phone with an NFC module, respectively, you can organize a point-to-point connection between them.
This means that you can organize a bidirectional exchange of any data and even implement your own device authentication protocol.
To do this, you need to write two applications: one for a PC, the second for a phone. How they interact is up to you.
PS On the first point, look for information about PC / SC - this is a more correct direction.
PPS In the case when "the phone reads from the NFC tag" the data is still sent. there may be several labels and you need to select one of them, or, for example, authentication is required to access data on the label (for example, BSC on transport)

E
elsin16, 2014-04-03
@elsin16

nfc-tools.org/index.php?title=Pam_nfc
It should help you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question