Skip to content

CellaIoana/secure-chat-aes-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README.md – Final Version

secure-chat-aes-java

Build Java License: MIT

Console-based encrypted chat (Server & Client) using AES in Java.
A simple socket + symmetric cryptography demo, ready to evolve into a multi-user chat.


🚀 Quick Start

Requirements

  • Java 17 (recommended)
  • No JavaFX required

Run with Eclipse

  1. Run secure_chat_app.Server.
  2. Run secure_chat_app.Client in another console.
  3. Enter your name and type messages to see them encrypted & decrypted in real time.

Run with CLI

# 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

🧠 How it Works

  • 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.


🗂️ Project Structure

src/
  secure_chat_app/
    AESUtil.java
    Server.java
    Client.java
    ClientHandler.java
README.md
LICENSE
.gitignore

🧪 Sample Session

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

🛣️ Roadmap

  • 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

📜 License

MIT License

About

Console-based AES-encrypted chat (Server/Client) in Java

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages