simpleaes256cli-1.0.2 is not a library.
aes256
Minimal AES-256-GCM file encryption CLI written in Rust.
Encrypts or decrypts a single file with a password. The original file is deleted after the operation succeeds.
Install
Or build from source:
# binary: target/release/simpleaes256-rs
Usage
simpleaes256-rs -e <file> encrypt a file
simpleaes256-rs -d <file> decrypt a file
Encrypt
# prompts for password (twice)
# writes secret.txt.enc
# deletes secret.txt
Decrypt
# prompts for password
# writes secret.txt (strips .enc suffix)
# deletes secret.txt.enc
If the input file does not end in .enc, the output is written as <file>.dec.
File format
[0..4] magic "AE56"
[4..20] salt 16 bytes (Argon2id input)
[20..32] nonce 12 bytes (AES-GCM nonce)
[32..] ciphertext + 16-byte GCM authentication tag
Cryptography
| Primitive | Algorithm |
|---|---|
| Key derivation | Argon2id (default parameters) |
| Encryption | AES-256-GCM |
| Nonce/salt generation | OS CSPRNG (OsRng) |
Dependencies
| Crate | Role |
|---|---|
aes-gcm |
AES-256-GCM encrypt / decrypt |
argon2 |
Password-based key derivation |
rand |
Cryptographically secure random bytes |
rpassword |
Hidden password prompt |
License
MIT