Safebox is a bash script that calls openssl enc command to encrypt and decrypt text and store it securely.

Safebox could be downloaded directly from GitHub

Basically Safebox is a wrapper to functionality already that already exists in openssl enc. The only real difference between calling Safebox and openssl commands is in the ease of use and central directory where encrypted data could be store.

Safebox asks for password only once, even if operation require to decrypt and encrypt user data. Then that password is passed to openssl enc commands by stdin.
The data to encrypt is also passed by stdin, and does not use temporary files when is is not necessary. The only case when temporary files would be required is when editing files. Because Safebox uses vipe, from moreutils package, to edit stdin and returns it to stdout.
By default all encrypted files are stored in .safebox in user’s home directory. But it is possible to read/write files from other arbitrary locations, by using -f flag.

Safebox is a basic tool which follows the philosophy of unix tools. It could use as a layer in managing confident data encrypted, such as passwords or contacts (together with xclip or xsel), or to just encrypt/decrypt plain text files.


Usage: ./safebox [OPTION]...[MODE] [secret]
OPTION: [-f file | -n name] [-a algorithm] [-p password]
MODE: add|view|edit
secret: a text to encrypt and append in 'add' mode


-f    file to read/write

-n   name of the encrypted data, equivalent -f $SAFEBOX_DIR/.name.

-a   openssl enc algorithm, by default uses blow-fish block cipher.

-p   password


view    decrypt data.

add     add secret to encrypted data.

edit     edit data and encrypt it again with the same key.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s