A professional, user-friendly desktop application for hiding and extracting secret messages within PNG images using advanced LSB (Least Significant Bit) steganography techniques.
SecureSteg is a powerful yet simple tool that allows you to securely conceal text messages inside PNG images without visible detection. The hidden messages remain completely invisible to the naked eye while being easily retrievable by authorized users.
- 🔒 Secure Encoding: Hide messages using LSB steganography
- 🔍 Easy Decoding: Extract hidden messages with one click
- 🎨 Multiple Input Methods:
- Drag & Drop support
- Copy & Paste functionality
- File browser integration
- 📁 PNG Exclusive: Optimized for PNG format (lossless compression)
- 💻 Modern GUI: Professional Tkinter-based interface
- 🚀 High Performance: Efficient numpy-based processing
- Python 3.12.0 or higher
pip install Pillow numpy tkinterdnd2python main.pysecure-steganography/
├── main.py # Application entry point
├── gui.py # Tkinter GUI implementation
├── steganography.py # Core encoding/decoding logic
├── file_handlers.py # File input/output operations
└── utils.py # Utility functions and constants
- Image Preparation: Convert PNG image to RGB mode and numpy array
- Message Conversion: Transform text message into binary format
- Capacity Check: Verify message fits within image capacity
- Length Storage: Encode message length in first 32 pixels (32 bits)
- Message Embedding: Hide message bits in LSBs of subsequent pixels
- Image Reconstruction: Save modified image with hidden message
- Image Analysis: Load and convert encoded image to numpy array
- Length Extraction: Read message length from first 32 pixels
- Message Recovery: Extract hidden bits from LSBs
- Binary Conversion: Transform binary back to readable text
# Core encoding operation
flat_array[i] = (flat_array[i] & ~1) | int(binary_message[i])
# Core decoding operation
message_bit = flat_array[i] & 1- Load Image: Drag & drop, paste, or browse for a PNG file
- Enter Message: Type your secret message in the text area
- Encode: Click "Encode Message" and choose save location
- Share: Distribute the encoded image - it looks identical!
- Load Encoded Image: Use any input method to load the image
- Decode: Click "Decode Message"
- View: The hidden message appears in the text area
- Modifies only the least significant bit of each color channel
- Changes are visually imperceptible (±1 value change)
- Uses 32-bit header to store message length
- Supports messages up to 4.2 billion characters
max_capacity = (width * height * 3 - 32) // 8 # characters- No visible image alteration
- Message length obfuscation
- Random distribution across image pixels
- Preservation of original image quality
- Processing Speed: ~1-5 seconds for typical images
- Image Quality: No visible degradation
- Message Capacity: Depends on image dimensions
- Format Support: PNG only (lossless preservation)
- Confidential Communication
- Digital Watermarking
- Data Hiding
- Educational Tool
- Security Research
We welcome contributions! Please feel free to submit pull requests or open issues for bugs and feature requests.
This project is licensed under the MIT License - see the LICENSE file for details.