This is a small chat client I made for fun, and all chat messages are encrypted!
Client:
I had to install cryptography library, it seems to be 32bit only... Running fine using Python3.5 and 3.6
pip install cryptography
Server and Gateway:
Should work 32bit/64bit on Python3.5+ (tested)
Server:
- Head over to server directory
- Open config.ini
- Change
port
to your desired port - Run the server script
Gateway:
- Head over to gateway directory
- Open config.ini
- Change
localport
to the desired port for the gateway - Change
serverport
to the port your server is running - Change
serverip
to the ip of your server
Client:
- Head over to client directory
- Run key_generator.py
- Copy its output
- Open config.ini
- Replace three bottom lines with what you just copied
- Replace
serverip
to the ip of your gateway - Replace
serverport
to the port of your gateway - Replace
username
to whatever you want that to be
Server:
The server simply receives messages and sends them to all connected clients without decrypting the message
Gateway:
The gateway simply relays messages it receives from clients to the server and relays the messages from the server to all its clients, never decrypts the messages
Client:
Sends off encrypted messages to gateway Receives encrypted messages from gateway, then decrypts them
Client -> Presses "Send Message"
Client -> Encrypts Message
Client -> Sends Message To Gateway
Gateway -> Receives Message
Gateway -> Sends Message To Server
Server -> Receives Message
Server -> Sends Message To All Connected Gateways
Gateways -> Receives Message
Gateways -> Sends Message To All Connected Clients
Clients -> Receives Message
Clients -> Decrypts Message
Clients -> Displays Message
[Settings]
username=User
serverip=185.80.130.181
serverport=1337
encryptkeyone=5VsGhICbtuaHHyZL15swIJcI_Y-92_mD1A4CPIRlqZ0=
encryptkeytwo=4U0PuVWPkkj4nG8KhzTcbLBf6heiX6QOH6DGud4Vsz8=
encryptkeythree=69t_WLCzYwbgbnKRvLTQydeHBJIbzIZNVvn4BunLwZc=