Let's say we have Alice and Bob in a chatroom, trying to communicate. They're connected to the same network, but we have the network admin constantly monitoring all data being sent to servers (and received from servers, for that matter). How would they be able to send messages to each other without the Administrator being able to see? Assuming they're sending plaintext messages, nothing complicated
-
(I'm voting to close this question as a duplicate because Diffie-Hellman is one possible answer on how to exchange keys over a public channel which seems to solve what you're asking for.) – Arminius Dec 30 '17 at 20:29
-
The answer is to encrypt the communication. But I think you knew that. What's your real question? – schroeder Dec 30 '17 at 20:42
-
1The admin will *see* the messages, but will not be able to read them. Which goal are you looking for? Hiding, or making it unreadable? – schroeder Dec 30 '17 at 20:43
1 Answers
You might be interested in PGP communication: http://www.pitt.edu/~poole/PGP.htm
Both of you would generate a public key-private key pair on your local systems. Each key pair is mathematically related, that is, a public key is related to its private key. You would then publish the public key, well, publicly for everyone to see. The idea is anyone can encrypt a simple plaintext message using your public key and send you the result. Only you would be able to decrypt the message using your stored private key.
So in this case, Alice would tell Bob their public key, in the chatroom or somewhere else. Bob then uses Alice's public key to encrypt a secret plaintext message, then posts the result on the chat service. Alice grabs the encrypted message from the chat server and decrypts it at their local machine using the secret private key. Similarly, communications from Alice to Bob are also encrypted using Bob's public key.
The steps involved in generating a public key-private key pair are listed here: http://www.seas.upenn.edu/cets/answers/pgp_keys.html
- 1,366
- 9
- 17