Skip to content

yahya-badar/secure-crypt-pro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🔐 SecureCrypt Pro

A professional-grade desktop encryption suite built with Python and Tkinter, implementing 8 classical and modern cryptographic algorithms in a single unified interface.

Python Tkinter SQLite License


📸 Features at a Glance

Tab What it does
👤 Account Register / Login with SHA-256 hashed passwords
🔠 Text Ciphers Encrypt / Decrypt typed text using 8 algorithms
📄 Documents Load and encrypt .txt and .docx files
🖼️ Images OCR text extraction + XOR image encryption
📊 Activity Full searchable log of all cryptographic operations

🧠 About The Project

SecureCrypt Pro is a university semester project for the course Introduction to Information Security (CS-312). It consolidates multiple cryptographic tools — text encryption, OCR-powered data ingestion, document processing, and secure activity logging — into a single cohesive desktop application.

Why we built it: Most cryptographic tools are CLI-based and inaccessible to non-technical users. SecureCrypt Pro bridges that gap with a modern card-based GUI that makes classical and modern algorithms easy to understand and use.


🔑 Implemented Algorithms

Algorithm Type Key Required Notes
Caesar Cipher Classical Substitution Integer shift Shifts each letter by N positions
Vigenère Cipher Polyalphabetic Substitution Keyword string Repeating keyword shifts
Playfair Cipher Digraph Substitution Keyword string 5×5 matrix, digraph pairs
Rail Fence Cipher Transposition Integer (rails) Zig-zag pattern transposition
Affine Cipher Monoalphabetic Substitution Two integers (a, b) (ax + b) mod 26
Simple Substitution Custom Substitution Key string Shuffled alphabet mapping
Base64 Encoding None Standard Base64 encode/decode
XOR Cipher Bitwise Key string Bit-flipping with key cycling

🏗️ Architecture

securecrypt-pro/
│
├── main.py              ← Single-file application (all logic here)
│   │
│   ├── Config           ← Colors, fonts, global constants
│   ├── Cipher Functions ← 8 standalone cipher implementations
│   ├── UserAuth         ← SQLite-backed login with SHA-256 hashing
│   ├── FileProcessor    ← .txt / .docx / image / binary file reader
│   ├── HistoryManager   ← SQLite activity log with export support
│   └── EncryptionApp    ← Main Tkinter window & all UI tabs
│
├── requirements.txt     ← Python dependencies
├── .gitignore
└── README.md

Note: users.db and history.db are created automatically on first run. They are excluded from this repository via .gitignore to protect user data.


⚙️ Installation & Setup

Prerequisites

Step 1 — Clone the repository

git clone https://github.com/YOUR-USERNAME/securecrypt-pro.git
cd securecrypt-pro

Step 2 — Install Python dependencies

pip install -r requirements.txt

Step 3 — Install Tesseract OCR

Download and install from: https://github.com/UB-Mannheim/tesseract/wiki

The app auto-detects Tesseract from these common paths:

  • C:\Program Files\Tesseract-OCR\tesseract.exe
  • C:\Program Files (x86)\Tesseract-OCR\tesseract.exe

Step 4 — Run the application

python main.py

🚀 Usage

First Time — Create an Account

  1. Launch the app — you'll land on the Account tab
  2. Click "Create Account"
  3. Enter a username and password → click "Create Account"
  4. Switch to "Sign In" tab and login
  5. All other tabs unlock after login

Encrypting Text

  1. Go to the 🔠 Text Ciphers tab
  2. Select your algorithm from the left panel
  3. Enter your key (shift number for Caesar, keyword for Vigenère, etc.)
  4. Type or paste your text in the Input Text box
  5. Click 🔒 Encrypt — result appears in Output Text
  6. Click 📋 Copy to copy to clipboard

Key Guide per Algorithm

Algorithm Key Format Example
Caesar Integer 13
Vigenère Word SECRET
Playfair Word KEYWORD
Rail Fence Integer (rails) 3
Affine Two integers separated by space 5 8
Substitution Any string myKey123
Base64 No key needed (leave blank)
XOR Any string myKey

Encrypting a File

  1. Go to 📄 Documents tab
  2. Click 📂 Browse → select your .txt or .docx file
  3. Click 👁️ Read File to preview it
  4. Choose your cipher in the 🔠 Text Ciphers tab (key applies here)
  5. Click 🔒 Encrypt File — saves as filename_ENCRYPTED.txt

OCR Text Extraction

  1. Go to 🖼️ Images tab
  2. Click 📂 Browse → select an image containing text
  3. Click 🔤 Extract Text — Tesseract extracts visible text
  4. Text appears in the box below and can be copied to the cipher tab

🗄️ Database Schema

users.db

CREATE TABLE users (
    id               INTEGER PRIMARY KEY AUTOINCREMENT,
    username         TEXT UNIQUE NOT NULL,
    password_hash    TEXT NOT NULL,   -- SHA-256 hash, never plaintext
    created_at       TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

history.db

CREATE TABLE history (
    id         INTEGER PRIMARY KEY AUTOINCREMENT,
    username   TEXT NOT NULL,
    timestamp  TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    operation  TEXT NOT NULL,    -- encrypt_text / decrypt_text / read_file / etc.
    cipher     TEXT,             -- caesar / vigenere / playfair / etc.
    key_used   TEXT,
    filename   TEXT,
    details    TEXT
);

👥 Team

Name Role
Lead System Architect & UI/UX Designer Presentation Layer — Theme-aware GUI
Cryptographic Logic & Data Processing Engineer Logic Layer — All cipher implementations
Security Architect & Database Administrator Data Layer — SHA-256 Auth & SQLite

Course: Introduction to Information Security (CS-312) Instructor: Ms. Wasifa Kanwal


⚠️ Disclaimer

This project is built for educational purposes as part of a university course on information security. The classical ciphers implemented (Caesar, Vigenère, Playfair, etc.) are not suitable for real-world security applications. For production-grade encryption, use AES-256 or RSA via established libraries.


📄 License

This project is licensed under the MIT License.


📚 References

  1. Stallings, W. Cryptography and Network Security: Principles and Practice
  2. Python Tkinter Documentation
  3. Tesseract OCR
  4. PyCryptodome Documentation

About

A professional desktop encryption suite implementing 8 classical & modern cryptographic algorithms with OCR, file encryption, and activity logging — built with Python & Tkinter

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages