ID for NFC devices in NFC P2P communication - nfc

I would like to know whether NFC P2P requires something like a MAC address that needs to be configured to be used for identification while creating a link layer connection or maybe even at transport layer connection.
I could see some details in specifications (ISO/IEC 18092) related to IDs being random values that are generated and maintained (per connection) for link layer connections.
I would be thankful if someone can please advice me on where can I find more details on the same or provide some light into how NFC devices are uniquely identified in P2P communications.

NFC P2P does not require a MAC address or comparable mechanism to address a communication partner on the network. It is purely a one-to-one network and the communication partner is uniquely given by this association. A scenario where communication would only be possible with selected peers is not foreseen on the link level, the link is intended to work with any peer. Device identifications must be implemented in application protocols, when needed. Unique identification of a peer device on the link level would raise serious privacy concerns while there is no technical need.

Related

p2p direct data exchange...via HTTPS?

Is there any protocol, API or software in existence that can send data/IM/etc directly from one device to another with no server?
Can you not use HTTP GET/POST/DELETE directly between two devices when their device data is known to the user(s)?
I would very much like to know if there is ANY software/protocols that can do this.
thank you!
The internet is build on the Internet Protocol suite. This suite has 5 different layers of protocols: The physical layer, the link layer, the network layer, the transport layer and the application layer. Each depends on the one before.
If you just use the browser, by default HTTP (application layer) is used, which relies on TCP (transport layer), which relies on IP (v4 or v6, network layer), which relies on ethernet (link layer), which finally relies on the actual cable that's plugged into your computer (for WiFi, the first three are the same but the last two differ if I'm not mistaken).
Now to your question: Is there any protocol, API or software in existence that can send data/IM/etc directly from one device to another with no server?
Yes there is. I suggest you start looking at protocols that are in the application layer. To highlight a few standards next to HTTP(S): FTP is for file transfer, IMAP is for emails clients, SMTP is for email servers and SSH is a secure shell which can also be used to tunnel data through.
For your specific case, I think either FTP (FTPS if you want it over SSL), or SSH can be a solution, but it's hard to know for sure without the specifics.
The only thing that these protocols have in common is that one of the two computers will act like server and the other computer as client. This has as downside that port-forwarding might be necessary.
If you've chosen the protocol you'd like to use, then you're up for the next step, selecting a program that can do that for you. For HTTP(S), I'd recommend Apache. If you're using Linux and chose SSH, then you're in luck, there is a build in SSH server in Linux, you can use that. For other protocols, you might just want to search yourself, as I do not have any suggestions.
I hope this answers most of your questions!
Desirius
In browser context, WebRTC is probably what you are looking for: It allows user to user communications.
https://en.wikipedia.org/wiki/WebRTC
https://webrtc.org/

How does a device become SNMP-enabled?

I have a general question but I could not find any useful information to answer it.
Just to be clear, I do understand how the SNMP works (Manager, Agent, MIB).
What I do not understand is how a device becomes SNMP enabled?
Does it happen at the manufacturing stage?
Can anyone explain this to me, please?
SNMP is a protocol (set of rules) for device communications. An application on the device opens a network port, listens for connections, and responds to those connections. It's similar, at least in theory, to a web server or any other kind of server. Usually the SNMP server software will be written into firmware on the device by the manufacturer, but for computers it may be loaded at boot time or on demand.

NFC Beam from phone to desktop

I need to send .doc file from my Nexus 5 phone to a Windows 8 desktop (with an ACR122U-A9 NFC reader connected to it). Similar projects I have found use LLCP/SNEP protocol (such as Android Beam that can be found in this link: https://code.google.com/p/java-android-beam-api/). Since there is a new feature of host-based card emulation, I would like to know if I can use HCE instead of LLCP/SNEP to establish communication between Android and the ACR122U?
Yes you can use HCE to establish a connection between your phone and the ACR122U but that's not the P2P you are talking about. P2P is when both devices use a P2P protocol to exchange information. With HCE emulates a tag on your Android device which you can read with your ACR122U. Once you establish a connection it's possible to exchange bidirectional communication but you should use the ISO-DEP protocol instead of a P2P protocol. Read the information of the link below. It will give you more general information about HCE.
https://developer.android.com/guide/topics/connectivity/nfc/hce.html

Can one say an architecture using websocket technology is based on client-server model?

Can one say an architecture using websocket technology is based on client-server model?
By definition The client–server model is a distributed application structure that partitions tasks or workloads between the providers of a resource or service, called servers, and service requesters, called clients.
However using the websocket technology, two endpoints can both act as providers of a resource or service and also service requesters.
Say for example in a situation where the two endpoints are: a user device with a gps sensor and a computer machine, both connected in the network using websocket. And the computer machine is sending requests to obtain the current position of the user device (here the user device is acting as a resource provider and the computer machine as a requester). Later on the user device uses the websocket connection to request all its positions on the last 5 days to the computer machine (now the user device is acting as the requester and the computer machine as the resource provider).
If both devices can act as resource provider and requester, are they complying with the client-server model definition or not?
No it's not breaking anything. End Points are not devices they are connections between devices.
ie if we were asking each other questions and answering them
There would two connections between two 'devices' giving four endpoints. You to me and me to you. No conflict.
TCP is full duplex capable, and particularly WebSockets are full duplex. As #Tony Hopkinson pointed out, there is no conflict at all. This means, you can write and read at the same time.
WebSockets are push technology, more suited for events; while usual request-response models are pull technology.
You can have both client-server or peer to peer architectures with push approach, but pull is the normal choice for pull architectures.
Peer-to-peer Architecture: A peer-to-peer network is designed
around the notion of equal peer nodes simultaneously functioning as
both "clients" and "servers" to the other nodes on the network. This
model of network arrangement differs from the client–server model
where communication is usually to and from a central server. A typical
example of a file transfer that uses the client-server model is the
File Transfer Protocol (FTP) service in which the client and server
programs are distinct: the clients initiate the transfer, and the
servers satisfy these requests.
You can also provide a mix of peer-to-peer and client-server. For example, you can do requests via WebSocket, and at the same time, the server could send updates on its own initiative. I don't understand what you mean with "breaking the model". WebSocket is just a communication channel. In your app both models can coexists and use the same communication channel.

LAN traffic encryption on Windows

I'm working on a study project and need to create a software which should encrypt LAN traffic between computers with Windows. So I need to capture, encrypt and resend all outbound traffic, and capture and decrypt all inbound traffic.
Currently I see two way to do it:
1) IP over UDP. I need encrypt IP packets and send them through UDP link, receive them and decrypt.
2) Encrypt payload of IP packets and decrypt it on another side.
I actually don't know how to do it better and where to start. All suggestions/examples will be helpful.
If you really only need to encrypt the traffic you can simply install a "manually keyed" IPSec SA. See instructions at MSDN
That being said, encryption is the easy part. Authenticating the peers and key agreements is the hard part.
Cryptography is hard to get right, so you definitely want do not want to invent a probably insecure wheel, but opt for a peer-reviewed standard solution, such as the Internet Key Exchange protocol. There is an (unfortunately discontinued) internet draft of a minimal IKE implementation.
Please note that it is perfectly OK to use IKEv2 as the key agreement / authentication protocol for any application - not just for ESP. But if you need to encapsulate ALL IP, Encapsulating Security Payload in tunnel mode is your friend, and the lucky thing here is that ANY OS that is IPv6 compliant MUST implement it, so using ESP is in practice just a matter of installing the key material to your OS kernel's IP stack.
In case you need code samples, I have made a minimal proof-of-concept level implementation of an initiating end of an IKEv2 peer in Python. A Perl implementation doing the same can be found from these IETF proceedings slides

Resources