cd ../projects
2025-05-21·1 min read

LeChatBoxe: Secure CLI-based Chat App

LeChatBoxe is a secure, command-line-based instant messaging project built with Python, featuring encryption via Fernet and a custom XOR algorithm.

Cybersecurity

About

LeChatBoxe is a secure, command-line-based instant messaging project developed in Python. I built this project to experiment with network sockets and explore the basics of security (symmetric encryption and authentication).

The application is designed with a modular architecture:

  • client/: The command-line interface for users.
  • server/: The TCP server that handles multiple clients simultaneously.
  • database/: SQLite database for managing users and messages.
  • security/: Encryption functions (Fernet and custom XOR).
  • config/: Global application settings.

Features

  • User authentication (sign-up, login).
  • Real-time communication with encryption:
    • Fernet for strong symmetric encryption.
    • A custom XOR encryption layer based on the user's password for additional security.
  • Built-in commands:
    • /users: Lists currently connected users.
    • /help: Displays available commands.
    • exit: Quits the chat.

Network Architecture

The server listens on a TCP socket and supports multiple simultaneous clients. Messages are encrypted on the client side before being sent and decrypted on the client side upon receipt. This ensures confidentiality even if network traffic is intercepted.

Project Goals

  • Explore socket programming and understand the basics of network communication.
  • Implement encryption concepts in a real-world project.
  • Learn how to structure a modular Python project (client, server, security, database).

Future Improvements

Some ideas for future enhancements:

  • Add a graphical (GUI) or web interface for broader accessibility.
  • Improve documentation for installation and usage.
  • Implement automated tests to validate core features.

Clone The Project

git clone https://github.com/Telooss/LeChatBoxe.git

Run Server And Client

cd LeChatBoxe/server ; python3 server.py
cd LeChatBoxe/client ; python3 client.py

Conclusion

This project helped me understand how to implement TCP sockets, manage secure message exchange (encryption and decryption), and design a modular architecture. It is a strong foundation for further experiments in secure communication.