A robust command-line utility written in Rust for secure file encryption and decryption using AES-256-GCM.
- Password Protection: Argon2id hashing ensures secure password storage with resistance to brute-force and GPU attacks.
- Modern Encryption: AES-256-GCM provides authenticated encryption to prevent tampering and ensure data integrity.
- Hardened Key Derivation: Keys are derived using Argon2id with the following parameters:
- Memory cost:
512 MB - Iterations:
10 - Parallelism:
4 threads - Output length:
32 bytes(256-bit key)
- Memory cost:
- Salted Password Hashing: Master passwords are hashed with Argon2id using:
- Algorithm:
Argon2id - Random per-user salt
- Default Argon2id parameters
- Algorithm:
-
Master Password is Critical
- The tool stores a Master Password file in your
$HOMEdirectory. - There is no password recovery mechanism.
- If the Master Password file is deleted, the tool will prompt you to create a new one.
- However, files encrypted with the original password can still be decrypted if you remember that password.
- The tool stores a Master Password file in your
-
Always Keep Backups
- Before encrypting important files, ensure you maintain backups.
- This prevents accidental data loss due to forgotten passwords or corruption.
- Rust (latest stable version)
- Terminal or command prompt
- Git (for cloning the repository)
-
Clone the repository:
git clone https://github.com/vamsi200/file_encrypt.git cd file_encrypt -
Build the project:
cargo build --release
-
The binary will be available in
target/release/.
Usage:
-f <file> : Specify one or more files
-d <dir> : Specify a directory (default is current)
--encrypt : Encrypt the file or directory
--decrypt : Decrypt the file or directory
--depth <n> : Encrypt/Decrypt the directory with depth 'n'
-h or --help : Display help information
# Encrypt single or multiple files
./file_encrypt -f file.txt file2.txt --encrypt
# Decrypt multiple files
./file_encrypt -f file.txt file2.txt --decrypt
# Encrypt a directory
./file_encrypt -d /path/to/dir --encrypt
# Decrypt a directory
./file_encrypt -d /path/to/dir --decrypt
# encrypt a directory with depth 1
./file_encrypt -d /path/to/dir --depth 1 --encrypt
# decrypt a directory with depth 1
./file_encrypt -d /path/to/dir --depth 1 --decryptThis project is licensed under the MIT License - see the LICENSE file for details.