Public/Private key

Hi, I am working on a web application- I have a node created in browser and talking with another in-browser node.

How can we authenticate that we are talking to right node?

You are already authenticated! :slight_smile:

The multiaddress of the node (Qm…) is derivated from its key pair, and everything is signed with it.
So when node B get a packet supposedly from node A, it can check that the address, the signature and the payload match.