-
Hello, I want to use libsodium to perform key exchange in a p2p system. I'm puzzled by the definition of the client and server. For a p2p system, who should be the server? and who should be the client? What are the differences between them? Some background: I want to implement an end-to-end encrypted group messaging system. A message sender will generate a key for each reader. I want to use the key exchange mechanism to implement it. In this system, there is no concept of "server" or "client". All are equal peers. If I have to assign a server or client role to them, does that mean I can only exchange keys between server and client, but not between server and server, or client and client? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi, Assign the "client" role to any of the parties, and the "server" role to the other one. A common way do to it is to use known identifiers, or public keys. For example the smallest public key is the client, and the other one is the server. |
Beta Was this translation helpful? Give feedback.
Peers only need one key pair.
server
andclient
is just the role for a key exchange. Replaceserver
andclient
withAlice
andBob
if you prefer. One just has to beAlice
and the other oneBob
.