The second command also shows the key fingerprint which is usually used to identify the key. Note that you can see both keyid formats in fingerprint. The last eght characters in keyid are the short format and the last sixteen characters are the long format.
If you want to see the long keyid, run
> gpg2 --list-keys --keyid-format long
Now add the uid with the following commands:
> gpg2 --edit-key KEYID
and enter command:
> adduid
and you are asked for name and email address again. This time you can give them both.
If that UID which has only your first name isn't the first UID, select it by giving command, which is the number of the UID, for example:
> 2
and * appears to that UID to tell you that that UID is selected. Now give command
So default keyserver is specified and unknown keys are always received when something what requires missing key is procressses and revoked keys aren't included in search results and verbose output is used and signatures by unknown keys are automatically removed.
If you have homepage, it's recommended that you put your key there. My key can be found at [PGP/key.txt]
[PGP/key.txt]:../../PGP/key.txt
You can get your public key with command
> gpg2 --export -a KEYID
or if you use Linux and have installed package signing-party, you can use
> pgp-clean KEYID
to get your public key without signatures (I will explain them later). WARNING: pgp-clean seems to also remove encryption subkey.
#### With keyservers
If you followed my configuration, you are usng pool.sks-keyservers.net as your keyserver and you are automatically receiving unknown keys from t, whenever you try to verify something, what is signed with unknown key.
To send your public key to keyserver, run
> gpg2 --send-keys KEYID
To receive key from keyserver, run
> gpg2 --recv-keys KEYID
To search keys from keyserver, use
> gpg2 --search-keys QUERY WORDS
or if you are using Linux and have packages signing-party and dialog installed, you can use
Keyservers only append content. Information on keyserver cannot be removed. This means, that when you delete uid, signature or whatever, it reappears when you run
> gpg2 --refresh-keys
or receive your key from keyserver again. Thought content (uids, signatures, keys etc.) can be revoked.
# You can now move to Icedove / Thunderbird guide and after that | or Enigmail guide, because things after this are usually done by email client.
But you should continue reading to understand how to use GPG without email client.
## Trusting keys.
If you want to make gpg know that you trust key of another person, you have two opinons. Enter the "key editing shell", with
> gpg2 --edit-key KEYID
and
### Way 1: lsign
Lsign signs the key locally making it impossible to export the signature. Use it if you trust the key owner to be who the key says, but you haven't met him/her personally.
Lsign the key with
> lsign
and then you can exit gpg with
> quit
confirming to svae changes with
> y
### Way 2: sign
If you trust the key owner to be whom the key says and you have met him/her personally and have seen proof of his/her identify (i.e. passport) or he/she is member of your family or long time friend, you can sign the key with
If you followed my configuration instructions, you are automatically receiver. Replace "receiver" with KEYID. Write your message, add empty line and press CTRL-D and gpg outputs encrypted content.
### Decrypting
Just run
> gpg2 --decrypt
paste the encrypted content, add empty line and press CTRL-D and gpg outputs, the decrypted content.
<arel="license"href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><imgalt="Creative Commons License"style="border-width:0"src="http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png"/></a><br/><spanxmlns:dct="http://purl.org/dc/terms/"property="dct:title">GPG guide</span> by <axmlns:cc="http://creativecommons.org/ns#"href="http://mkaysi.github.com/articles/guides/GPG/GPG.html"property="cc:attributionName"rel="cc:attributionURL">Mika Suomalainen</a> is licensed under a <arel="license"href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License</a>.