Skip to content

Aditsharma12/Project_ghostkey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” StegoCrypt Web App

Image β€’ Audio β€’ Text Encryption & Steganography Tool

A Flask-based web application that enables secure text encryption, image steganography, and image–audio transformation using cryptographic techniques.


πŸš€ Features

  • πŸ”‘ Text Encryption / Decryption (Fernet + SHA-256)
  • πŸ–ΌοΈ Hide text inside images (LSB Steganography)
  • πŸ” Extract hidden messages from images
  • πŸ”Š Convert images to audio
  • πŸ” Recover images from audio
  • πŸ” Keyword-based secure transformations

πŸ—οΈ System Architecture

flowchart TD
    A[User Input] --> B[Flask App]
    B --> C{Mode Selection}

    C -->|Text Encrypt| D[Encrypt Text]
    C -->|Text Decrypt| E[Decrypt Text]

    C -->|Image Encrypt| F[Hide Text in Image]
    C -->|Image Decrypt| G[Extract Text from Image]

    C -->|Audio Encrypt| H[Image β†’ Audio]
    C -->|Audio Decrypt| I[Audio β†’ Image]

    D --> J[Output]
    E --> J
    F --> J
    G --> J
    H --> J
    I --> J
Loading

πŸ” Encryption Workflow

flowchart LR
    A[Keyword] --> B[SHA-256 Hash]
    B --> C[Base64 Key]
    C --> D[Fernet Encryption]
    D --> E[Encrypted Data]
Loading

πŸ–ΌοΈ Image Steganography (LSB)

flowchart TD
    A[Input Image] --> B[Convert to Pixels]
    B --> C[Encrypt Text]
    C --> D[Convert to Binary]
    D --> E[Embed in LSB]
    E --> F[Save Image]

    F --> G[Extract LSB]
    G --> H[Binary β†’ Text]
    H --> I[Decrypt Text]
Loading

πŸ”Š Image ↔ Audio Conversion

flowchart TD
    A[Image] --> B[Flatten Pixels]
    B --> C[Normalize Values]
    C --> D[Convert to Audio Wave]
    D --> E[Save WAV]

    E --> F[Load Audio]
    F --> G[Denormalize]
    G --> H[Reshape using Shape File]
    H --> I[Recovered Image]
Loading

πŸ“ Project Structure

project/
β”‚
β”œβ”€β”€ static/
β”‚   └── uploads/
β”‚
β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ base.html
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ tool.html
β”‚   β”œβ”€β”€ about.html
β”‚   β”œβ”€β”€ guide.html
β”‚   └── donate.html
β”‚
β”œβ”€β”€ app.py
β”œβ”€β”€ requirements.txt
└── README.md

βš™οΈ Installation

git clone https://github.com/your-username/stegocrypt.git
cd stegocrypt

python -m venv venv
source venv/bin/activate      # Linux/Mac
venv\Scripts\activate         # Windows

pip install -r requirements.txt

▢️ Run the App

python app.py

Open in browser:

http://127.0.0.1:5000/

πŸ› οΈ Usage

πŸ”‘ Text Encryption

  • Go to: /tool/text-encrypt
  • Enter text + keyword

πŸ”“ Text Decryption

  • Go to: /tool/text-decrypt

πŸ–ΌοΈ Hide Text in Image

  • Upload image + message + keyword
  • Download encrypted image

πŸ” Extract Hidden Text

  • Upload encoded image + keyword

πŸ”Š Image β†’ Audio

  • Upload image
  • Download .wav + .npy

πŸ” Audio β†’ Image

  • Upload .wav + .npy
  • Enter keyword β†’ recover image

πŸ” Security Details

  • Hashing: SHA-256
  • Encryption: Fernet (symmetric)
  • Steganography: LSB encoding
  • Key Derivation: Keyword β†’ Hash β†’ Key

⚠️ Limitations

  • Message size limited by image capacity
  • Shape file required for audio decoding
  • Incorrect keyword = decryption failure
  • Large files may impact performance

🧰 Tech Stack

  • Backend: Flask
  • Libraries:
    • cryptography
    • numpy
    • opencv-python
    • pillow
    • scipy

πŸ’‘ Future Enhancements

  • πŸ” User authentication
  • ☁️ Cloud storage (AWS S3)
  • πŸ“‘ API endpoints
  • 🎨 Drag & drop UI
  • πŸ€– AI-based image optimization

🀝 Contributing

fork β†’ clone β†’ create branch β†’ commit β†’ push β†’ PR

πŸ“œ License

MIT License


πŸ‘¨β€πŸ’» Author

Adit Sharma

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors