A high-performance, modern steganography application that allows you to securely embed and extract hidden messages in images, audio files, and text using advanced LSB (Least Significant Bit) techniques.
- ๐ผ๏ธ Image Steganography - Hide and extract messages from PNG/JPG/JPEG images
- ๐ต Audio Steganography - Hide and extract messages from WAV audio files
- ๐ Text Steganography - Hide messages in text using zero-width Unicode characters
- โก Lightning Fast - Optimized with NumPy vectorized operations (1000x faster)
- ๐จ Modern UI - Beautiful gradient design with smooth animations
- ๐ฑ Responsive - Works seamlessly on desktop and mobile devices
- ๐ Secure - Files processed locally, no data retention
- Python 3.8+ - Download Python
- Node.js 16+ - Download Node.js
- npm or yarn - Comes with Node.js
-
Clone the repository
git clone https://github.com/yourusername/steganography.git cd steganography -
Set up the Backend (Flask API)
cd backend pip install -r requirements.txt python app.pyThe Flask API will start on
http://localhost:5000 -
Set up the Frontend (React)
Open a new terminal window:
cd frontend npm install npm run devThe React app will start on
http://localhost:3000 -
Open your browser
Navigate to
http://localhost:3000and start hiding messages! ๐
Embedding a Message:
- Click on the "Image" tab
- Select "Embed Message" mode
- Upload an image file (PNG, JPG, JPEG)
- Type your secret message in the text area
- Click "๐ Embed Message"
- Download the encoded image
Extracting a Message:
- Click on the "Image" tab
- Select "Extract Message" mode
- Upload the previously encoded image
- Click "๐ Extract Message"
- Your hidden message will be revealed!
Embedding a Message:
- Click on the "Audio" tab
- Select "Embed Message" mode
- Upload a WAV audio file
- Type your secret message
- Click "๐ Embed Message"
- Download the encoded audio file
Extracting a Message:
- Click on the "Audio" tab
- Select "Extract Message" mode
- Upload the encoded audio file
- Click "๐ Extract Message"
- View your hidden message
Embedding a Message:
- Click on the "Text" tab
- Select "Embed Message" mode
- Enter cover text (optional - can be empty)
- Enter your secret message
- Click "๐ Embed Message"
- Copy the encoded text (looks identical to original!)
Extracting a Message:
- Click on the "Text" tab
- Select "Extract Message" mode
- Paste the encoded text
- Click "๐ Extract Message"
- Your hidden message appears!
steganography/
โโโ backend/
โ โโโ app.py # Flask API server with optimized algorithms
โ โโโ requirements.txt # Python dependencies
โ โโโ uploads/ # Temporary upload folder (auto-created)
โ โโโ outputs/ # Temporary output folder (auto-created)
โโโ frontend/
โ โโโ src/
โ โ โโโ components/
โ โ โ โโโ ImageSteganography.jsx
โ โ โ โโโ AudioSteganography.jsx
โ โ โ โโโ TextSteganography.jsx
โ โ โโโ App.jsx # Main application component
โ โ โโโ App.css # Styling with gradients
โ โ โโโ main.jsx # React entry point
โ โโโ index.html # HTML template
โ โโโ package.json # Node dependencies
โ โโโ vite.config.js # Vite configuration
โโโ Tool-steganography/ # Original standalone script
โ โโโ script.py
โโโ README.md # This file
โโโ QUICKSTART.md # Quick start guide
โโโ README_SETUP.md # Detailed setup guide
- GET
/api/health- Check if the API is running
-
POST
/api/image/embed- Embed a message in an image- Form Data:
file(image),message(text) - Returns: Base64 encoded image
- Form Data:
-
POST
/api/image/extract- Extract a message from an image- Form Data:
file(image) - Returns: Hidden message
- Form Data:
-
POST
/api/audio/embed- Embed a message in audio- Form Data:
file(WAV audio),message(text) - Returns: Base64 encoded audio
- Form Data:
-
POST
/api/audio/extract- Extract a message from audio- Form Data:
file(WAV audio) - Returns: Hidden message
- Form Data:
-
POST
/api/text/embed- Embed a message in text- JSON:
coverText,secretMessage - Returns: Encoded text with zero-width characters
- JSON:
-
POST
/api/text/extract- Extract a message from text- JSON:
encodedText - Returns: Hidden message
- JSON:
- Flask 3.0.0 - Lightweight web framework
- Flask-CORS 4.0.0 - Handle cross-origin requests
- Pillow 10.1.0 - Advanced image processing
- NumPy 1.26.2 - High-performance numerical operations
- SciPy 1.11.4 - Audio file processing
- Werkzeug 3.0.1 - WSGI utilities
- React 18.2 - Modern UI library
- Vite 5.0 - Lightning-fast build tool
- Axios 1.6.2 - Promise-based HTTP client
- CSS3 - Modern styling with gradients and animations
This tool has been heavily optimized for speed:
- Vectorized Operations: Using NumPy array operations instead of Python loops
- Early Termination: Stops processing as soon as the message is found
- Efficient Bit Manipulation: Using
np.unpackbits()andnp.packbits() - Smart Chunking: Only processes necessary data (max 10,000 characters)
- Result: ~1000x faster than naive implementations!
- Image Extraction: < 50ms (previously 10+ seconds)
- Audio Extraction: < 100ms (previously 1+ minutes)
- Embedding: < 200ms for typical files
- Embedding: Converts the message to binary and replaces the least significant bit (LSB) of each pixel/sample
- Extraction: Reads the LSB of each pixel/sample until the null terminator is found
- Advantage: Changes are imperceptible to human eyes/ears
- Embedding: Converts message to binary and encodes using zero-width Unicode characters (
\u200B,\u200C) - Extraction: Detects and decodes zero-width characters back to the original message
- Advantage: Completely invisible in normal text display
Problem: ModuleNotFoundError when starting the backend
# Solution: Install dependencies
cd backend
pip install -r requirements.txtProblem: Port 5000 already in use
# Solution: Change port in backend/app.py (line 287)
app.run(debug=True, port=5001) # Use a different portProblem: npm install fails
# Solution: Clear npm cache and retry
npm cache clean --force
npm installProblem: Port 3000 already in use
# Solution: Vite will automatically suggest another port (5173)
# Or set a specific port in vite.config.js- Ensure the backend is running before starting the frontend
- Flask-CORS is configured to allow all origins by default
- Check that the backend URL in frontend components matches your backend server
-
File Size: Ensure images/audio files are large enough to hold your message
- Rule of thumb: 1 character requires 8 pixels/samples
- Example: A 100-character message needs at least 800 pixels
-
Image Format: PNG is recommended over JPG for image steganography
- JPG compression can corrupt embedded data
- PNG is lossless and preserves hidden messages
-
Audio Format: Only WAV files are supported for audio steganography
- MP3/AAC compression will destroy hidden data
-
Security: This tool is for educational purposes
- LSB steganography is detectable with proper analysis
- Not recommended for highly sensitive data
- Consider encryption before embedding for better security
- Add encryption option (AES-256) before embedding
- Support for MP4 video steganography
- Password protection for messages
- Batch processing for multiple files
- Advanced steganalysis detection
- File compression before embedding
- Docker containerization
- Cloud deployment guide
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by classical steganography techniques
- Built with modern web technologies
- Optimized for performance and user experience
For questions or support, please open an issue on GitHub.
โญ If you find this project useful, please consider giving it a star!
Made with โค๏ธ by rooter a.k.a Harsh Sandilya.