{"id":19693718,"url":"https://github.com/arad-afzali/secure-messaging-server-side","last_synced_at":"2025-02-27T09:59:48.921Z","repository":{"id":243278602,"uuid":"809766300","full_name":"Arad-Afzali/secure-messaging-server-side","owner":"Arad-Afzali","description":"Secure Chat Server is a Python-based application enabling secure communication between two clients. It supports RSA public key exchange, encrypted messaging, and optional SSL/TLS support for enhanced security. The server routes messages without accessing their contents and ensures secure key exchange and disconnection of additional clients.","archived":false,"fork":false,"pushed_at":"2024-06-07T18:13:30.000Z","size":4618,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-10T09:14:53.753Z","etag":null,"topics":["encrypted-messaging","public-key-exchange","rsa-encryption","secure-chat-server","secure-communication","secure-server","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:55.000Z","updated_at":"2024-10-16T15:31:12.000Z","dependencies_parsed_at":"2024-06-07T19:50:45.365Z","dependency_job_id":null,"html_url":"https://github.com/Arad-Afzali/secure-messaging-server-side","commit_stats":null,"previous_names":["arad-afzali/secure-messaging-server-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-server-side","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arad-Afzali%2Fsecure-messaging-server-side/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arad-Afzali%2Fsecure-messaging-server-side/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arad-Afzali%2Fsecure-messaging-server-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-server-side/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241002091,"owners_count":19892106,"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","public-key-exchange","rsa-encryption","secure-chat-server","secure-communication","secure-server","ssl-tls"],"created_at":"2024-11-11T19:17:48.045Z","updated_at":"2025-02-27T09:59:48.887Z","avatar_url":"https://github.com/Arad-Afzali.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Secure Chat Server\n\nThis is a simple secure chat server implemented in Python. It allows two clients to connect, exchange public keys for secure communication, and send messages to each other. \n\n## Client Application\n\nThe client application is necessary to connect to this secure chat server. You can find the client application repository and instructions on how to set it up below:\n\nhttps://github.com/Arad-Afzali/secure-messaging-client-side\n\nPlease follow the installation and usage instructions in the client application's README to ensure proper communication with the server.\n\n\n## Features\n\n- Supports two clients.\n- Exchanges public keys for secure communication and removes them immediately when they are not needed.\n- Routes messages between clients (note: the server does not have access to the messages as they are encrypted by the clients).\n- Disconnects all clients when more than two clients attempt to connect.\n\n## Requirements\n\n- Python 3.x\n- `openssl` (for SSL/TLS support, Optional but Recommended)\n\n## Installation\n\n1. **Clone the repository**:\n\n    ```bash\n    git clone https://github.com/Arad-Afzali/secure-messaging-server-side.git\n    cd secure-messaging-server-side\n    ```\n\n### Note (Optional but Recommended Steps)\n\n2. **Generate SSL/TLS certificates**:\n\n    ```bash\n    # Generate a new RSA private key\n    openssl genrsa -out server.key 4096\n\n    # Generate a Certificate Signing Request (CSR)\n    openssl req -new -key server.key -out server.csr\n\n    # Generate a self-signed SSL certificate\n    openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt\n    ```\n3. **SSL/TLS Support**\n\n    To enable SSL/TLS support, first you should uncomment the relevant sections in the ChatServer class and provide the paths to your certificate and key files:\n\n    ```bash\n    #uncomment these sections in the code:\n\n    self.context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)\n    self.context.load_cert_chain(certfile='server.crt', keyfile='server.key')\n\n    #---------\n\n    client_socket = self.context.wrap_socket(client_socket, server_side=True)\n\n    ```\n## Usage\n\n1. **Start the server**:\n\n    ```bash\n    python3 server.py\n    ```\n\n    ### Note\n    \n    You should change the IP address and port in the server.py. The default IP address in 127.0.0.1 and the default port is 7004.\n\n2. **Connect clients to the server using the client application.**\n\n    \n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request.\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farad-afzali%2Fsecure-messaging-server-side","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farad-afzali%2Fsecure-messaging-server-side","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farad-afzali%2Fsecure-messaging-server-side/lists"}