Skip to content

vithula30/ciphermuse

Repository files navigation

CipherMuse Backend

Flask backend for CipherMuse - Advanced steganography platform with AI generation and user authentication.

Features

🔐 Authentication System

  • User registration and login
  • Password hashing with SHA-256
  • Session management
  • User-specific data storage

🎨 AI Content Generation

  • 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

🔒 Advanced Steganography

  • 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)

📁 Gallery Management

  • User-specific file galleries
  • Encrypted file storage and retrieval
  • Download and preview functionality

Setup

  1. Install dependencies:
pip install -r requirements.txt
  1. 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:

  1. Run the server:
python app.py

Server starts on http://localhost:3001

API Endpoints

Authentication

  • POST /api/register - Create new user account
  • POST /api/login - User login

Content Generation

  • GET /api/styles - Get available Halloween themes
  • POST /api/generate-image - Generate Halloween images
  • POST /api/generate-music - Generate spooky music

Steganography

  • POST /api/encrypt-image - Hide message in AI-generated image
  • POST /api/decrypt-image - Extract message from image
  • POST /api/encrypt-audio - Hide message in AI-generated music
  • POST /api/decrypt-audio - Extract message from audio

File Management

  • GET /api/gallery/<username> - Get user's gallery
  • POST /api/gallery/<username> - Save gallery data
  • GET /api/download/<filename> - Download encrypted files

System Requirements

  • Python 3.8+
  • CUDA-capable GPU (recommended, 6GB+ VRAM)
  • 16GB+ RAM (8GB minimum)
  • 20GB+ disk space for models and temporary files

Model Credits

  • Stable Diffusion v1.5: RunwayML/Stability AI
  • MusicGen-Small: Meta AI (Facebook Research)
  • SwinIR: Jingyun Liang et al. (ETH Zurich)
  • MSE VAE: Stability AI

Security Features

  • SHA-256 password hashing
  • AES-256 message encryption
  • LSB steganography with pseudo-random positioning
  • User-isolated data storage
  • Secure temporary file handling
  • CORS protection

License & Attribution

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •