Encrypted-Chat-Multi-user-Python is a very simple Python-based project designed to enable secure communication between multiple users in real time. The system leverages encryption techniques to ensure messages are protected from unauthorized access during transmission.
This project is ideal for learning about network programming, encryption, and real-time chat system development using Python's powerful libraries such as socket and ssl.
- server.py: The main server script that manages client connections and relays encrypted messages.
- client.py: The client-side script for connecting to the server, sending, and receiving messages.
- README.md: Project documentation and instructions.
- Example: Chat real example.
This project uses a client-server architecture to facilitate encrypted communication between users:
Server:
A secure server with TLS/SSL is configured. It listens for incoming connections, handles clients concurrently and relays messages to other connected users. It provides a command (!users) to list active users in the chat.
Client:Each user connects to the server by entering a username. The graphical interface (with Tkinter) allows sending messages, listing connected users and logging out. Messages are transmitted encrypted to preserve privacy.
You can create the certificates with the next comandas in Linux:
openssl genpkey -algorithm RSA -out server-key.key -aes256
openssl req -new -key server-key.key -out server.csr
openssl x509 -req -days 365 -in server.csr -signkey server-key.key -out server-cert.pem
openssl rsa -in server-key.key -out server-key.key
Encrypted-Chat-Multi-user-Python demonstrates the integration of cryptography and network programming in a simple yet practical project. It is a great starting point for developers looking to explore secure communication systems.