GNUPG: High Level Cryptography by The Golden Keys Team - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

 CHAPTER 17

 

 Key servers

 

Key servers are computers that store public keys and serve them to users, allowing them to upload, retrieve and revoke keys. There are many key servers available and the basic idea is that they all synchronize their databases so they always have the same keys and they are always updated, although each key server is free to set its own rules regarding any of the operations mentioned before.

 

17.1 – Why use key servers?

 

The biggest advantage of using a key server is that if someone wants your key to contact you securely they don't have to request it to you, instead they can simply search for it in a key server and download your key. This is very useful if you own a blog or a website, or if you often expect strangers to contact you.

 

However once a key is uploaded to a key server it is publicly available and cannot be deleted, it will supposedly remain there forever. If you don't want to use that key anymore all your can do is to revoke it, but even then it will still remain there marked as revoked.

 

Also keep in mind that anyone could upload your key without asking your permission. This is because key servers are highly unregulated, so anyone can upload anything without verification or validation. Consequently there is a a large amount of fake keys stored on them.

 

Key servers used to be more popular in the beginning of the 1990s, before the internet became commercial, because back at that time very few people had internet access and an updated place where other people's keys could be easily found was very convenient. Today most GnuPG users have websites, blogs and/or social networks and they can publish their keys in those platforms, which anyone can access directly.

 

Nonetheless, key servers are still very popular and most – if not all – OpenPGP implementations have support for key servers.

 

17.2 – Using Key Servers via Command Line

 

17.2.1 – Searching and Importing keys

 

To import a key from a key server you have to search for it using the command below:

 

img174.png

 

Below we will search for a key named 'Bill Gates' and then import it into our keyring.

 

img175.png

 

91 keys were found. You can enter the corresponding number of the key you are looking for and press img176.png or press N and see the next 11 results, and so on. You can choose more than one key if you want, just separate them with a comma. We will choose the 4th key.

 

img177.png

 

17.2.2 – Sending your key to a key server

 

To publish your key you need to choose the key server you are going to use and use one of the commands below:

 

img178.png

 

We will choose the second command because it allows us to specify they key server we want to use, which in our example is the same used by GnuPG by default:

 

img179.png

 

You can check your key now following the instructions shown in section 17.2.1.

 

17.3 – Using Key Servers via Web Interface

 

17.3.2 – Searching and importing keys

 

Enter the name of the key you are looking for in the field indicated in the image below and press Search button. You can also customize the following options:

 

  • Index: is cleaner and shows less information of the keys. You have to click on the keys links to see additional information.
  • Verbose index: shows additional information of the keys in the main window.
  • Show OpenPGP “fingerprints” for keys: shows the keys fingerprints.
  • Only return exact matches: tries to return exact matches of the string(s) entered.

 

img180.png

 

The key server will show a list of keys containing the strings you entered. Find the correct key you want to import. As we did in our previous example, we will choose the 4th key again, which is shown in the image below. Click on the link indicated to see the key.

 

img181.png

 

Now you will see the key on screen. Select it, including the beginning and end tags, copy it and save it in a text file. You can use any extension you want, preferably .asc or .key.

 

img182.png

 

Now you have a copy of the key. All you have to do is to import the file to your keyring, check out chapters 12, 15 and 16 for more information.

 

17.3.1 – Sending your key to a key server

 

First you have to access the website of the key server you want to use. Below are listed some of the most popular key servers that can be accessed via web interface:

 

  • keys.gnupg.net
  • keyserver.ubuntu.com
  • pgp.mit.edu

 

1 – Access the website

 

Access the website of the key server you have chosen. We are using keyserver.ubuntu.com.

 

2 – Paste your key on the field

 

Scroll down and paste your key on the field 'Submitting a new OpenPGP Key', as shown below. You must have already exported your public key to do it. For more information on how to do it see chapters 12, 15 and 16.

 

img183.png

 

3 – Send your key

 

Click on Submit button. You will see the following confirmation message:

 

Key block added to key server database. New public keys added:

1 key(s) added successfully.

 

Now your key has been successfully published.