Securing digital authenticity one pixel at a time ๐ผ๏ธโจ
Ever wondered if that stunning image online is authentic or AI-generated? AuthMark solves this by embedding cryptographically verifiable watermarks directly into images using advanced DCT (Discrete Cosine Transform) techniques. It's like a digital fingerprint that's nearly impossible to forge! ๐ต๏ธโโ๏ธ
- Ed25519 Digital Signatures: Each watermark is cryptographically signed and verifiable
- Tamper Detection: Know instantly if an image has been modified
- Non-repudiation: Prove the authenticity of your images beyond doubt
- Multi-core Processing: Leverages all your CPU cores for blazing speed
- Optimized AI Detection: ~0.2s average processing time with smart fallbacks
- Smart Memory Management: Handles large images without breaking a sweat
- JPEG Compression: Survives quality reduction and re-encoding
- Geometric Transforms: Resistant to cropping, rotation, and scaling
- Noise Attacks: Maintains integrity through various image manipulations
- Hierarchical Detection: DMimage โ Lightweight โ Statistical fallback
- Smart Model Management: Auto-detects model reliability and falls back gracefully
- Specialised Models: DMimageDetection for diffusion models, lightweight for general detection
- Real-time Processing: ~0.2s per image with intelligent caching
# Clone the magic โจ
git clone https://github.com/pottsie283/authmark.git
cd authmark/watermarking
# Set up your environment ๐
python -m venv AuthVenv
source AuthVenv/bin/activate # On Windows: AuthVenv\Scripts\activate
# Install dependencies ๐ฆ
pip install -r requirements.txt# Start the Flask server ๐
flask --app app.py run
# Visit the web interface ๐
# http://localhost:5000/- Upload & Watermark: Drop your image, enter your private key, and get a cryptographically signed watermarked image
- Verify Authenticity: Upload any image to check if it contains a valid watermark
- Robustness Testing: See how your watermarks survive various attacks
- A/B Study: Test your ability to distinguish watermarked vs. original images
Performance Monitoring:
# Check system performance ๐
curl http://localhost:5000/api/performance/stats
# Thread pool utilisation ๐งต
curl http://localhost:5000/api/threadpool/statsfrom core.crypto_utils import generate_key_pair
# Generate your cryptographic keys ๐๏ธ
private_key_pem, public_key_pem = generate_key_pair()
print("Your keys are ready! ๐")AuthMark/
โโโ ๐ Web Interface (Flask + HTML/CSS/JS)
โโโ ๐ REST API (Flask-RESTX with Swagger docs)
โโโ ๐ Core Engine
โ โโโ DCT Watermarking (Frequency domain embedding)
โ โโโ Cryptographic Binding (RSA signatures)
โ โโโ AI Anomaly Detection (Multi-method analysis)
โ โโโ Robustness Testing (Attack simulation)
โโโ โก Performance Layer
โ โโโ Multi-core Processing
โ โโโ Thread Pool Management
โ โโโ Real-time Monitoring
โโโ ๐งช Testing & Evaluation Suite
Test your watermarks against real-world scenarios:
- JPEG Compression (different quality levels)
- Geometric Attacks (rotation, scaling, cropping)
- Noise Injection (Gaussian, salt & pepper)
Challenge yourself:
- Can you spot the watermarked image?
- 10 randomised questions
- Detailed performance metrics
- Perfect for research and validation
Monitor everything in real-time:
- Processing speeds and bottlenecks
- Memory usage optimisation
- Thread pool utilisation
- Success/failure rates
โ
Invisible Watermarks: Imperceptible to human eyes (high PSNR/SSIM)
โ
Cryptographic Verification: RSA-2048 digital signatures
โ
Multi-format Support: JPEG, PNG, and more
โ
Batch Processing: Handle multiple images efficiently
โ
Attack Simulation: Built-in robustness testing
โ
Advanced AI Detection: Hierarchical detection with smart fallbacks
โ
Performance Monitoring: Real-time metrics and optimization
โ
RESTful API: Easy integration with other systems
โ
Interactive Web UI: No command-line expertise required
๐ซ Video Support: Currently image-only (video watermarking is future work)
๐ซ Key Management: In-memory only for demo purposes
๐ซ GPS Data: Sensitive EXIF fields are excluded for privacy
๐ซ Extreme Attacks: Some aggressive modifications may break watermarks
๐ซ Real-time Video: Not optimised for live video streams
- Production Key Storage: Use proper HSMs or key management services
- User Authentication: Basic demo authentication only
- Cloud Deployment: Configured for local development
- Commercial Licensing: Research/educational use focused
Perfect for:
- Digital Forensics: Prove image authenticity in investigations
- Copyright Protection: Protect your creative works
- Academic Research: Study watermarking robustness and perceptual quality
- AI Detection Studies: Research synthetic media identification
- Performance Analysis: Benchmark cryptographic watermarking systems
| Operation | Time | Details |
|---|---|---|
| AI Detection (DMimage) | ~0.1s | Specialized diffusion model detection |
| AI Detection (Lightweight) | ~0.2s | General AI content detection |
| AI Detection (Statistical) | ~0.05s | Fallback analysis when models unavailable |
| Watermark Embedding | ~2-5s | Multi-core DCT processing |
| Watermark Verification | ~1-3s | Optimized extraction |
- Synthetic Images: 100% detection rate (DMimage model)
- Authentic Images: 60% correct classification (lightweight model)
- Smart Fallback: Automatic model reliability detection
I'd love your help! Whether you're:
- ๐ Finding bugs
- ๐ก Suggesting features
- ๐ Improving documentation
- ๐งช Adding test cases
- โก Optimising performance
Check out the issues page and join the conversation!
MIT License - see LICENSE for details. Feel free to use this in your research, but please cite our work! ๐
This system was developed as part of advanced cryptographic research into verifiable digital media authenticity. It demonstrates practical applications of:
- Frequency-domain watermarking techniques
- Cryptographic binding and non-repudiation
- Multi-core optimisation strategies
- Hierarchical AI detection systems
- Perceptual quality assessment
If AuthMark helped you secure digital authenticity or advance your research, please give it a star! โญ It helps others discover this tool and motivates continued development.
Built with โค๏ธ for digital authenticity and security
"In a world of deepfakes and digital deception, AuthMark stands as a beacon of verifiable truth." ๐โจ