An RSA encrypted Python chat server.
Please note that this is NOT an end-to-end encrypted system. The server decrypts your messages before re-encrypting them to send to the other clients. The server does not print any messages to the console, or store them in a log file however, so as long as the server is secure data should be secured. Unencrypted data, except for public keys, is never sent over the network.
A public-private key pair is generated by both the server and the clients at runtime.
CrPyt runs on port 2705, if you are having trouble getting a server setup, ensure this port is open to outside connections.
- /who
- Lists the currently connected users.
- /nick [newNick]
- Change your nickname
When the server receives a new connection, it immediately sends it's public key to the client. The client also immediately sends it's public key to the server, enabling an encrypted connection between the client and the server. Data sent to and from the server should be encoded with UTF8. Data sent to the server should first be encoded as UTF8 and then encrypted using the server's public key. Data being received from the server should firstly be decoded from UTF8 and then decrypted using the clients private key.
- Client connects to IP:2705
- Server accepts the connection
- Server sends the client it's public key.
- Client sends server it's public key
- Connection is now ready for messages
- Data sent to the server is broadcast to all other clients, unless the message begins with a /
- Client automatically sends a /who command upon connection