Importing a public key

Importing a public key #

To be able to send someone an encrypted message (e.g. your address to a vendor), you need their public key. In order to get a vendor’s public key you have to visit his profile and look out for a link that is named like “PGP key” or “Vendor public key”. Sometimes it is also featured directly on the vendor’s profile page.

A public key looks like this:

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1

mQINBFhNDOsBEACzwJJVsMo7sIiLhvCsLx2n+DVHzw1trM/C8Yao8EmWdDYe3ei9
mXRqSudbD6S4KvJfm+ZeOlEQ6gGoG2q3aFYASRgcK7WDhs+jwG42EA+j2oIpU/EO
8EQXTmTn8T+LQT84JZ5KkiZZp2CqLU8RVszfkKEj1oX/sO5watxNQur4fbk9FiCA
1MjHMYir1g==
=TV04
-----END PGP PUBLIC KEY BLOCK-----

The gibberish part in the middle will be a bit longer though. The “Version” line may also be different or not exist at all.

  • To import a key in Kleopatra first click the notepad option
  • Paste the public key you want to import into the text field
  • Click the import notepad option
  • A box will pop up telling you to certify the key you just imported.
  • If you are sure of the key you can click Yes then certify
  • You should see cerified successful
  • Click the Notepad option again to go back to your keyring. You should see the name of the key you imported.

Find the public key that you want to import and copy it to your clipboard. Open text editor (mousepad) and paste the public pgp. Save the file. Something like “vendor.asc” Open GPA Select import keys

A new window will open. Select the file you saved to start off (with the public PGP key in it)

If all went well, you should get a message like this one.

Close the window by clicking on “OK” and check the list of PGP keys to see if it contains the PGP key you just imported. When you find it, right-click on it and select “Key Properties”. Then select “Ultimately” from the drop-down menu for the field “Owner trust” and confirm by clicking “OK”. This will make it easier for you to quickly encrypt messages with that PGP key (i.e. send encrypted messages to that vendor).

If you get an error like “Key importing failed. Please see the detailed log for more information.”, there was probably a formatting problem with the key you copied into the clipboard. Make sure that you are copying all of the key including the five dashes at the beginning and end of the key and the BEGIN and END statements. PGP is very picky about formatting errors.