https://github.com/neehu613/rsa-based-chat-application
A django based chat application where you can send messages encrypted using RSA algorithm.
https://github.com/neehu613/rsa-based-chat-application
chat-application django-chat djangochannels2 encryption-decryption rsa rsa-algorithm rsa-chat rsa-cryptography rsa-encryption rsa-key-encryption scifi
Last synced: 2 months ago
JSON representation
A django based chat application where you can send messages encrypted using RSA algorithm.
- Host: GitHub
- URL: https://github.com/neehu613/rsa-based-chat-application
- Owner: neehu613
- Created: 2019-11-03T03:32:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-04T03:26:06.000Z (over 5 years ago)
- Last Synced: 2025-03-23T18:54:11.876Z (3 months ago)
- Topics: chat-application, django-chat, djangochannels2, encryption-decryption, rsa, rsa-algorithm, rsa-chat, rsa-cryptography, rsa-encryption, rsa-key-encryption, scifi
- Language: Python
- Size: 9.54 MB
- Stars: 9
- Watchers: 2
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RSA-based-chat-application
A django based chat application where you can send messages encrypted using RSA algorithm.Make sure you install all dependencies first.
Open the project directory and run the following commands:
```
pip install django
pip install channels
pip install channels-redis
pip install redis
```Setting up the database:
```
python manage.py makemigrations
python manage.py migrate
```Run the local server using the command
```
sudo docker run -p 6379:6379 -d redis:2.8
python manage.py runserver
```## Usage and snapshots
You can set up your account by entering details in the registration form.

After you sign up, it takes you to the login page where you can enter your credentials and log in.

After successful login, it takes you to the home page. This application provides 2 main features.
* Creating Chatrooms - private/public
* Joining ChatroomsIt also displays the registered users.

Click on the __Create Room__ button and then enter the room name. You can create private/public rooms.

For private rooms, it needs a password

The below image shows the __room__ page and you can enter your message inside the box provided on the right side. Once the message has been typed, you can click on the __Encrypt__ button to encrypt your message. You can perform encryption using different sized keys(128 bits, 256, 512, 1024, 2048)

The encryption process can be seen on the terminal output. It generates a public key and encrypts your message using it.


You can open up an __incognito__ window and login with another user's credentials and join the same room. When the other user finishes encryption, he can hit the __SEND ENCRYPTED MESSAGE__ button to send the encrypted message. The user on the __incognito__ window can hit the __DECRYPT__ button to create a private key using the public key with which the message was encrypted and can decrypt the message.

The other user gets the public key used along with the enciphered text.

On clicking the __DECRYPT__ button, it takes us to this page

You can view the decrypted message here

All the messages which have been decrypted are stored in a chat log.
