-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Pradyumna Krishna <[email protected]>
- Loading branch information
1 parent
840d5f0
commit 0383477
Showing
4 changed files
with
28 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,39 @@ | ||
<img src="https://raw.githubusercontent.com/PradyumnaKrishna/PradyumnaKrishna/master/logo.svg" alt="Logo" title="Logo" align="right" height="50" width="50"/> | ||
# Enigma Protocol | ||
|
||
# Enigma Protocol [![Python Server][Python-Badge]][Python] [![Github Pages][Pages-Badge]][Pages] | ||
An encrypted chat application using RSA encryption and Diffie-Hellman key exchange built with WebSockets. | ||
|
||
Hello Friends, I built an end to end encrypted messenger using Flask, SocketIO, and Vue.js. | ||
To learn more about the protocol, see the [Protocol](PROTOCOL.md) and [Specification](SPECIFICATION.md). This repository contains the client application of engima-protocol project implemented with Vue.js. The server side implementation is engima-protocol-python, which is a Python implementation of the protocol. | ||
|
||
![Client App](/images/client.png) | ||
|
||
## Working | ||
## Getting Started | ||
|
||
The Chat is encrypted using RSA encryption that is a public key encryption or you can say asymmetric encryption. RSA gives two keys, public key and private key, public key is used to encrypt messages while private key is used to decrypt them. | ||
### Development | ||
|
||
I have used [Diffie–Hellman key exchange](https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange) to exchange the public keys of the users. These keys are used by user A to encrypt messages and send them to another user B and user B can decrypt them using his private key. | ||
To run the client application in development mode, follow these steps: | ||
|
||
Socket.io is used to send and receive messages, these messages are encrypted and sent to the user having the private key to decrypt it. | ||
1. Clone the repository: | ||
|
||
I created some Flask API to store the information* of the users in a SQLite database and relogin as the user if page reloaded. | ||
```bash | ||
git clone https://github.com/PradyumnaKrishna/enigma-protocol.git | ||
``` | ||
|
||
Finally Vue.js is used to perform client side encryption/decryption, send/receive message and login or connect to the user. | ||
2. Install the dependencies: | ||
|
||
*Information contains `id`, `publicKey`, and `last_activity` of a user. | ||
```bash | ||
npm ci | ||
``` | ||
|
||
3. Start the development server: | ||
|
||
## Development | ||
```bash | ||
npm run dev | ||
``` | ||
|
||
Those who wants to develop or build the code then, just clone this repository using: | ||
## Specification | ||
|
||
```bash | ||
git clone https://github.com/PradyumnaKrishna/enigma-protocol.git | ||
``` | ||
The [PROTOCOL](PROTOCOL.md) document describes the protocol used for encrypting and decrypting messages, and [SPECIFICATION](SPECIFICATION.md) document describes the specification of the project, including the client and server implementations. | ||
|
||
### Server (Python 3) | ||
- Install Dependencies | ||
```bash | ||
pip3 install -r requirements.txt | ||
``` | ||
- Run the Server | ||
```bash | ||
python main.py | ||
``` | ||
|
||
Supported Python Versions | ||
- Python 3.7/3.8 | ||
|
||
|
||
### Server (Golang) | ||
This is on hold because go-socket.io doesn't support newer versions of client-socket.io. | ||
|
||
|
||
### Client (Vue.js) | ||
- Install Dependencies | ||
```bash | ||
npm ci | ||
``` | ||
- Run the development client | ||
```bash | ||
npm run serve | ||
``` | ||
|
||
**NOTE**: To run the vue.js app you need to confiure an env variables, open `.env.sample` to see an sample environment file. | ||
|
||
Supported Node.js Version | ||
- Current LTS version (14) or newer | ||
|
||
## What next | ||
|
||
I will create Issues and try to fix them. | ||
|
||
|
||
[Python-Badge]: https://github.com/PradyumnaKrishna/Enigma-Protocol/actions/workflows/python_build.yml/badge.svg | ||
|
||
[Python]: https://ghcr.io/PradyumnaKrishna/enigma-protocol/python-server | ||
|
||
[Pages-Badge]: https://github.com/PradyumnaKrishna/Enigma-Protocol/actions/workflows/client_build.yml/badge.svg | ||
|
||
[Pages]: https://protocol.onpy.in | ||
## License | ||
|
||
This project is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.