Skip to content

An end to end encrypted chat app built using React, Express, Socket.io, Mongodb, Node.Js, LDAP & OpenSSL

License

Notifications You must be signed in to change notification settings

nour-karoui/secure-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to Secure Chat 👋

Documentation Maintenance License: MIT

An end to end encrypted messaging Real time messaging app built using React, Express, Socket.io, Mongodb, Node.Js, LDAP & OpenSSL

alt tag

NB: This work is heavily based on Timothylp's work. Shout out to the amazing frontend he prepared.


Features:

  • User Account Creation/Login using LDAP
  • Real-time chat using socket.io
  • Tokens for API calls to backend
  • Cookies for saved session on browser refresh
  • Private Messaging with other users, all messages are end to end encrypted using asymmetric encryption

Installing

git clone https://github.com/nour-karoui/secure-chat .
npm install
npm start
cd server 
npm install
npm start
Go to http://localhost:3001/

PS: Before Starting the app, make sure:

1. you have apache directory studio installed and running. You can download it from HERE. After running the apache directory studio, make sure to link it to our project in the file server/config/ldap-client.

2. you generate a self signed certificate that'll allow you to verify the identity of the users and generate their certificates, (our self signed cetificate is saved in server/openssl/CA).

How Does it work

  1. When creating the account, the user generates a public and private key, and saves them in localstorage. the user sends the public key to the server alongside with his credentials. NEVER SHARE THE PRIVATE KEY WITH ANYONE.
  2. The server receives the user's credentials and his public key, he generates a certificate out of the public key and saves the user in the LDAP server.
  3. Each time userA wants to chat with userB, the server sends userB's certificate to userA and vice versa. Each user saves the other's certificate in their localstorage to be able to encrypt messages and send them.
  4. The ENCRYPTED messages are saved in Monge DB.

Author

👤 Nour

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page

Show your support

Give a STAR if this project helped you!

📝 License

  • Copyright © 2021 Nour.
  • This project is MIT licensed.

This README was generated with by readme-md-generator