Rust-Crypt is a cross-platform command-line utility for encrypting and decrypting files with a password. The goal was to keep the workflow approachable while using modern cryptographic building blocks and a file format that contains everything required for safe decryption except the password.
The Encryption Pipeline
- Generate a unique random salt for every encrypted file
- Derive a 256-bit encryption key from the password with Argon2
- Generate a random 12-byte nonce
- Encrypt and authenticate the file with AES-256-GCM
- Store the salt length, salt, nonce, and encrypted payload in a portable binary format
Why Authenticated Encryption Matters
AES-GCM does more than conceal file contents. Its authentication tag also allows the application to detect corrupted or modified ciphertext instead of returning silently altered data. Argon2 makes password guessing more expensive by applying a dedicated password-based key derivation process.
A Small, Portable CLI
Clap provides clear encrypt and decrypt commands, while anyhow keeps error propagation readable. The resulting binary works across Windows, macOS, and Linux and can be compiled with Cargo in release mode.
“A security tool should make the safe path understandable: one password, authenticated encryption, explicit commands, and errors that fail clearly.”

Rust-Crypt packages salt, nonce, and authenticated ciphertext into a portable encrypted file.
