This repository contains a secure, multi-threaded chat application that ensures all communications between clients are encrypted. User passwords are securely hashed before storage, ensuring the highest level of security and privacy.
- Secure Communication: All messages between clients and server are encrypted using AES-128.
- Multi-Threaded Server: Handles multiple clients concurrently.
- Hashed Passwords: Uses SHA-256 for storing user passwords.
- User Registration and Login: Allows new users to register and existing users to log in.
- Broadcast Messaging: Sends messages from one client to all other connected clients.
- Private Messaging: Allows clients to send private messages to specific users.
- Client Management: Keeps track of connected clients and manages their sessions.
- Connection Handling: Gracefully handles client connections and disconnections.
- Console-Based User Interface: Provides an intuitive interface for interaction.
- ChatClient.java: Handles the client-side operations of the chat application.
- ChatServer.java: Manages server-side operations and handles multiple client connections.
- HashUtil.java: Provides utilities for hashing passwords.
- user_credentials.txt: Contains sample user credentials stored as hashed values.
- Clone the repository
git clone https://github.com/yourusername/secure-chatapp.git
cd secure-chatapp
- Compile the source code
javac ChatClient.java ChatServer.java HashUtil.java
- Run the server
java ChatServer
- Run the client
java ChatClient
- Start the server by running the ChatServer class.
- Start multiple clients by running the ChatClient class for each client.
- Follow the prompts in the client console to log in or register.
- Enjoy secure, encrypted communication with other connected clients.
- Encryption: All communications between clients and server are encrypted using AES-128 to prevent eavesdropping.
- Password Hashing: User passwords are hashed using SHA-256 algorithm to protect against password breaches.
Contributions are welcome! Please submit a pull request or open an issue to discuss what you would like to change.
This project is licensed under the GPLv3 License - see the LICENSE file for details.