Professional cross-platform file encryption CLI tool built with modern C++20 and Botan 3.x cryptographic library.
[
](LICENSE)
β¨ Features
π Documentation link
π Modern Encryption
- AEAD Ciphers: AES-GCM (128/192/256), ChaCha20-Poly1305, Serpent-GCM, Twofish-GCM
- International Standards: Camellia-GCM, ARIA-GCM (Korea), SM4-GCM (China)
- Legacy Support: AES-CBC/CTR/CFB/OFB/XTS, 3DES (for compatibility)
- Asymmetric: RSA (2048/3072/4096), ECC (P-256/P-384/P-521)
- Post-Quantum Cryptography (PQC):
- Kyber-512/768/1024 (ML-KEM) - Key encapsulation
- Dilithium-2/3/5 (ML-DSA) - Digital signatures
- KyberHybrid - Quantum-resistant hybrid encryption
- Classical (educational): Caesar, Vigenère, Playfair, Hill, Substitution
π Key Derivation
- Argon2id - Memory-hard, recommended
- Scrypt - Memory-hard alternative
- PBKDF2 (SHA-256/SHA-512) - Legacy compatible
π¦ Compression
- ZLIB - Fast, good ratio
- LZMA - Best ratio, slower
- BZIP2 - Balanced (coming soon)
π¨ Additional Features
- Steganography - Hide data in images (LSB)
- Archive - Encrypt multiple files
- Hashing - SHA-256, SHA-512, SHA-3, BLAKE2b, BLAKE3
- Benchmarks - Performance testing
π Quick Start
Windows (MSVC)
# Setup
.\scripts\setup-msvc.ps1
# Build
.\scripts\build-msvc.ps1 -Test
Windows (MinGW/MSYS2)
# In MSYS2 UCRT64 terminal
./scripts/setup-mingw.sh
./scripts/build-mingw.sh -t
Linux
./scripts/setup-linux.sh # or --clang for Clang
./scripts/build-linux.sh -t
macOS
./scripts/setup-macos.sh
./scripts/build-macos.sh -t
π Usage
Basic Encryption
# Encrypt with AES-256-GCM (default)
filevault encrypt secret.txt
# Decrypt
filevault decrypt secret.txt.fvlt
# With options
filevault encrypt data.zip -a chacha20-poly1305 -s paranoid --compression lzma
Mode Presets
filevault encrypt file.txt --mode basic # AES-128-GCM, fast
filevault encrypt file.txt --mode standard # AES-256-GCM, balanced
filevault encrypt file.txt --mode advanced # ChaCha20-Poly1305, max security
Asymmetric Encryption
# Generate RSA key pair
filevault keygen --algorithm rsa-4096 --output mykey
# Encrypt with public key
filevault encrypt secret.txt --pubkey mykey.pub
# Decrypt with private key
filevault decrypt secret.txt.fvlt --privkey mykey.pem
Post-Quantum Cryptography (PQC)
# Generate Kyber keypair (quantum-resistant)
filevault keygen --algorithm kyber-1024 --output quantum-key
# Encrypt with Kyber-Hybrid (combines classical + PQC)
filevault encrypt secret.txt --algorithm kyber-1024-hybrid
# Generate Dilithium signing keypair
filevault keygen --algorithm dilithium-5 --output dilithium-key
# Hybrid encryption (recommended for quantum threat)
filevault encrypt data.zip -a kyber-1024-hybrid
Steganography
# Hide data in image
filevault stego embed message.txt cover.png -o hidden.png
# Extract hidden data
filevault stego extract hidden.png -o recovered.txt
# Check capacity
filevault stego capacity photo.jpg
Archive
# Create encrypted archive
filevault archive create documents/ -o backup.fva
# Extract archive
filevault archive extract backup.fva -o restored/
# List contents
filevault archive list backup.fva
Hash
filevault hash document.pdf # SHA-256 (default)
filevault hash file.iso --algorithm blake2b # BLAKE2b
filevault hash ./folder/ --recursive # All files
Benchmark
filevault benchmark # All algorithms
filevault benchmark --algorithm aes-256-gcm # Specific
filevault benchmark --json -o results.json # Export
List & Info
filevault list algorithms # Supported algorithms
filevault list kdfs # Key derivation functions
filevault info encrypted.fvlt # File metadata
ποΈ Building
Requirements
- C++20 compatible compiler
- CMake >= 3.20
- Conan 2.x
- Ninja (recommended)
Supported Platforms
| Platform | Compiler | Status |
| Linux | GCC 13+ | β
|
| Linux | Clang 17+ | β
|
| Windows | MSVC 2022/2026 | β
|
| Windows | MinGW GCC 14+ | β
|
| macOS | Apple Clang 16+ | β
|
Manual Build
mkdir build && cd build
conan install .. --output-folder=. --build=missing
cmake --preset conan-release -DBUILD_TESTS=ON
cmake --build build/Release --parallel
See docs/BUILD.md for detailed instructions.
π Algorithm Comparison
Symmetric (AEAD - Authenticated Encryption)
| Algorithm | Key Size | Speed | Security | Use Case |
| AES-256-GCM | 256-bit | β‘β‘β‘ | βββββ | General purpose |
| ChaCha20-Poly1305 | 256-bit | β‘β‘β‘ | βββββ | Mobile, no AES-NI |
| Serpent-256-GCM | 256-bit | β‘β‘ | βββββ | High security |
| Camellia-256-GCM | 256-bit | β‘β‘β‘ | βββββ | Japan standard |
| ARIA-256-GCM | 256-bit | β‘β‘β‘ | βββββ | Korea standard |
| SM4-GCM | 128-bit | β‘β‘β‘ | ββββ | China standard |
Asymmetric & Post-Quantum
| Algorithm | Key Size | Type | Security | Quantum Resistant |
| RSA-4096 | 4096-bit | Classical | ββββ | β Vulnerable |
| ECC-P521 | 521-bit | Classical | βββββ | β Vulnerable |
| Kyber-512 | N/A | PQC KEM | ββββ | β
NIST Level 1 |
| Kyber-768 | N/A | PQC KEM | βββββ | β
NIST Level 3 |
| Kyber-1024 | N/A | PQC KEM | βββββ | β
NIST Level 5 |
| KyberHybrid | Combined | PQC+AES | βββββ | β
Defense in depth |
| Dilithium-5 | N/A | PQC Signature | βββββ | β
NIST Level 5 |
Key Derivation
| KDF | Memory | Speed | Resistance |
| Argon2id | 64MB+ | Slow | GPU, ASIC |
| Scrypt | 32MB+ | Slow | GPU |
| PBKDF2 | Minimal | Fast | Brute force only |
Benchmark Results (1 MB data)
Symmetric Encryption:
- AES-256-GCM: ~700 MB/s (hardware accelerated)
- ChaCha20-Poly1305: ~600 MB/s (software optimized)
- Kyber-1024-Hybrid: ~650 MB/s (PQC + AES-GCM)
Asymmetric Operations:
- RSA-4096 Keygen: ~1.7 seconds
- ECC-P521 Keygen: ~10 ms
- Kyber-1024 Keygen: ~0.4 ms β‘
PQC Performance:
- Kyber-1024 KEM Encapsulation: ~0.6 ms
- Kyber-1024 KEM Decapsulation: ~0.8 ms
- Dilithium-5 Sign: ~1.6 ms
- Dilithium-5 Verify: ~0.8 ms
π§ͺ Testing
# Run all tests
ctest --test-dir build --output-on-failure
# Run specific test
ctest --test-dir build -R "AES_GCM"
# With verbose output
ctest --test-dir build -V
Test Categories
- Unit tests - Individual components
- Integration tests - Full encrypt/decrypt flow
- Security tests - Nonce uniqueness, timing attacks
- NIST vectors - Standard test vectors
π Project Structure
filevault/
βββ include/filevault/ # Headers
β βββ algorithms/ # Crypto algorithms
β βββ cli/ # CLI commands
β βββ core/ # Core types & engine
β βββ utils/ # Utilities
βββ src/ # Implementation
βββ tests/ # Test suites
βββ scripts/ # Build scripts
βββ docs/ # Documentation
π§ Configuration
Security Levels
| Level | KDF Iterations | Memory | Description |
| weak | 3 | 64MB | Fast, testing |
| medium | 10 | 128MB | Balanced |
| strong | 20 | 256MB | Recommended |
| paranoid | 50 | 512MB | Maximum |
Config File
filevault config set default-algorithm aes-256-gcm
filevault config set default-kdf argon2id
filevault config show
π Documentation
- BUILD.md - Build instructions
- .github/copilot/ - Architecture & coding standards
π€ Contributing
- Fork the repository
- Create feature branch: git checkout -b feature/amazing
- Commit changes: git commit -m 'Add amazing feature'
- Push: git push origin feature/amazing
- Open Pull Request
π License
MIT License - see [LICENSE](LICENSE) for details.
π Acknowledgments