Flask backend for CipherMuse - Advanced steganography platform with AI generation and user authentication.
- User registration and login
- Password hashing with SHA-256
- Session management
- User-specific data storage
- Image Generation: Stable Diffusion v1.5 with MSE-840000 VAE
- Music Generation: Facebook's MusicGen-Small model
- Image Upscaling: SwinIR for enhanced quality (optional)
- Halloween Themes: Spooky, Gothic, Witch, and Zombie styles
- LSB Matching: Least Significant Bit steganography with PRNG positioning
- AES-256 Encryption: Password-based encryption with SHA-256 hashing
- Multi-format Support: Images (PNG, JPG, BMP) and Audio (WAV, MP3, M4A)
- User-specific file galleries
- Encrypted file storage and retrieval
- Download and preview functionality
- Install dependencies:
pip install -r requirements.txt- Download and place AI models in the models directory:
models/
├── v1-5-pruned-emaonly-fp16.safetensors # Stable Diffusion v1.5
├── vae-ft-mse-840000-ema-pruned.safetensors # MSE VAE
└── SwinIR.onnx # SwinIR upscaler (optional)
Model Sources:
- Stable Diffusion v1.5: Hugging Face
- MSE VAE: Hugging Face
- SwinIR: Official Repository
- MusicGen: Auto-downloaded from Hugging Face
- Run the server:
python app.pyServer starts on http://localhost:3001
POST /api/register- Create new user accountPOST /api/login- User login
GET /api/styles- Get available Halloween themesPOST /api/generate-image- Generate Halloween imagesPOST /api/generate-music- Generate spooky music
POST /api/encrypt-image- Hide message in AI-generated imagePOST /api/decrypt-image- Extract message from imagePOST /api/encrypt-audio- Hide message in AI-generated musicPOST /api/decrypt-audio- Extract message from audio
GET /api/gallery/<username>- Get user's galleryPOST /api/gallery/<username>- Save gallery dataGET /api/download/<filename>- Download encrypted files
- Python 3.8+
- CUDA-capable GPU (recommended, 6GB+ VRAM)
- 16GB+ RAM (8GB minimum)
- 20GB+ disk space for models and temporary files
- Stable Diffusion v1.5: RunwayML/Stability AI
- MusicGen-Small: Meta AI (Facebook Research)
- SwinIR: Jingyun Liang et al. (ETH Zurich)
- MSE VAE: Stability AI
- SHA-256 password hashing
- AES-256 message encryption
- LSB steganography with pseudo-random positioning
- User-isolated data storage
- Secure temporary file handling
- CORS protection
This project uses several open-source models:
- Stable Diffusion v1.5: CreativeML Open RAIL-M License
- MusicGen: MIT License
- SwinIR: Apache License 2.0
Please ensure compliance with respective model licenses when using this software.