EEG - Easy Encryption in Go
This is (except my first Go project) application to easily but securely encrypt and decrypt files.
Basic usage
To encrypt file: eeg encrypt filename
, you will be prompted with encryption password.
To encrypt file to custom output: eeg encrypt filename -o outputfilename
To decrypt file: eeg decrypt filename
, you will be prompted with encryption password.
To decrypt file to custom output: eeg decrypt filename -o outputfilename
*NEW* Piping
From version 0.3 it's possible to pipe data into eeg.
If you replace filename
in any example from Basic usage with -
, eeg will take as an input STDIN, and set output file as STDOUT. The same applies to outputfilename
.
Currently, if you want to use STDIN as input you need to set ENC_PASSWD
environment variable.
Examples:
echo "super secret data" | ENC_PASSWD=test eeg encrypt - -o test.enc
- will encrypt super secret data
using test
as a password and save output to test.enc file.
echo 123 | ./eeg encrypt - | ./eeg decrypt -
- will encrypt 123
, pipe that into decrypt, and decrypt. (Here we assume ENC_PASSWD env variable is already set)
Install
- Install Go (ensure version is over 1.17)
- Run
go install codeberg.org/MicroPanda123/eeg@latest
Build
- Install Go (ensure version is over 1.17)
- Clone this repository (
git clone https://codeberg.org/MicroPanda123/eeg.git
) and enter it.
- Run
go build .
- Add built binary into PATH (E.g. copy it to
/usr/bin
or /usr/local/bin
)
Why?
- Just for Fun. No, really
- I didn't see any available simple cli file encryption solution. Closest thing I've seen was Picocrypt, but it's GUI. But even if there is, then circle back to 1.
Is it secure?
Well, currently I wouldn't consider it fully production ready. But (currently) it uses Scrypt for Key Derivation and XSalsa20 Poly1305 provided by NaCl Secretbox.
So I wouldn't consider it secure like Picocrypt is, but it's still being worked on.
It's probably secure enough for casual usage (whatever that means) tho.
Name origin
So I forgot how to spell EGG and thought it was spelled EEG, and it already fit so I didn't wanna to change it only to fit EGG acronym.