crypto provides a simple interface to symmetric Gnu Privacy Guard (gpg) encryption and decryption for one or more files on Unix and Linux platforms. It runs on top of gpg and requires a gpg install on your system. Encryption is performed with the AES256 cipher algorithm.
Encryption benchmarks vs. default gpg encryption are available here with additional details for text, pdf, mp3, and png mime types.
crypto provides a number of options including automated tar archives of multiple files prior to encryption, portable ASCII armored encryption formatting, and SHA256 hash digest generation for your encrypted files.
Detailed documentation is available here.
$ crypto sometext.txt
$ crypto --armor sometext.txt
$ crypto sometext.txt anotherimage.jpg
$ crypto *.txt
$ crypto --hash sometext.txt
$ crypto imagedir privatedir
$ crypto --tar privatedir
$ decrypto sometext.txt.crypt
$ decrypto privatedir
$ decrypto --stdout sometext.txt.gpg
Mac OSX users can install gpg from source, with Homebrew, or by installing the Mac GPG Tools Suite.
The Homebrew install command is:
brew install gpg
Please refer to the detailed documentation on the Gnu Privacy Guard and Mac GPG Tools suite sites for more information if you choose the source or GPG Tools approaches.
If gpg is not installed on your Linux distro, you can use your package manager to install it or compile and install it from the source.
You can install crypto with pip:
pip install crypto
or download the crypto source, unpack it, navigate to the top level directory, and install with the command:
python setup.py install
--armor | -a
Encrypt in a portable ASCII armored format
--hash
Generate SHA256 hash digest of encrypted file(s)
--space
Favor reduced file size over encryption speed
--speed
Favor encryption speed over reduced file size
--tar
Create tar archives from directories of files, then encrypt
--nountar
Do not automatically unpack tar archives after decryption
--overwrite | -o
Overwrite an existing file with the new decrypted file
--stdout | -s
Push the decrypted data to the standard output stream instead of generating a new file
--help | -h
View the help documentation
--usage
View the usage documentation
--version | -v
View the crypto version number
Please submit a new issue report on the GitHub repository with a detailed overview of the problem that you are having.
MIT License | Built with the Naked Framework