Secure Chat 0.1.1
Communication Application system secured with end-to-end encryption and distributed on server and database level.
|
Secure Chat is my attempt at creating a C program allowing you host decentralized system and chat securely with your friends. It implements HTTPS connection (✔️) and AES algorithm is used for message end-to-end (EE2E) encryption (❌). Messages are stored in SQLite3 database and can be read by the recipient only. Sending messages in optimized for maximum performance and resource usage.
[!IMPORTANT] This project was not completed successfully and awaits second iteration.
The application uses the OpenSSL library for HTTPS connection, encryption, and decryption. The server acts as a buffer and router for clients. The following algorithms are used:
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
For a Debian-based system, you can install the following packages:
This should also work with Ubuntu and Linux Mint.
Run the server and client executables in separate terminals.
You can download server and client from the releases page.
You can also run the server using Docker.
Server is responsible for handling client connections, retrieving messages from the database and sending messages to the recipients. It also manages user registration and authentication according to the protocol. Multithreading is used to allow many concurrent requests and connections. Client connections are stored in a thread-safe hash map and only one logged instance of a client is allowed. Messages before handling are stored in thread-safe queue. Server facilitates CLI for system administration. Server logs all requests, client connections and errors.
Client connects to the server, sends messages and receives messages from the server. GUI is implemented using Raylib library and dark-mode is added. Dynamic signal resolution is used to allow for the best performance and resource usage. States are used to manage the client's connection and message sending. Client logs all requests, server connections and errors.
Common generates static library that is used by both server and client, i.e. communication protocol, encryption and decryption functions. It also defines the message structure, signal codes, data structures and functions that are shared between server and client.
SQLite3 database is utilized at the moment. There is planned usage of distributed database system Cassandra or MongoDB in the further project iterations.
Navigate to database for detailed database schema documentation.
This project is licensed under the MIT License - see the LICENSE file for details.
Please refer to CONTRIBUTING.md. We appreciate your help!