README.md – Final Version
Console-based encrypted chat (Server & Client) using AES in Java.
A simple socket + symmetric cryptography demo, ready to evolve into a multi-user chat.
- Java 17 (recommended)
- No JavaFX required
- Run
secure_chat_app.Server. - Run
secure_chat_app.Clientin another console. - Enter your name and type messages to see them encrypted & decrypted in real time.
# compile all .java files
javac -d out src/secure_chat_app/*.java
# run server
java -cp out secure_chat_app.Server
# run client (in another terminal)
java -cp out secure_chat_app.Client- Transport: Java TCP sockets
- Encryption: AES symmetric key (demo only)
- Flow: Client ↔ Server, messages are encrypted and decrypted at both ends
⚠️ Security note: The AES key is hardcoded for demonstration only.
In a real-world application, use environment variables, configuration files, or secure key negotiation (e.g., ECDH), and switch to AES-GCM mode.
src/
secure_chat_app/
AESUtil.java
Server.java
Client.java
ClientHandler.java
README.md
LICENSE
.gitignore
Server started. Listening on Port 12345
...
Client> Enter your name:
Marnie
You can start typing messages now:
Base64 Encrypted String: ...
Marnie: Ma bucur ca merge
- Protocol: LOGIN, LIST, MSG, WHISPER, QUIT
- Server broadcast and user registry
- AES-GCM encryption with random IV per message
- Authentication (SQLite/MySQL + bcrypt)
- JavaFX GUI
- Packaging (Maven/Gradle) + runnable JAR
MIT License