Skip to content

ANMOLJ1593/CipherLink

Repository files navigation

CipherLink – Secure Multi-Client Communication Framework with End-to-End Encryption

📌 Overview

CipherLink is a secure real-time multi-client chat application developed using Python Socket Programming and Tkinter GUI. The application enables multiple users to communicate securely over local networks or the internet using End-to-End Encryption (E2EE).

The project demonstrates:

  • Socket Programming
  • Client-Server Architecture
  • Multithreading
  • GUI Development using Tkinter
  • End-to-End Encryption using Fernet
  • Internet Deployment using Ngrok
  • Online Users Synchronization
  • Chat Log Management

✨ Features

  • 🔒 End-to-End Encrypted Messaging
  • 🌐 Internet-based Communication using Ngrok
  • 👥 Multi-Client Communication
  • 📋 Dynamic Online Users List
  • 💬 Real-Time Messaging
  • 🖥️ Tkinter GUI Interface
  • 🧵 Multi-threaded Server Handling
  • 📝 Local Chat Log Saving
  • ⚡ Lightweight and Fast
  • 🔐 Password-based Encryption using Fernet

🛠️ Technologies Used

Technology Purpose
Python 3.x Core Programming
Socket Programming Networking Communication
Tkinter GUI Development
Threading Multi-client Handling
Cryptography (Fernet) End-to-End Encryption
Ngrok Internet Deployment
PyInstaller EXE File Generation

🏗️ Project Architecture

               ┌─────────────────┐
               │     SERVER      │
               │  (Central Hub)  │
               └────────┬────────┘
                        │
        ┌───────────────┼───────────────┐
        │               │               │
 ┌────────────┐ ┌────────────┐ ┌────────────┐
 │  CLIENT 1  │ │  CLIENT 2  │ │  CLIENT N  │
 │    GUI     │ │    GUI     │ │    GUI     │
 └────────────┘ └────────────┘ └────────────┘

🔐 Encryption Workflow

  1. User enters a shared password.
  2. Password is converted into a secure encryption key using PBKDF2HMAC.
  3. Messages are encrypted using Fernet encryption before transmission.
  4. Server only forwards encrypted packets.
  5. Receiving client decrypts the message locally.

📂 Project Structure

CipherLink/
│
├── modified_server.py
├── modified_client.py
├── chat_logs/
├── README.md
└── requirements.txt

⚙️ Installation Guide

Step 1 — Install Python

Download and install Python 3.8+:

https://www.python.org/downloads/

During installation:

  • Enable “Add Python to PATH”

📦 Step 2 — Install Required Libraries

Open terminal inside project directory:

pip install cryptography

Optional (for EXE conversion):

pip install pyinstaller

🚀 Running the Project

🖥️ Server Setup

Open terminal inside project directory:

python modified_server.py

Expected Output:

Starting secure chat server on 0.0.0.0:5000

Keep this terminal OPEN.


🌐 Internet Deployment using Ngrok

Step 1 — Download Ngrok

https://ngrok.com/download


Step 2 — Add Auth Token

After signup:

ngrok config add-authtoken YOUR_AUTH_TOKEN

Step 3 — Start TCP Tunnel

Open another terminal:

ngrok tcp 5000

Example Output:

Forwarding tcp://0.tcp.in.ngrok.io:19345 -> localhost:5000

Keep this terminal OPEN.


💻 Client Configuration

Open:

modified_client.py

Update these lines:

SERVER_HOST = "0.tcp.in.ngrok.io"
SERVER_PORT = 19345

Replace with your own ngrok host and port.

Save the file.


▶️ Running Client

python modified_client.py

Steps:

  1. Enter username
  2. Enable encryption
  3. Enter shared password
  4. Click “Set Password”
  5. Click “Connect”

👥 Connecting Friend Across Internet

Send your friend:

  • modified_client.py

OR preferably:

  • modified_client.exe

Your friend should:

  1. Run client
  2. Enter username
  3. Enter same password
  4. Click Connect

🧊 Convert Client to EXE

Install requirements:

pip install pyinstaller cryptography

Generate EXE:

pyinstaller --onefile --windowed modified_client.py

Generated EXE location:

dist/modified_client.exe

📋 Chat Logs

All messages are automatically stored locally inside:

chat_logs/

Logs include:

  • Username
  • Timestamp
  • Messages

📸 Recommended Screenshots

  • Server running terminal
  • Ngrok tunnel
  • Client GUI
  • Multi-client communication
  • Encrypted communication
  • Online users list
  • Wrong password handling
  • Chat log generation

🔮 Future Enhancements

  • File Sharing
  • Private Messaging
  • Group Chat Rooms
  • Database Integration
  • Cloud Deployment
  • Mobile Application
  • Voice & Video Calling
  • TLS Secured Connections

🎯 Applications

  • Secure Internal Communication
  • Educational Networking Projects
  • Cybersecurity Demonstrations
  • Real-Time Messaging Systems
  • Lightweight Communication Platforms

👨‍💻 Author

Anmol B.E. Computer Science & Engineering Chandigarh College of Engineering & Technology (Degree Wing)


📄 License

This project is developed for academic and educational purposes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors