./safeguard --version
1.0Safeguard is a fast, lightweight, cross-platform command-line file encryption tool written in Go.
This project is a learning-oriented file encryption tool.
While it uses standard cryptographic primitives from Go’s standard library (e.g. AES-GCM for authenticated encryption), it does not use a modern, memory-hard password key derivation function such as Argon2 or scrypt.
Instead, keys are derived using a lightweight, standard-library-only method. This means:
- The encryption is secure against casual inspection
- Integrity and tampering are detected
- Passwords are not strongly protected against determined brute-force or GPU-based attacks
- High-value secrets
- Long-term storage of sensitive data
- Situations requiring strong password-hardening guarantees
- Learning and experimentation
- Personal or low-risk file protection
- Open-source collaboration and improvement
Contributions that improve security while preserving usability are welcome.
git clone https://github.com/pingplus/SafeGuard.git
cd SafeGuard
go buildGeneral syntax:
./safeguard <file> <action> <cipher> [options]Actions:
--encryptoreEncrypt a file--decryptordDecrypt a file--decrypt-directoryordeDecrypt a whole directory (decrypting directory not available yet sorry :( )
Options:
--inplacedecrypt/encrypt a file in place (experimental)--keyadd key--outputspecify the output name
Supported ciphers:
./safeguard --list-ciphers
[i] Available ciphers:
xor
caesar
aesEncrypt a file:
./safeguard secret.txt e aes --key "your-strong-password"
# or
./safeguard secret.txt --encrypt aes --key "your-strong-password" --output secret.txt.aesDecrypt a file:
./safeguard secret.txt d aes --key "your-strong-password"
# or
./safeguard secret.txt --decrypt aes --key "your-strong-password" --output secret.txt.dec- Encrypt with AES and write in place:
./safeguard secrets.txt e aes --key "123123123123123123123123" --inplace
# -> creates secrets.txt but encrypted- Decrypt with AES and specify output file :
./safeguard secrets.txt.aes d aes --key "123123123123123123123123" --output secrets_decrypted.txt
