A 7-layer encryption system supporting multiple file formats
Project description
Quantum Hydra Cipher v3.0
A powerful 7-layer encryption system that supports multiple file formats including text, PDF, images, videos, and audio files.
Features
-
7-Layer Military-Grade Encryption
- Salted Key Derivation (PBKDF2 with 150,000 iterations)
- Polyalphabetic Vigenère with Dynamic Alphabet Rotation (text only)
- Prime-Based Columnar Transposition
- SHA-512 XOR Stream Cipher
- 256-Byte S-Box Substitution
- 8-Round Feistel Network
- HMAC-SHA256 + CRC32 Integrity Verification
-
Multi-Format Support
- Text:
.txt - Documents:
.pdf - Images:
.jpg,.jpeg,.png,.gif,.bmp,.webp,.tiff - Videos:
.mp4,.mov,.avi,.mkv,.webm,.flv,.wmv - Audio:
.mp3,.wav,.flac,.aac,.ogg,.m4a,.wma
- Text:
-
Security Features
- Auto-delete original files after encryption
- Auto-delete encrypted files after decryption
- Timestamp tracking for all operations
- Integrity verification with HMAC and CRC32
- Password-based encryption with key stretching
Installation
As a Standalone Script
# Make executable
chmod +x quantum_hydra.py
# Run directly
python quantum_hydra.py
As a Python Package
# Install in development mode
pip install -e .
# Or install normally
pip install .
# Or install from PyPI (once published)
pip install quantum-hydra-cipher
Command Aliases
After installation, you can run the cipher using either command:
quantum-hydra # Full command
qhc # Short alias (Quantum Hydra Cipher)
Usage
Interactive Mode
python quantum_hydra.py
Follow the on-screen prompts to:
- Choose encryption or decryption
- Specify the directory containing your files
- Enter your master password
- Confirm the operation
Programmatic Usage
from quantum_hydra import QuantumHydraCipherV3
# Initialize cipher with password
cipher = QuantumHydraCipherV3("your-secure-password")
# Encrypt text
plaintext = "Secret message"
encrypted, salt = cipher.encrypt_text(plaintext, "message.txt")
# Encrypt binary file
with open("image.jpg", "rb") as f:
data = f.read()
encrypted, salt = cipher.encrypt_binary(data, "image.jpg")
# Decrypt
success, result = cipher.decrypt_data(encrypted, salt, is_binary=True)
File Format
Encrypted files are saved with the .qhc extension (Quantum Hydra Cipher). These files contain:
- Original filename
- File type information
- Encryption timestamp
- Encrypted data
- Salt for key derivation
- Integrity checksums
Security Warnings
⚠️ IMPORTANT:
- Original files are PERMANENTLY DELETED after encryption
- Encrypted files are PERMANENTLY DELETED after decryption
- REMEMBER YOUR PASSWORD - there is no recovery method
- Use strong, unique passwords for maximum security
- Keep backups of important files before encryption
Example Workflow
Encrypting Files
- Place your files in a directory
- Run the program and select "ENCODE"
- Enter the directory path
- Set a strong password
- Original files are encrypted to
.qhcformat and deleted
Decrypting Files
- Place
.qhcfiles in a directory - Run the program and select "DECODE"
- Enter the directory path
- Enter the same password used for encryption
- Files are restored to original format and
.qhcfiles are deleted
Technical Details
Encryption Process (Text Files)
- Derive 64-byte key from password using PBKDF2-HMAC-SHA512
- Apply polyalphabetic substitution using 52 shuffled alphabets
- Compress using zlib (level 9)
- Apply prime-based columnar transposition
- XOR with SHA-512 keystream
- Byte substitution using password-seeded S-Box
- 8-round Feistel network shuffle
- Add HMAC-SHA256 and CRC32 for integrity
Encryption Process (Binary Files)
Same as text files, but skips step 2 (polyalphabetic substitution) as it only applies to text.
Requirements
- Python 3.7 or higher
- No external dependencies (uses only standard library)
Author
Muhammad Sufiyan Baig
- Email: send.sufiyan@gmail.com
- GitHub: @muhammadsufiyanbaig
License
This software is provided as-is for educational and personal use under the MIT License.
Copyright (c) 2026 Muhammad Sufiyan Baig
Version History
- v3.0 - Added multi-format support (PDF, images, video, audio)
- v2.0 - Multi-file processing with auto-delete
- v1.0 - Initial 7-layer cipher implementation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quantum_hydra_cipher-3.0.0.tar.gz.
File metadata
- Download URL: quantum_hydra_cipher-3.0.0.tar.gz
- Upload date:
- Size: 21.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc6751d126b2a17b7a8f30351f5b1651730912c54878b15659b1d094fff6b892
|
|
| MD5 |
4048e949598cde6c43dc656c8434b458
|
|
| BLAKE2b-256 |
29e8ce53a44858cccf435ade5f1a093d134029c866277f5baab0fb0519de7525
|
File details
Details for the file quantum_hydra_cipher-3.0.0-py3-none-any.whl.
File metadata
- Download URL: quantum_hydra_cipher-3.0.0-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3ba0cb2527f7972cc3806825b519ed3ebf7e5ee52ecbaff33d08cf73bdc805d
|
|
| MD5 |
da173dd89139507bc41faa025b8ca04a
|
|
| BLAKE2b-256 |
b9af68190fba942b4cce52fa7df71fe691f014b102cb91e0e67e1a3b2bbd8206
|