StegoCrypt is more than just a steganography tool; it is a digital safe designed to protect your privacy.
It allows you to securely encrypt any file (PDF, ZIP, TXT, etc.) using military-grade AES-256 encryption and hide it invisibly within the pixels of a standard PNG image using LSB (Least Significant Bit) manipulation.
Whether you are a cybersecurity enthusiast, an engineer, or someone who values privacy, StegoCrypt provides a robust "Security through Obscurity" solution.
StegoCrypt operates on a dual-layer security architecture. It doesn't just hide your file; it locks it in a titanium box before burying it.
Before any data touches the image, it goes through a rigorous encryption process:
- Key Derivation: Your password is hashed using SHA-256 to create a 32-byte cryptographic key.
- Encryption: The file data, filename, and size are packaged together using a binary
structprotocol. This package is then encrypted using AES-256 (CBC Mode). - Result: Even if someone extracts the data from the image, they will only see meaningless random noise without your password.
This is where the magic happens. The encrypted binary data is injected into the Least Significant Bits of the image's pixels.
- The Logic: A digital image is made of pixels, and each pixel has Red, Green, and Blue (RGB) values (0-255).
- The Trick: Changing a value from
255(11111111) to254(11111110) is invisible to the human eye but perfect for storing binary data. - Capacity: StegoCrypt utilizes all 3 color channels, storing 3 bits of data per pixel.
graph LR
subgraph Original_Pixel [Original Pixel]
direction TB
A[Red Channel<br>1011001<b>1</b>]
end
subgraph Secret_Data [Secret Data]
direction TB
B[Binary Bit<br><b>0</b>]
end
subgraph Modified_Pixel [Modified Pixel]
direction TB
C[Red Channel<br>1011001<b>0</b>]
end
A -->|LSB Replacement| C
B -->|Inject| C
C -->|Visual Check| D[No Visible Change ποΈ]
%% Stillendirme: Arka plan renkleri + Siyah YazΔ± (color:#000)
style A fill:#ff9999,stroke:#333,stroke-width:2px,color:#000
style B fill:#ffff99,stroke:#333,stroke-width:2px,color:#000
style C fill:#9999ff,stroke:#333,stroke-width:2px,color:#000
style D fill:#ffffff,stroke:#333,stroke-width:2px,color:#000,stroke-dasharray: 5 5
(Visualization of how bit manipulation works on pixel level)
StegoCrypt is built with a modular approach to ensure maintainability and separation of concerns:
StegoCrypt/
βββ main.py # Entry point of the application
βββ gui.py # Frontend logic (CustomTkinter, Threading)
βββ crypto.py # Backend logic: AES-256 Encryption/Decryption
βββ stego.py # Backend logic: LSB Image Encoding/Decoding
βββ version_maker.py # Utility script for generating Windows version info
βββ requirements.txt # Python dependencies
βββ app.ico # Application icon
- π‘οΈ Military-Grade Security: Data is unreadable without the password, thanks to AES-256.
- π Any File Support: Embed not just text, but PDF, ZIP, DOCX, or any binary file.
- π¨ Professional UI: A sleek, dark-themed interface built with
CustomTkinterfeaturing a responsive card layout. - β‘ Non-Blocking Performance: Built on a multi-threaded architecture, ensuring the UI remains responsive and provides real-time progress updates during heavy operations.
- π§ Smart Optimization: Optimized algorithms allow processing of high-resolution (4K) images in seconds.
- π§© Data Integrity: Custom binary protocol handles file names and sizes automatically, ensuring flawless extraction.
Scenario: You have a confidential PDF contract (
contract.pdf) and you want to send it safely inside a photo of a landscape.
- Launch the application:
python main.py - Select Cover Image: Choose a PNG or JPG image. This will be the "container."
- Select Secret File: Pick the file you want to hide (e.g.,
contract.pdf). - Set Password: Enter a strong password. Do not forget this!
- Run: Click π ENCRYPT & EMBED. StegoCrypt will generate a new PNG image. It looks identical to the original, but it holds your secret.
Scenario: You received a suspicious-looking PNG image and you have the password.
- Switch to the Decrypt & Extract tab.
- Select Encrypted Image: Choose the PNG file created in the previous step.
- Enter Password: Type the exact password used for encryption.
- Run: Click π DECRYPT & EXTRACT.
- Success: The tool will extract the hidden data, decrypt it, and save the original
contract.pdfto your computer.
You can download the .exe file directly and run it instantly.
Latest Version: v1.0.0 (Official Release)
- Click the link below to visit the Releases page.
- Download
StegoCrypt.exefrom the "Assets" section. - Double-click to run! (Portable app, no installation needed).
Download StegoCrypt v1.0.0 Here
- Python 3.8 or higher
- pip (Python Package Installer)
-
Clone the repository:
git clone [https://github.com/tturkayy/StegoCrypt.git](https://github.com/tturkayy/StegoCrypt.git) cd StegoCrypt -
Install dependencies:
pip install -r requirements.txt
(If you don't have the text file, simply run:
pip install customtkinter pillow pycryptodome) -
Run the app:
python main.py
Want to run StegoCrypt on a PC without Python? You can build a standalone executable:
- Install the builder tools:
pip install pyinstaller pyinstaller-versionfile
- Generate the executable (Make sure
app.icois in the folder):pyinstaller --noconsole --onefile --name="StegoCrypt" --icon="app.ico" --add-data "app.ico;." --version-file="file_version_info.txt" --collect-all customtkinter main.py
- Find your app in the
dist/folder!
How do you know if your secret file will fit into a specific image? StegoCrypt uses a deterministic approach based on the image resolution.
Since we utilize the Least Significant Bit (LSB) of each color channel (Red, Green, Blue), every single pixel can store 3 bits of data.
To calculate the maximum byte capacity of an image, use this engineering formula:
- Width x Height: Total pixel count.
- x 3: Bits per pixel (R, G, B channels).
- / 8: Converts bits to bytes.
Here is a reference table to help you choose the right cover image:
| Image Resolution | Dimensions | Total Pixels | Max Data Capacity |
|---|---|---|---|
| HD (720p) | 1280 x 720 | ~0.9 MP | ~345 KB |
| Full HD (1080p) | 1920 x 1080 | ~2.0 MP | ~777 KB |
| 2K (QHD) | 2560 x 1440 | ~3.6 MP | ~1.3 MB |
| 4K (UHD) | 3840 x 2160 | ~8.3 MP | ~3.1 MB |
Pro Tip: Always choose an image slightly larger than the required capacity to account for the encryption header and file metadata overhead.
- Compression is the Enemy: Steganography relies on precise pixel values. Services like WhatsApp, Facebook, or Instagram compress images, which destroys the LSB data.
- Solution: Always share the output image as a File/Document or inside a ZIP archive.
- Capacity Limits: The cover image must be large enough to hold your data.
- Rule of Thumb: The image file size (PNG) should be approx. 8x larger than the secret file.
Q: I forgot my encryption password. Can I recover my file?
A: No. StegoCrypt uses AES-256, which is mathematically impossible to crack within a human lifetime without the key. There is no backdoor.
Q: The extracted file is corrupted or empty.
A: This usually happens if the image was compressed (e.g., sent via WhatsApp) or resized. Ensure the image has not been modified after encryption.
Q: The UI freezes during encryption.
A: This should not happen as the tool is multi-threaded. If it does, ensure you are not processing a massive file (e.g., >500MB) on a low-RAM machine.
This project is open-source and licensed under the MIT License. Feel free to fork, modify, and distribute.
This tool is designed for educational purposes and legitimate privacy protection only. The developer is not responsible for any misuse of this software for malicious activities.
Developed by Turkay Yildirim

