Sunday, April 26, 2009

encrypting from the command line

This can be done from Linux, or any of the BSDs that have the openssl tool.

To encrypt

openssl enc -bf -in infile -out outfile.enc

enc is the encrypt command
-bf tells openssl to use the blowfish cipher
-in and -out are self-explanatory.
(I use the enc file extension to classify files that have been encrypted)

To decrypt:

openssl enc -f -bf -in infile.enc -out plainfile

-d add this flag to indicate that we are decrypting.

Note that you probably should choose a really passphrase.

No comments: