How to receive other people’s GnuPG / PGP public key from a key server into your key ring

You will be able to sign emails using your private key by default. This means that people know that it is your email ID that is the originator of the email. However, if you want to send people encrypted messages, you need to have their public keys in your key ring. You need to get their public keys from a key server. Technically, you receive a public key from a key server. The term used is receive and not import.

To receive other people’s public keys, you can follow the steps below:

  • Visit http://pgp.mit.edu. Search for the email ID whose key you want to import. Note down the key ID.
  • Next open a terminal window in Ubuntu and enter the following command to receive the key from a key server. If you leave the key server blank, then the best key server will be used to retrieve the key. In the below example, I want to retrieve the PGP key of management@isc2.org. The associated key ID is DA2AA2BF.

$ gpg --recv-keys DA2AA2BF <enter>

gpg: requesting key DA2AA2BF from hkp server keys.gnupg.net
gpg: key DA2AA2BF: public key "(ISC)2 Management <management@isc2.org>" imported
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 2 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 2u
gpg: next trustdb check due at 2015-11-23
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)

Once you get the key of management@isc2.org into the GnuPG key ring, you can use this key to send encrypted emails to the email ID. Similarly, if they have your public key, they can encrypt email that is sent to you.

If you use Android Privacy Guard on your Android phone or device, you can easily import keys from key servers there as well and send encrypted emails. Android Privacy Guard will also do key look ups for you on the key servers. Remember, your email service provider will not be able to read the message, because all emails sent will be a load of gibberish and cannot be decrypted WITHOUT the private key AND a knowledge of it’s password.