A simple and educational steganography tool for hiding encrypted text inside RGB images using XOR encryption and ASCII encoding.
stego-xor-rgb-encoder
allows you to:
- Encrypt a secret text using XOR cipher with a user-provided key.
- Embed the encrypted text into the pixel values of an RGB image.
- Extract and Decrypt the hidden message using the same key.
This combines encryption and steganography in a lightweight, easy-to-understand way.
- 🔐 XOR encryption with a customizable key
- 🎨 Embedding encrypted data into RGB pixels
- 🧩 Compatible with JPG, PNG, and similar formats
- 📘 Fully documented Jupyter Notebook for educational use
- Python 3.8+
- OpenCV (
cv2
) for image operations - NumPy
- Matplotlib for visual output
stego-xor-rgb-encoder/
├── stego-xor-rgb-encoder.ipynb # Fully commented notebook
├── encrypted_output.jpg # Sample result image (for quick access)
├── README.md # Project documentation (you're here)
├── LICENSE # MIT License
├── assets/ # Visual assets for demo
│ ├── original.jpg # Original unmodified image
│ ├── encrypted_output.jpg # Encrypted image with hidden text
git clone https://github.com/arshc0der/stego-xor-rgb-encoder.git
cd stego-xor-rgb-encoder
Open StegnoRGBImplementation.ipynb
in Jupyter and follow the step-by-step instructions.
secret_text = "hello"
encryption_key = "key123"
- Encrypt and embed each character via XOR using the key.
- Embedded values are hidden inside pixel channels.
- Extract and decrypt using the same key.
Original Image | Encrypted Image |
---|---|
![]() |
![]() |
This project is for educational purposes only and is not intended for secure communications. It lacks cryptographic rigor and should NOT be used in production. For real encryption, use proven algorithms (AES, RSA) via libraries like
cryptography
orPyCryptoDome
.
Licensed under the MIT License. See LICENSE
for details.
Contributions, bug reports, and enhancements are welcome! Please fork the repo and create a pull request.
arshc0der 📚 Exploring steganography & lightweight encryption methods