Hi, I currently want to build a chat app with basic end to end encryption. Could someone show me a little bit how this should work?
Like how do both participants in a chat know with what to decrypt the messages?
Solution
Both chat clients must generate a key pair, then send their public keys to one another. Before sending the message you encrypt it with the public key you got from them. When you receive the message you decrypt it with your private key.