Encrypt files using GPG, seahorse and nautilus

What this how-to covers:
Setting up seahorse/nautilus integration
Generating a GPG key using a terminal
Using the key with nautilus-seahorse plugin to encrypt/decrypt files

What this how-to does not cover:
Everything else, including:
What is PGP,GPG,RSA and how does it work?
If you are not familiar with these topics or encryption in general, please read through some articles online. It is important to have at least basic understanding of how it works to be able to use it in a safe way.

To watch this How-To as a screencast-video click here

Install “seahorse-nautilus”

vlcsnap-2015-07-26-19h12m19s193

Generate GPG Key

vlcsnap-2015-07-26-19h13m15s54

You will have to enter a passphrase to protect your key.
This passphrase should be easy to remember, yet impossible to guess.
Something like “ninjas like 2 juggle with baby pigs & eat watermelons at 3pm”
Make sure to remeber the passphrase, once its gone, its gone, and so is your chance to use the key you just created (and any files encrypted using it).

vlcsnap-2015-07-26-19h13m52s83

vlcsnap-2015-07-26-19h13m59s180

After you entered a passphrase, gpg will generate a keypair.
For this, it needs some random bytes and some time.
When done, the output should look similar to this:
vlcsnap-2015-07-26-19h14m24s178

Encrypt a file using your new key

In Nautilus right-click the file you want to encrypt and choose “Encrypt…”
vlcsnap-2015-07-26-19h14m59s245

Choose a recipient (the person able to decrypt the file afterwards)
Since I want to save the encrypted file on my HDD and use it myself some other day,
I choose myself as recipient.
vlcsnap-2015-07-26-19h15m17s166

You will be prompted to enter the passphrase you chose before.
vlcsnap-2015-07-26-19h15m27s18

The encrypted file will be saved as “.pgp”.

Decrypt the file

To decrypt the file, right-click and choose “Open With Decrypt File”

vlcsnap-2015-07-26-19h15m34s97

Choose where the decrypted file should be saved to.

vlcsnap-2015-07-26-19h15m57s33

Again, you will be prompted to enter the passphrase.

vlcsnap-2015-07-26-19h16m08s167

You now have 3 files: the original(plain text), the encrypted (scrambled)and the encrypted-then-decrypted(plain text) file.

vlcsnap-2015-07-26-19h16m16s248

Leave a Reply

%d bloggers like this: