State-of-the-Art Interactive Visual Encryption Suite
Cryptix is a high-performance, cryptographically secure tool designed to obfuscate visual data by encrypting the raw pixel matrices of images. Unlike simple filters or password-protected archives, Cryptix leverages the XChaCha20 stream cipher to transform images into mathematically randomized noise, rendering them completely unreadable without the unique decryption key.
Explore the Code • Installation • Usage
- Military-Grade Encryption: Utilizes
XChaCha20, a modern stream cipher known for its speed and security, providing a 256-bit key and a 192-bit nonce. - Lossless Pixel Manipulation: Operates directly on the RGBA byte stream. By enforcing
.pngoutput, Cryptix ensures that not a single bit of encrypted data is lost to compression artifacts. - Zero-Trace Memory: Implements the
zeroizetrait to securely wipe sensitive keys from RAM immediately after use, preventing cold-boot attacks. - Sleek TUI Experience: A polished Terminal User Interface (TUI) featuring neon aesthetics, interactive prompts, and real-time progress tracking.
- Smart Key Management: Generates compact, URL-safe Base64 bundles that combine the key and nonce for easy portability.
Cryptix does not encrypt the file container; it encrypts the visual data itself.
- Decoding: The image is loaded into a raw RGBA8 buffer.
- Keystream Generation: XChaCha20 generates a pseudo-random stream of bytes based on a 32-byte key and a 24-byte nonce.
- XOR Splicing: The image buffer is XORed with the keystream. Because XOR is its own inverse, applying the same keystream a second time restores the original image.
- Lossless Serialization: The resulting "noise" is saved as a PNG to ensure the encrypted bytes are preserved exactly as they are.
| Component | Specification | Detail |
|---|---|---|
| Cipher | XChaCha20 | IETF variant for high-security stream encryption |
| Key Length | 256-bit | Generated via OsRng (Cryptographically Secure PRNG) |
| Nonce | 192-bit | Unique per image to prevent keystream reuse attacks |
| Memory | Zeroize |
Guaranteed erasure of keys from memory upon Drop |
| Encoding | Base64 URL-Safe | No-pad encoding for maximum compatibility |
Ensure you have the Rust toolchain installed on your system.
# Clone the repository
git clone https://github.com/yourusername/cryptix.git
cd cryptix
# Build in release mode for maximum performance
cargo build --release
The compiled binary will be located at `./target/release/cryptix`.
---
## 🛠️ Usage
1. **Launch the Suite**:
```bash
./target/release/cryptix-
Encrypting an Image:
- Navigate to
◈ Target Image File. - Select your image from the scanned list.
- Select
🔒 Encrypt (Lock Data). - CRITICAL: Copy the
SECRET KEYblock displayed in the terminal. If you lose this key, the image is mathematically unrecoverable.
- Navigate to
-
Decrypting an Image:
- Navigate to
◈ Target Image File. - Select the
_locked.pngimage. - Select
🔓 Decrypt (Unlock Data). - Paste the secret key when prompted.
- Navigate to
- Lossless Formats Only: Cryptix strictly requires
.pngfor output. Using lossy formats like.jpgwould alter the encrypted bytes, resulting in a corrupted image upon decryption. - Key Permanence: There is no "Password Reset" or "Recovery" mode. The security of XChaCha20 ensures that without the key, the image is indistinguishable from random noise.
- Batch Processing: Encrypt/Decrypt entire directories.
- Key File Support: Save keys to encrypted
.keyfiles instead of terminal output. - GUI Implementation: A modern desktop wrapper using
Taurioriced. - Steganography: Hide encrypted data inside seemingly normal images.
Distributed under the MIT License. See LICENSE for more information.
Developed with 🦀 Rust for absolute security and performance.