| Crates.io | anubis-rage |
| lib.rs | anubis-rage |
| version | 1.4.0 |
| created_at | 2025-10-09 17:15:24.163438+00 |
| updated_at | 2025-10-10 07:31:58.631928+00 |
| description | Post-quantum secure file encryption tool with hybrid X25519+ML-KEM-1024. Defense-in-depth security. |
| homepage | |
| repository | https://github.com/AnubisQuantumCipher/anubis-rage |
| max_upload_size | |
| id | 1875942 |
| size | 328,736 |
Defense-in-depth file encryption: X25519 + ML-KEM-1024
🏆 NIST FIPS 203 Compliant | Hybrid PQC | Defense-in-Depth Security
Anubis Rage v2.0 is a modern file encryption tool implementing hybrid post-quantum cryptography that combines proven classical security (X25519) with cutting-edge quantum resistance (ML-KEM-1024). This defense-in-depth approach provides maximum protection against both current and future threats.
Anubis Rage uses hybrid mode by default, requiring an attacker to break BOTH:
This is the same approach used by Signal Protocol, Google Chrome, and TLS 1.3 hybrid drafts.
| Security Approach | Classical Attacks | Quantum Attacks | Status |
|---|---|---|---|
| Hybrid (Default) | ✅ Protected (X25519) | ✅ Protected (ML-KEM) | RECOMMENDED |
| Pure PQC | ⚠️ Relies on ML-KEM | ✅ Protected (ML-KEM) | Future-focused |
| Classical Only | ✅ Protected (X25519) | ❌ Broken by Shor's | Legacy systems |
Verdict: Hybrid mode gives you the best of both worlds - battle-tested classical security AND quantum resistance.
Anubis Rage v2.0 combines two independent security layers:
Layer 1: X25519 ECDH (Classical)
Layer 2: ML-KEM-1024 (Post-Quantum)
Combined Security (Hybrid)
| Component | Algorithm | Security Level | Standard |
|---|---|---|---|
| Hybrid KEM | X25519 + ML-KEM-1024 | 128-bit classical + 256-bit quantum | NIST FIPS 203 ✓ |
| Key Combiner | HKDF-SHA512 | 256-bit | NIST SP 800-56C ✓ |
| Digital Signatures | ML-DSA-87 | NIST Category 5 | NIST FIPS 204 ✓ |
| Key Derivation | HKDF-SHA512 | 256-bit | SP 800-56C ✓ |
| Message Auth | HMAC-SHA512 | 256-bit | FIPS 198-1 ✓ |
| AEAD Encryption | AES-256-GCM-SIV | 256-bit (nonce-misuse resistant) | RFC 8452 ✓ |
🛡️ See NIST_SECURITY_ANALYSIS.md for complete security analysis and threat model.
# Requires Rust 1.71+ and liboqs
git clone https://github.com/AnubisQuantumCipher/anubis-rage.git
cd anubis-rage
cargo build --release
# Binaries:
# - target/release/anubis-rage
# - target/release/anubis-rage-keygen
macOS:
brew install liboqs
Ubuntu/Debian:
sudo apt-get install cmake ninja-build
git clone https://github.com/open-quantum-safe/liboqs.git
cd liboqs && mkdir build && cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr/local ..
ninja && sudo ninja install
Arch Linux:
yay -S liboqs
$ anubis-rage-keygen -o my-key.txt
Public key: anubis1hybrid1x25519...mlkem1024...
The identity file contains your hybrid private key (X25519 + ML-KEM-1024).
For pure PQC mode (optional):
$ anubis-rage-keygen --mode pqc -o pqc-key.txt
Using hybrid mode (default):
$ anubis-rage -r anubis1hybrid1x25519...mlkem... \
-o secrets.txt.age secrets.txt
Encrypted with hybrid mode (X25519 + ML-KEM-1024)
Or use the identity file:
$ anubis-rage -R <(anubis-rage-keygen -y my-key.txt) \
-o secrets.txt.age secrets.txt
$ anubis-rage -d -i my-key.txt \
-o secrets.txt secrets.txt.age
Hybrid decryption successful
Basic encryption:
# Encrypt with hybrid mode
$ anubis-rage -r RECIPIENT_KEY -o file.age file.txt
# Decrypt
$ anubis-rage -d -i my-key.txt file.age
Multiple recipients:
# Any recipient can decrypt
$ anubis-rage -o doc.pdf.age \
-r anubis1hybrid1... \
-r anubis1hybrid1... \
-r anubis1hybrid1... \
doc.pdf
Streaming encryption:
# Backup with hybrid encryption
$ tar czf - ~/documents | \
anubis-rage -r RECIPIENT > backup.tar.gz.age
# Restore
$ anubis-rage -d -i my-key.txt backup.tar.gz.age | tar xzf -
ASCII armor for email/text:
$ anubis-rage -a -r RECIPIENT secrets.txt > secrets.age
$ cat secrets.age
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IGh5YnJpZCBYMjU1MTkgTUxLRU0tMTAy
...
-----END AGE ENCRYPTED FILE-----
Usage: anubis-rage [OPTIONS] [INPUT]
Options:
-e, --encrypt Encrypt (default)
-d, --decrypt Decrypt
-r, --recipient <KEY> Hybrid recipient public key
-R, --recipients-file <FILE> File with recipient keys
-i, --identity <FILE> Identity file for decryption
-o, --output <FILE> Output file
-a, --armor ASCII armor output
--mode <MODE> Encryption mode: hybrid (default) | pqc
-h, --help Show help
-V, --version Show version
Hybrid Mode (Default & Recommended):
$ anubis-rage --mode hybrid -r KEY -o file.age file.txt
# Or simply (hybrid is default):
$ anubis-rage -r KEY -o file.age file.txt
Pure PQC Mode (Optional):
$ anubis-rage --mode pqc -r KEY -o file.age file.txt
When to use Pure PQC:
When to use Hybrid (Recommended):
use anubis_age::pqc::hybrid;
use anubis_age::{Encryptor, Decryptor};
use std::io::{Read, Write};
// Generate hybrid identity (X25519 + ML-KEM-1024)
let identity = hybrid::Identity::generate();
let recipient = identity.to_public();
// Encrypt with hybrid mode
let encryptor = Encryptor::with_recipients(vec![Box::new(recipient)])?;
let mut encrypted = vec![];
let mut writer = encryptor.wrap_output(&mut encrypted)?;
writer.write_all(b"Secret data")?;
writer.finish()?;
// Decrypt (both X25519 and ML-KEM-1024 must succeed)
let decryptor = Decryptor::new(&encrypted[..])?;
let mut decrypted = vec![];
let mut reader = decryptor.decrypt(vec![&identity as &dyn anubis_age::Identity])?;
reader.read_to_end(&mut decrypted)?;
assert_eq!(decrypted, b"Secret data");
use anubis_age::pqc::mlkem;
// Pure ML-KEM-1024 mode
let identity = mlkem::Identity::generate();
let recipient = identity.to_public();
// ... same encryption/decryption API
Hybrid mode performs two independent key exchanges:
1. X25519 ECDH:
- Generate ephemeral X25519 key pair
- Perform Diffie-Hellman → shared_secret_1 (32 bytes)
2. ML-KEM-1024 Encapsulation:
- Encapsulate to recipient's ML-KEM public key
- Result → ciphertext (1568 bytes) + shared_secret_2 (32 bytes)
3. Hybrid Combiner (NIST-recommended):
IKM = shared_secret_1 || shared_secret_2 (64 bytes)
SALT = ephemeral_x25519_pk || mlkem_ciphertext
wrap_key = HKDF-SHA512(IKM, SALT, "anubis-hybrid-v2/X25519+MLKEM-1024")
4. Encrypt file key with wrap_key
To break hybrid encryption, an attacker must:
This is exponentially harder than breaking either system alone.
Threat scenarios:
Hybrid mode uses a new stanza format:
anubis-encryption.org/v2
-> hybrid
<base64-x25519-ephemeral-public-key>
<base64-mlkem-1024-ciphertext>
<encrypted-file-key>
--- <sha512-hmac>
<encrypted-payload>
File overhead:
Backward compatibility:
Benchmarks on Apple M1 (2.0 GB file):
| Mode | Encryption | Decryption | Key Size |
|---|---|---|---|
| Hybrid | 187 MB/s | 159 MB/s | ~4.7 KB |
| Pure PQC | 187 MB/s | 159 MB/s | ~4.7 KB |
| Classical (reference) | 190 MB/s | 162 MB/s | 64 bytes |
Cryptographic operation timing:
Verdict: Hybrid mode adds ~2ms overhead for key operations, negligible for file I/O.
# Encrypt sensitive documents with maximum security
$ anubis-rage -r MY_HYBRID_KEY -o taxes-2024.pdf.age taxes-2024.pdf
#!/bin/bash
# quantum-safe-backup.sh
DATE=$(date +%Y%m%d)
RECIPIENT="anubis1hybrid1..." # Your hybrid public key
# Database backup with defense-in-depth
pg_dump production | \
gzip | \
anubis-rage -r "$RECIPIENT" \
> "backup-$DATE.sql.gz.age"
# Create team recipients file (hybrid keys)
$ cat > team-keys.txt << EOF
# Engineering - Hybrid keys (recommended)
anubis1hybrid1x25519...mlkem1024... # Alice
anubis1hybrid1x25519...mlkem1024... # Bob
anubis1hybrid1x25519...mlkem1024... # Carol
EOF
# Encrypt for entire team
$ anubis-rage -R team-keys.txt -o design.pdf.age design.pdf
# .github/workflows/encrypt-artifacts.yml
- name: Encrypt build artifacts
run: |
anubis-rage -r ${{ secrets.HYBRID_RECIPIENT }} \
-o artifact.encrypted \
target/release/app
| Feature | Anubis Rage v2 | age/rage | GPG | Other PQC Tools |
|---|---|---|---|---|
| Hybrid PQC | ✅ X25519 + ML-KEM | ❌ | ❌ | ⚠️ Rare |
| Pure PQC | ✅ ML-KEM-1024 | ❌ | ❌ | ✅ |
| NIST Standardized | ✅ FIPS 203 | ❌ | ✅ (legacy) | ✅ |
| Defense-in-Depth | ✅ Hybrid mode | ❌ | ❌ | ❌ |
| Simple Keys | ✅ | ✅ | ❌ | ⚠️ |
| No Config | ✅ | ✅ | ❌ | ⚠️ |
| UNIX Composability | ✅ | ✅ | ⚠️ | ⚠️ |
| Quantum Resistant | ✅ | ❌ | ❌ | ✅ |
| Production Ready | ✅ (v2.0) | ✅ (classical) | ⚠️ | ❌ |
Unique advantage: Only tool providing hybrid X25519+ML-KEM-1024 with defense-in-depth security.
Option 1: Generate new hybrid keys (recommended)
# Generate v2.0 hybrid key
$ anubis-rage-keygen -o hybrid-key.txt
# Re-encrypt files with hybrid mode
$ for file in *.age; do
anubis-rage -d -i old-v1-key.txt "$file" | \
anubis-rage -r NEW_HYBRID_KEY -o "${file}.v2"
done
Option 2: Continue using v1.x pure PQC mode
# v2.0 can still generate pure PQC keys
$ anubis-rage-keygen --mode pqc -o pqc-key.txt
# Encrypt with pure PQC mode
$ anubis-rage --mode pqc -r KEY -o file.age file.txt
Compatibility:
# Secure permissions
$ chmod 600 ~/.config/anubis-rage/hybrid-key.txt
# Backup keys securely
$ anubis-rage -r RECOVERY_KEY \
-o hybrid-key.txt.age hybrid-key.txt
chmod 600 permissions-a) for email/text transmission"liboqs not found":
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
"Invalid header" errors:
# Check file format
$ head -c 30 file.age
anubis-encryption.org/v2 # v2.0 hybrid
anubis-encryption.org/v1 # v1.x pure PQC
"Recipient not found":
# Clone repository
git clone https://github.com/AnubisQuantumCipher/anubis-rage.git
cd anubis-rage
# Build with hybrid support
cargo build --release
# Run tests
cargo test
# Install
cargo install --path rage
# Debug build
cargo build
# Test hybrid mode specifically
cargo test --lib pqc::hybrid
# Verbose logging
RUST_LOG=debug cargo run --bin anubis-rage
Email: security@anubis-rage.org
We follow responsible disclosure:
See CONTRIBUTING.md for guidelines.
Areas of interest:
Licensed under either of:
at your option.
Anubis Rage v2.0 - Defense-in-depth security for the quantum era.
Hybrid mode: Because your security shouldn't depend on any single algorithm.