{"id":48,"date":"2003-09-07T14:46:57","date_gmt":"2003-09-07T13:46:57","guid":{"rendered":"http:\/\/wp.devco.net\/?p=48"},"modified":"2009-10-09T17:38:43","modified_gmt":"2009-10-09T16:38:43","slug":"openssl_encryption_frontend","status":"publish","type":"post","link":"https:\/\/www.devco.net\/archives\/2003\/09\/07\/openssl_encryption_frontend.php","title":{"rendered":"OpenSSL Encryption Frontend"},"content":{"rendered":"

I usually use PGP<\/a> to encrypt things like password lists and so forth. This is not always optimal as I sometimes worry about loosing my keys and would instead just want a simple password crypted file.
\n
OpenSSL<\/a> provides a simple method for encrypting and decrypting that is available on most Unix machines thesedays and even some Windows machines.<\/p>\n


\nAfter some searching on the net I came across some references to this that showed some simple methods and I wrote a wrapper around them in Perl. To use it simply place it on your machine, make it executable and optionally fix the path to OpenSSL near the top of the script.
\nEncryption:
\nsslcrypt -e -i input -o output
\nDecryption:
\nsslcrypt -d -i input -o output
\nBy default it will refuse to overwrite existing output but you can force that by supplying -f. The output will be binary and should be transfered in a binary safe method but you may supply -a to output\/input a base64 encoded file.
\nIt will by default use Blowfish in CBC mode but you may also force it to you Three key triple DES EDE in CBC mode by supplying -3.
\nIt is important to note that you will need to somehow remember what mode you used for any specific file since OpenSSL cannot figure it out for you, so if you encrypt with -3 or -a you must also decrypt with -3 or -a.
\nYou can download the script
here<\/a>.
\nRelated Links:
\n
OpenSSL<\/a>
\n
http:\/\/www.monkey.org\/openbsd\/archive\/misc\/0102\/msg00798.html<\/a>
\n
http:\/\/www.monkey.org\/openbsd\/archive\/misc\/0102\/msg00804.html<\/a>
\n
enc(1)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"

I usually use PGP<\/a> to encrypt things like password lists and so forth. This is not always optimal as I sometimes worry about loosing my keys and would instead just want a simple password crypted file.
\n
OpenSSL<\/a> provides a simple method for encrypting and decrypting that is available on most Unix machines thesedays and even some Windows machines.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","footnotes":""},"categories":[7],"tags":[121,42,63],"_links":{"self":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/48"}],"collection":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/comments?post=48"}],"version-history":[{"count":1,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/48\/revisions"}],"predecessor-version":[{"id":942,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/48\/revisions\/942"}],"wp:attachment":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/media?parent=48"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/categories?post=48"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/tags?post=48"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}