cargocrypt-0.1.1 has been yanked.
CargoCrypt 🔐
Zero-config cryptographic operations for Rust projects
CargoCrypt brings enterprise-grade cryptography to your Rust workflow with zero configuration required. Inspired by the success of tools like cargo-audit and ripgrep, it emphasizes performance, security, and developer experience.
Quick Start
# Install
# Initialize in your project (zero config!)
# Encrypt sensitive files
# Decrypt when needed
# Generate secure keys
# Interactive TUI mode
Features
🚀 Zero Configuration
- Works out of the box - No config files needed
- Smart defaults - Follows Rust ecosystem conventions
- Git integration - Respects
.gitignoreand hooks - Project detection - Automatically finds Rust projects
🔒 Enterprise Security
- Ring cryptography - Battle-tested crypto primitives
- Multiple algorithms - AES-256-GCM, ChaCha20-Poly1305, Ed25519
- Key management - Secure key derivation and storage
- Audit trail - All operations are logged
💫 Developer Experience
- Fast - Rust performance with optimized release builds
- Interactive TUI - Beautiful terminal interface with
ratatui - Progress indicators - Visual feedback for long operations
- Error messages - Clear, actionable error reporting
- Shell completion - Bash, Zsh, Fish support
🔧 Rust-First Design
- Cargo integration - Works seamlessly with
cargoworkflows - Project-aware - Understands Rust project structure
- CI/CD friendly - Perfect for automated workflows
- Cross-platform - Linux, macOS, Windows support
Philosophy
CargoCrypt follows the zero-config philosophy pioneered by successful Rust tools:
- Convention over configuration - Smart defaults that just work
- Performance by default - Optimized for speed and memory usage
- Security by design - Secure defaults, no foot-guns
- Developer happiness - Intuitive commands and helpful output
Installation
From crates.io
From source
Binary releases
Download from GitHub Releases
Usage
Basic Operations
# Initialize project (creates .cargocrypt/ if needed)
# Encrypt files or directories
# Decrypt files
# List encrypted files
# Verify integrity
Key Management
# Generate new keys
# Import existing keys
# Export public keys
# Rotate keys
Interactive Mode
# Launch TUI
The TUI provides:
- File browser - Navigate and select files to encrypt/decrypt
- Key management - Visual key generation and management
- Progress tracking - Real-time operation status
- Git integration - See which files are tracked/ignored
Git Integration
# Setup git hooks (optional)
# Encrypt before commit
# Decrypt after checkout
Configuration (Optional)
While CargoCrypt works with zero configuration, you can customize behavior:
# .cargocrypt/config.toml (optional)
[]
= "chacha20poly1305"
= "argon2id"
[]
= ["*.tmp", "target/"]
= ["src/secrets/"]
[]
= true
= true
Security
Cryptographic Choices
- Ring - Industry-standard cryptographic library
- ChaCha20-Poly1305 - Default AEAD cipher (fast, secure)
- AES-256-GCM - Alternative AEAD cipher (hardware accelerated)
- Ed25519 - Default signature algorithm
- Argon2id - Key derivation function
Key Storage
- OS keychain integration - Secure storage on macOS/Windows
- Environment variables - For CI/CD environments
- File-based - Encrypted key files with proper permissions
- Hardware tokens - YubiKey support (planned)
Audit and Compliance
- Operation logging - All crypto operations are logged
- Integrity verification - Built-in file integrity checks
- Key rotation - Easy key rotation with backward compatibility
- Compliance ready - Supports SOC2, FIPS requirements
Performance
CargoCrypt is optimized for speed:
# Benchmark on your machine
# Typical performance (M1 MacBook Pro):
# Encryption: 1.2 GB/s (ChaCha20-Poly1305)
# Decryption: 1.4 GB/s (ChaCha20-Poly1305)
# Key generation: 15ms (Ed25519)
Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Development
# Clone and build
# Run tests
# Run integration tests
# Benchmark
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT License (LICENSE-MIT)
at your option.
Inspiration
CargoCrypt draws inspiration from excellent Rust tools:
- cargo-audit - Security-focused cargo subcommand
- ripgrep - Fast, user-friendly search
- fd - Simple, fast find alternative
- bat - Cat with syntax highlighting
- exa - Modern ls replacement
Zero config. Maximum security. Pure Rust performance.