{"id":15149903,"url":"https://github.com/arad-afzali/secure-messaging-client-side","last_synced_at":"2026-01-22T10:35:52.273Z","repository":{"id":243276947,"uuid":"809766060","full_name":"Arad-Afzali/secure-messaging-client-side","owner":"Arad-Afzali","description":"Secure Chat Client is a Python-based application designed for encrypted end-to-end messaging. It connects to a secure chat server, exchanges RSA public keys, and ensures secure communication through encrypted messages. Features include a PyQt5 GUI, secure key exchange, and optional SSL/TLS support for enhanced security.  ","archived":false,"fork":false,"pushed_at":"2024-06-08T22:29:49.000Z","size":64473,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T20:51:19.371Z","etag":null,"topics":["encrypted-messaging","encrypted-messaging-service","end-to-end","end-to-end-encryption","public-key-exchange","rsa-encryption","rsa-encryption-decryption","secure-chat","secure-chat-application","secure-chat-client","secure-communication","ssl-tls"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Arad-Afzali.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-03T12:10:22.000Z","updated_at":"2024-10-16T15:30:18.000Z","dependencies_parsed_at":"2024-06-07T19:25:32.207Z","dependency_job_id":"90e78363-ebe4-4d40-b2c7-dff64b52968f","html_url":"https://github.com/Arad-Afzali/secure-messaging-client-side","commit_stats":null,"previous_names":["arad-afzali/secure-messaging-client-side"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arad-Afzali%2Fsecure-messaging-client-side","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arad-Afzali%2Fsecure-messaging-client-side/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arad-Afzali%2Fsecure-messaging-client-side/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arad-Afzali%2Fsecure-messaging-client-side/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Arad-Afzali","download_url":"https://codeload.github.com/Arad-Afzali/secure-messaging-client-side/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247962916,"owners_count":21024920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["encrypted-messaging","encrypted-messaging-service","end-to-end","end-to-end-encryption","public-key-exchange","rsa-encryption","rsa-encryption-decryption","secure-chat","secure-chat-application","secure-chat-client","secure-communication","ssl-tls"],"created_at":"2024-09-26T14:01:30.796Z","updated_at":"2026-01-22T10:35:52.242Z","avatar_url":"https://github.com/Arad-Afzali.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Secure Chat Client (end-to-end encryption)\n\nThis is the client application for a secure chat system. It connects to a secure chat server, exchanges public keys for secure communication, and allows encrypted messaging between clients.\n\n![alt text](\u003css.png\u003e)\n\n## Server Application\n\nThe server application is necessary for the connection of client apps. You can find the server application repository and instructions on how to set it up below:\n\nhttps://github.com/Arad-Afzali/secure-messaging-server-side\n\nPlease follow the installation and usage instructions in the server application's README to ensure proper communication with the clients.\n\n## Features\n\n- Generates RSA keys for secure communication with a bit length of 4096 bits upon initialization.\n- Encrypts and decrypts messages using RSA and OAEP padding.\n- Connects to the secure chat server and exchanges public keys with another client.\n- GUI for connecting, sending, and receiving messages.\n- Secure Key Exchange to ensure only intended peers can access the keys.\n- Optional SSL/TLS Support to encrypt the entire communication channel between the client and server, ensures safe public   key exchange, but even without SSL/TLS, the application maintains a high level of security for encrypted messages.\n\n## Requirements\n\n- Python 3.x\n- PyQt5\n- pycryptodome\n\n## Installation\n\n1. **Clone the repository**:\n\n    ```bash\n    git clone https://github.com/Arad-Afzali/secure-messaging-client-side.git\n    cd secure-messaging-client-side\n    ```\n\n2. **Create a virtual environment and activate it** (Recommended):\n\n    **On macOS and Linux:**\n    ```bash\n    python3 -m venv venv\n    source venv/bin/activate\n    ```\n\n    **On Windows:**\n    ```bash\n    python -m venv venv\n    venv\\Scripts\\activate\n    ```\n\n3. **Install the required packages**:\n\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n### Note (Optional but Recommended Steps)\n\n4. **SSL/TLS Support**:\n\n    To enable SSL/TLS support, you need to wrap the socket with SSL/TLS. Uncomment the relevant sections in the ChatClient class and provide the path to your certificate file:\n\n    ```bash\n    # Uncomment here for SSL/TLS certificate---------------------\n\n    # Wrap the socket with SSL/TLS\n    # context = ssl.create_default_context()\n    # context.verify_mode = ssl.CERT_REQUIRED\n    # context.check_hostname = True \n    # context.load_verify_locations('path/to/fullchain.pem')\n\n    # self.sock = context.wrap_socket(self.sock, server_hostname=host)\n\n    # ------------------------------------------------------------\n    ```\n5. **Obtaining SSL/TLS Certificates Self-Signed Certificates (for testing purposes)**:\n\n    You can generate self-signed certificates using OpenSSL:\n    \n    ```bash\n    # Generate a new RSA private key\n    openssl genrsa -out client.key 4096\n\n    # Generate a Certificate Signing Request (CSR)\n    openssl req -new -key client.key -out client.csr\n\n    # Generate a self-signed SSL certificate\n    openssl x509 -req -days 365 -in client.csr -signkey client.key -out client.crt\n    ```\n\n6. **Obtaining Certificates from a Certificate Authority (CA)**:\n\n    For production, it is recommended to obtain certificates from a trusted CA. Services like Let's Encrypt offer free SSL/TLS certificates:\n\n    Follow the instructions on the Let's Encrypt website to obtain your certificate.\n    Use the obtained fullchain.pem and privkey.pem files in the SSL/TLS configuration.\n\n## Usage\n\n1. **Start the client application**:\n    ```bash\n    python3 client.py\n    ```\n2. **Enter the server IP or domain and port, then click \"Connect\".**\n\n3. **Once connected, exchange messages securely with your peer.**\n\n\n\n## Contributing\nContributions are welcome! Please open an issue or submit a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farad-afzali%2Fsecure-messaging-client-side","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farad-afzali%2Fsecure-messaging-client-side","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farad-afzali%2Fsecure-messaging-client-side/lists"}