Securing archives with encryption

I want to archive a directory and then encrypt it. And obviously get that directory back again sometime in future.

This will archive, compress, and encrypt:

tar -cz some-directory | gpg -c -o archive.tgz.gpg

And this will decrypt, decompress, and extract:

gpg -d archive.tgz.gpg | tar xz

This uses symmetric encryption with an AES128 cipher. AES128 is sufficient to protect classified information up to the SECRET level. Good enough for me.

Another type of secure compression — Image by [Armed in Heels](http://www.armedinheels.com/undertech-undercover-women39s-ultimate-compression-shorts-p-1705.html?CDpath=3)
Another type of secure compression — Image by Armed in Heels