Simple instructions to use PGP on Ubuntu

If you end up here on this old sub-domain, please head over to niceandfocused.com.

Most people don’t have any reasons to encrypt their communication with other people. There is no famous tool yet with which even non-IT people can just enable/disable encryption with one click. For this reason, only some geeks know how to encrypt a message. Let’s see how it works on Ubuntu Desktop:

  1. Install the tools needed:
    1. You should already have gpg and Passwords and Keys installed
    2. Install OpenPGP
  2. Generate an own key to receive encrypted messages:
    1. Open Passwords and Keys
    2. Click on the “+” and select PGP Key
    3. Type in a name (e.g. “your name”) with at least 5 letters, email is optional
    4. Type in a password to protect your private key
    5. It takes a couple of seconds until you see the key under GnuPG keys
  3. Encrypt a message to send it to others or to test your own key:
    1. Open Passwords and Keys
    2. Select your key under GnuPG keys
    3. Go to File > Export
    4. Select Armored PGP keys at the bottom right
    5. Export your public key, e.g. “my-public-key.asc”
    6. Go to File > Import and select my-public-key.asc
    7. Open Terminal and make sure your public key is listed:

      > gpg –list-keys
      pub 2048R/D6E1F4F8 2017-07-31
      uid your name
      sub 2048R/7CA82BFA 2017-07-31

    8. Copy some text to your clipboard (ctrl+c)
    9. Open OpenPGP and click on it’s Icon which looks like a clipboard
      1. Select Sign/Encrypt Clipboard with Public Keys
      2. Select your key my making a “hook” on the left of the line & OK
      3. Now you have the encrypted message in your clipboard (ctrl+v)
    10. Notice: When you want to send an encrypted message to others, import their public key and follow these instructions (2.), ending up here. Send the encrypted message from step 2.9 to them (ctrl+v).
  4. Decrypt a message which is encrypted by your own public key to read an encrypted message:
    1. Write the encrypted message to a file, e.g.: ~/encrypted.txt
    2. Open Passwords and Keys
      1. Double click your key under GnuPG keys
      2. Click on Details > Export (secret key)
      3. Save e.g. as: my-private-key.asc (you need your protection password, see 1.3.4)
      4. Click on File > Import and select your private key
    3. Open Terminal and make sure your private key is listed:

      > gpg –list-secret-keys
      sec 2048R/D6E1F4F8 2017-07-31
      uid your name
      ssb 2048R/7CA82BFA 2017-07-31

    4. Now you can decrypt the message if it was encrypted with your public key

      > gpg –decrypt encrypted.txt > decrypted.txt

    5. The decrypted.txt contains the message
    6. Notice: When you want to receive encrypted messages, share your public key with others. Do never share your private key so that only you can read these messages!

Puh …. that’s it. This is far fromone click to enable/disable encryption” which is probably needed for non IT people to encrypt sensitive messages by default.

If you such a tool, feel free to post it a as a comment!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s