If you’re like me you find yourself using cloud storage more and more. Most cloud services like the two I use most often, Dropbox and Ubuntu One, tell us that our documents are secure and I believe them. But I’ve been around long enough to know that bad stuff happens in the Cloud and that it’s simply not prudent to trust any Cloud service with your most important data.
This is where GnuPG comes in. GNU Privacy Guard (GPG for short) gives you the confidence to store your confidential documents on any cloud service, using a key-based encryption and decryption system that is easy to implement.
You could use any number of approaches to protecting your cloud content. Using LibreOffice’s Document Password feature is one approach, for example.
For most documents you want to store in the cloud that should be sufficient, but what if you simply can’t take any chances? That’s when you might consider GPG encryption and decryption.
Getting Started with GnuPG
GnuPG is installed with most Linux distributions, so there should be nothing you need to install. The first thing you’ll want to do is create a personal Key. GPG key creation is well documented and found on many blogs and articles on the Internet so simply search for GnuPG Create Key and you’re set. You will also see that there is nothing to it.
Now we’ll want to create a bash script to encrypt and store our secure document in the cloud. We also might want a script to retrieve and decrypt the document if we want to share it from multiple Linux machines. So let’s create a single script and use –encrypt or –decrypt parameters to specify the action we want.
We named the script gpgNotes.sh, so to run the script we go into the terminal and enter
$ gpgNotes.sh –encrypt
to encrypt and sign our document and copy it to the cloud, and
$ gpgNotes.sh –decrypt
to grab the file from the cloud, decrypt it and save it locally.
With GnuPG we can use the cloud with confidence!