TCP Chat Application Here's a README for your TCP Chat Application with encryption:
A simple TCP-based chat application in Python with encrypted message transmission, built using sockets and the cryptography library. This app allows two users to chat over a TCP connection, with messages encrypted to ensure secure communication.
- Encrypted Message Transmission: Messages are encrypted using symmetric encryption for secure transmission.
- TCP Connection: Relies on TCP sockets for reliable data transfer.
- User Interface (Optional): Basic command-line interface; can be extended to a GUI.
- Python 3.6+
- Install
cryptographylibrary:pip install cryptography
-
Clone the repository:
git clone https://github.com/yourusername/tcp-chat-app.git cd tcp-chat-app -
Ensure
server.pyandclient.pyscripts are in the same directory.
-
Run the Server:
- In a terminal, navigate to the directory and start the server:
python server.py
- The server will listen for a connection on
localhost:10000.
- In a terminal, navigate to the directory and start the server:
-
Run the Client:
- In a separate terminal, run the client script:
python client.py
- Connects to the server, enabling encrypted chat communication.
- In a separate terminal, run the client script:
-
Chat!
- Type your message in the client terminal. Messages are encrypted and sent to the server.
- TCP Socket:
socketis used to establish a connection between server and client. - Encryption: Messages are encrypted using a symmetric key (AES encryption) for secure transmission.
.
├── client.py # Client-side script to connect and chat with the server
├── server.py # Server-side script to accept connections and relay messages
└── README.md # Project documentation
This project uses Python's socket and cryptography libraries. Special thanks to community resources for networking and cryptography tutorials.