-
Notifications
You must be signed in to change notification settings - Fork 0
Quick Start Guide
Backend Database with the encrypted messages, unreadable for nobody, except the user that they are meant for
-
After you register, click on
Encryption Keys
-
Then click on
Add New Key
3. You can either generate an RSA Key pair using OpenSSL or the JSEncrypt Key Generator.
In Git Bash, change to your desired directory and type:
To generate private key:
openssl genrsa -out rsa_2048_priv.pem 2048
To generate public key:
openssl rsa -pubout -in rsa_2048_priv.pem -out rsa_2048_pub.pem
Paste the Public Key (the Private Key textbox is readonly and is not inside the <form>
tag) and click on Add Public Key
to submit the form.
Click on Generate Key Pair
, to call the JSEncrypt script which will generate a pair for you. Make sure you copy and save your private key, and click on Add Public Key
to submit the form (the Private Key textbox is readonly and is not inside the <form>
tag).
By default we are using 2048 bit RSA keys. I have hardcoded the JSEncrypt generator on 2048 bits. To generate a longer key, use OpenSSL. Though, there is a hardcoded constant in the backend and the frontend script, which checks the length of the message, because a 2048 bit key can encryot only 245 chars with its modulus. So you need to change that if you are going to use longer RSA keys:
const int MESSAGE_PAYLOAD_LEN = 345; //With RSA 2048 bit key, the max base64 string is of length exactly 345(+ "%" sign for whisper traffic)
const int SIGNED_MESSAGE_PAYLOAD_LEN = 344; //With RSA 2048 bit key, the max base64 string of the SHA-256 hash is exactly 344 chars long
const MESSAGE_LENGTH = 245; // the max RSA encryption length for 2048 bit key Modulus, if the message is longer, the library would fail
- After submitting your key, the page should look like this, then to use the chat, you can click on
Chat
5. You will be prompted for your private key. Copy and paste it. If it is wrong you will be prompted again.
To leave the page while being prompted, close the current tab in the web browser.
If the key supplied is correct, the decryption process will begin. It can take a while, depending on the key size you have chosen and your device and browser.
That's it, enjoy the app.