eeg

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2022 License: BSD-3-Clause Imports: 1 Imported by: 0

README

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

  1. Install Go (ensure version is over 1.17)
  2. Run go install codeberg.org/MicroPanda123/eeg@latest

Build

  1. Install Go (ensure version is over 1.17)
  2. Clone this repository (git clone https://codeberg.org/MicroPanda123/eeg.git) and enter it.
  3. Run go build .
  4. Add built binary into PATH (E.g. copy it to /usr/bin or /usr/local/bin)

Why?

  1. Just for Fun. No, really
  2. 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.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL