/secure-chat-nodejs

Secure chat with RSA (written on Node.js)

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

Secure chat

Secure chat with RSA and AES end to end encryption See live demo here

##Technologies used:

Backend:

Frontend:

  • Bootstrap CSS
  • Jade
  • JQuery
  • jsencrypt -- RSA encryption/decryption
  • CryptoJS -- AES encryption/decryption

Installation:

  • Install mongodb locally
  • Change connection string in config.js according to DB setting
  • Install Node.js modules
sudo npm i

How to run Node.js server for debug purposes:

npm start

Then go to: http://127.0.0.1:3000/

How to use

  1. Register new account using registration form
  2. Login to the site
  3. Generate a pair of RSA keys
  4. It can be generated in LINUX via openssl package:
openssl genrsa -out priv.pem 1024
openssl rsa -pubout -in priv.pem -out pub.pem
  1. Or just go to http://travistidwell.com/jsencrypt/demo/ and generate it online
  2. Enter and save it in you profile tab
  3. Go to "Contacts" tab, enter your friend's username (you should also send your username to your friend by alternative channel)
  4. If it was successfully added, click on nickname in contact-list
  5. You will be moved to "Messages" tab
  6. Insert your friend's public RSA key (which was sent to you by alternative ways) into corresponging field
  7. And send her/him your public RSA key
  8. If you wish to send your messages securely, check the checkbox "Encrypted" (You will be warned if you didn't set the keys)