Command line encryption utility

0f01570 Fix up Makefile

a month ago

2c07ad2 Add error assertion to io::close calls

a month ago


Encryption utility for the command line.


At build time, a recent Hare toolchain is required.

This will build and install box into /usr/local:

$ make
# make install


Using a shared key:

Generate a shared key:
$ box genkey yyp.key

Encrypt a message with the key:
$ box encrypt -k yyp.key secret.txt > encrypted.box

Decrypt the message:
$ box decrypt -k yyp.key encrypted.box > decrypted.txt

Verify that decrypted and original files match:
$ cmp secret.txt decrypted.txt && echo 'Success'

To use a passphrase instead, just omit the key argument:

$ box encrypt secret.txt > encrypted.box
Enter passphrase: ****

$ box decrypt encrypted.box > decrypted.txt
Enter passphrase: ****

$ cmp secret.txt decrypted.txt && echo 'Success'