Setup and Using GPG (GnuPG)

http://wiki.ubuntuusers.de/GnuPG
http://www.madboa.com/geek/gpg-quickstart/
https://help.ubuntu.com/community/GnuPrivacyGuardHowto
for further information see http://www.gnupg.org/documentation/
for e.g.: http://www.gnupg.de/gph/en/manual.html

Import a key from somebody else using a textfile

gpg --import key.asc

Check fingerprint

List all imported keys with their fingerprints:

gpg --fingerprint

Sign someones public key

To accept other's messages as authentic you have to sign them (for example when getting the message "There is no assurance this key belongs to the named user"):

gpg --sign-key <user-id>
# <user-id> might be the id of the key:
gpg --sign-key 4CD35F64

Building the web of trust - update signed keys of others on the keyserver and

gpg --keyserver wwwkeys.pgp.net --send-key 4CD35F64
# or send all keys to the keyserver:
gpg --keyserver wwwkeys.pgp.net --send-keys

To specify how much you trust the signing decisions of others, run from time to time:

gpg --update-trustdb

Using the Configuration File ~/.gnupg/gpg.conf

The config file ~/.gnupg/gpg.conf makes it easy to save your preferences. Options that you would add to the gpg command on the command line can be set in this configuration file (omit the leading -- for the command line options). Here is an example for Linux that I found here:

no-default-keyring
keyring ~/.gnupg/pubring.gpg
secret-keyring ~/.gnupg/secring.gpg
default-key A1A2A3A4
default-recipient-self
encrypt-to B1B2B3B4
keyserver x-hkp://keys.gnupg.net:11371
keyserver-options auto-key-retrieve,verbose
display-charset utf-8
verbose

Comments