MAVIS (Media Authentication, Verification and Integrity System) is an image steganography toolkit that uses advanced wavelet-based DCT watermarking combined with QR codes, Reed-Solomon Encoding and GAN-based watermarking to embed invisible, tamper-resistant data into images. The project provides a web-based Gradio UI for embedding, extracting, and benchmarking watermarks.
Note
We are still awaiting the publish of our research paper behind this project which was presented at the MIND 2025 conference.
- π Cryptographic Image Signing - Device-level image hash signing with RSA key pairs.
- π Wavelet-DCT Watermarking - Resilient invisible watermarks that survive compression and social media sharing.
- π± QR Code Embedding - Encodes provenance data in QR codes embedded as watermarks.
- π Certificate Generation - Creates tamper-proof certificates with timestamps, user info, and device data.
- β Image Verification - Extracts and validates embedded watermarks and certificates.
- Python 3.10+
- uv (recommended) or pip
- ZBar library (for QR code reading)
# Clone the repository
git clone git@github.com:Project-MAVIS/MAVIS.git
cd MAVIS
# Install dependencies
make install
# Start the Gradio web UI
python3 -m mavis.demo.demo_uiThe UI will be available at http://localhost:7860
# Clone the repository
git clone <repository-url>
cd MAVIS
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install the project
pip install -e .
# Start the Gradio web UI
python3 -m mavis.demo.demo_uiMAVIS provides a Gradio-based demo UI with two main workflows: Image Capture & Certification and Image Verification.
This tab emulates an iPhone's camera and Secure Enclave to demonstrate the full image certification process:
-
Device Registration
- The system emulates an iPhone's Secure Enclave, generating an RSA key pair
- The private key remains inaccessible (hardware-protected), only the public key is shared
- A unique User ID and Device ID are assigned to the registered device
-
Image Capture & Signing
- User captures/uploads an image (emulating an iPhone camera)
- Before the image becomes accessible, it is signed using the Secure Enclave's private key
- The signed image hash + public key are sent to the MAVIS server
-
Server-Side Processing
- The server verifies the signature using the public key to confirm image integrity
- A certificate is created containing: timestamp, image ID, user ID, device ID, username, and device name
- The certificate is hashed and converted to a QR code
-
Watermark Embedding
- The QR code (containing the certificate hash) is invisibly embedded into the image using DWT-DCT steganography
- The encrypted certificate is stored in the image's EXIF metadata
- Both the original image and certificate are stored in the server database
-
Output
- The certified image is returned to the user
- This image can be shared anywhere while retaining its provenance data
This tab allows users to verify the authenticity of any image:
-
Upload Image
- User uploads an image to the verification tab
-
Primary Verification (EXIF + QR)
- Server extracts the encrypted certificate from the EXIF metadata
- Server decrypts and parses the certificate
- Server extracts the certificate hash from the embedded QR watermark
- If the extracted hash matches the certificate hash β Image Verified β
-
WhatsApp Scenario (Metadata Stripped)
- If EXIF metadata is missing (e.g., image was shared via WhatsApp)
- The QR code hash is extracted from the pixels
- This hash is used to look up the original certificate and image from the database
- The server returns:
- The uploaded image
- The original certified image
- The certificate information
- User can compare and verify authenticity
This repository contains only the final codebase of the project1.
MAVIS/
βββ mavis/ # Main package
β βββ algorithms/ # Steganography algorithms
β β βββ core/ # Core utilities
β β β βββ qr_code.py # QR code generation & DWT-DCT embedding
β β β βββ reed_solomon.py # Reed-Solomon error correction
β β βββ qr_steganography.py # QR-based steganography method
β β βββ rs_steganography.py # Reed-Solomon steganography method
β β βββ steganography_interface.py # Abstract base class
β βββ benchmark/ # Benchmarking utilities
β β βββ benchmark.py
β βββ cmd/ # Command-line interface
β β βββ ui.py # UI launcher entry point
β βββ ui/ # Gradio web interface
β βββ ui.py # Main Gradio app
βββ scripts/ # Setup scripts
β βββ keys.sh # RSA key pair generation
β βββ setup.sh # Legacy setup script
βββ scratch/ # Experimental/demo code
βββ pyproject.toml # Project configuration & dependencies
βββ Makefile # Development commands
βββ uv.lock # Dependency lock file
MAVIS uses a Wavelet-DCT (Discrete Cosine Transform) hybrid approach:
- Wavelet Decomposition - Image is decomposed using PyWavelets (DWT)
- QR Code Generation - Payload data is encoded into a QR code
- DCT Transform - Applied to wavelet subband coefficients
- Embedding - QR code is embedded in mid-frequency coefficients (robust to compression)
- Reconstruction - Image is reconstructed with minimal visual artifacts
| Parameter | Default Value | Description |
|---|---|---|
alpha |
25.0 |
Embedding strength |
wavelet |
db4 |
Wavelet type (Daubechies-4) |
subband |
HL |
Wavelet subband for embedding |
repetitions |
1 |
Number of embedding repetitions |
- β JPEG compression (up to 70% quality)
- β Social media compression (WhatsApp, Instagram)
- β Minor cropping and resizing
- β Color adjustments
ββββββββββββββββββββββββββββββββββββββββββββββββ
β cert_len β timestamp β image_id β user_id β
β device_id β username β device_name β
ββββββββββββββββββββββββββββββββββββββββββββββββ
The benchmark tab calculates:
- PSNR (Peak Signal-to-Noise Ratio) - Image quality metric
- SSIM (Structural Similarity Index) - Perceptual quality metric
- BER (Bit Error Rate) - Payload accuracy
- Exact Match - Whether extracted payload matches original
- Omkar Wagholikar - omkarrwagholikar@gmail.com
- Shantanu Wable - shantanuwable2003@gmail.com
- Soaham Pimparkar - soahampimparkar@gmail.com
- Chinmay Patil - crpatil1901@gmail.com
This project is licensed under the MIT License - see the LICENSE file for details.
- PyWavelets - Wavelet transforms
- Gradio - Web UI framework
- QReader - QR code reading
- Pillow - Image processing
- scikit-image - Image quality metrics.
ZBar is required for opencv2 to detect Reed-Solomon code during extraction.
macOS:
brew install zbar
export DYLD_LIBRARY_PATH=$(brew --prefix zbar)/lib:$DYLD_LIBRARY_PATHUbuntu/Debian:
sudo apt-get install libzbar0Windows:
ZBar is included via the pyzbar package - no additional installation needed.
Footnotes
-
The majority of the code in this repository was written during development, in another repository, but was later ported to this repository for better organization and to keep the codebase clean. β©

