Thanks to Web Cryptography API, you can use private key crypto right in your browser.
This set of pages lets you exchange private information with your friend using encrypted messages using only public channels (like, agreeing on meeting in some place on IRC). Codewise, this is mostly a compilation of few first examples from webcrypto examples repo.
-
Ask them to:
- open generate.html
- click "Generate" button
- save private key (red area) for step 6
- send you the public key (green area)
-
Open encrypt.html
-
Paste the public key into green area
-
Enter your message into yellow box
-
Click "Encrypt" button
-
Send the encrypted message (blue area) to recipient and ask them to:
- open decrypt.html
- paste private key from step 1 into red area
- paste encrypted message into blue area
- click "Decrypt" button
-
Open generate.html
-
Click "Generate" button
-
Save private key (red area) for step 6 (or, just keep this page open)
-
Send the public key (green area) to sender and ask them to:
- open encrypt.html
- paste the public key into green area
- enter the message into yellow box
- click "Encrypt" button
- send you the encrypted message (blue area)
-
Open decrypt.html
-
Paste private key from step 3 into red area
-
Paste encrypted message into blue area
-
Click "Decrypt" button