Skip to main content

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

    1. Salted Key Derivation (PBKDF2 with 150,000 iterations)
    2. Polyalphabetic Vigenère with Dynamic Alphabet Rotation (text only)
    3. Prime-Based Columnar Transposition
    4. SHA-512 XOR Stream Cipher
    5. 256-Byte S-Box Substitution
    6. 8-Round Feistel Network
    7. 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
  • 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:

  1. Choose encryption or decryption
  2. Specify the directory containing your files
  3. Enter your master password
  4. 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

  1. Place your files in a directory
  2. Run the program and select "ENCODE"
  3. Enter the directory path
  4. Set a strong password
  5. Original files are encrypted to .qhc format and deleted

Decrypting Files

  1. Place .qhc files in a directory
  2. Run the program and select "DECODE"
  3. Enter the directory path
  4. Enter the same password used for encryption
  5. Files are restored to original format and .qhc files are deleted

Technical Details

Encryption Process (Text Files)

  1. Derive 64-byte key from password using PBKDF2-HMAC-SHA512
  2. Apply polyalphabetic substitution using 52 shuffled alphabets
  3. Compress using zlib (level 9)
  4. Apply prime-based columnar transposition
  5. XOR with SHA-512 keystream
  6. Byte substitution using password-seeded S-Box
  7. 8-round Feistel network shuffle
  8. 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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quantum_hydra_cipher-3.0.0.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quantum_hydra_cipher-3.0.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

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

Hashes for quantum_hydra_cipher-3.0.0.tar.gz
Algorithm Hash digest
SHA256 cc6751d126b2a17b7a8f30351f5b1651730912c54878b15659b1d094fff6b892
MD5 4048e949598cde6c43dc656c8434b458
BLAKE2b-256 29e8ce53a44858cccf435ade5f1a093d134029c866277f5baab0fb0519de7525

See more details on using hashes here.

File details

Details for the file quantum_hydra_cipher-3.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for quantum_hydra_cipher-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b3ba0cb2527f7972cc3806825b519ed3ebf7e5ee52ecbaff33d08cf73bdc805d
MD5 da173dd89139507bc41faa025b8ca04a
BLAKE2b-256 b9af68190fba942b4cce52fa7df71fe691f014b102cb91e0e67e1a3b2bbd8206

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page