Quick AES encryption and decryption
For situations when Keybase is not an option. Should work on Ubuntu.
Generate a AES key
Choose a unique passphrase,
openssl enc -aes-128-cbc -k <passphrase> -P -md sha1
key values in the
$KEY environment variables.
Your file is located as
file.txt, and will be encrypted as
openssl enc -aes-128-cbc -in file.txt -out file.txt.enc -K "$KEY" -iv "$IV"
Your encrypted file is located as
file.txt.enc, and will be decrypted as
openssl enc -d -aes-128-cbc -in file.txt.enc -out file.txt.dec -K "$KEY" -iv "$IV"