GnuPGP Key

First I generated a PGP Key Pair by typing the command
[code lang=”bash”]gpg –gen-key[/code]
You are prompted with the following
[code lang=”bash”]gpg (GnuPG) 1.4.6; Copyright (C) 2006 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.

Please select what kind of key you want:
(1) DSA and Elgamal (default)
(2) DSA (sign only)
(5) RSA (sign only)
Your selection?[/code]
I usually take the defaults when prompted.

I then read the manual provided at the GnuPGP website. Some other resources I found useful are listed below. Next you need to register your Public Key with a reliable key server, I used one that I found in the UK here.

Below is the command I used to register my public key, yours will be almost exactly the same, apart from the public key 6E8A8EB6 which is mine, your of course will be different.
[code lang=”bash”]billy@linux:~$ gpg –fingerprint billy
pub 1024D/6E8A8EB6 2008-03-18
Key fingerprint = 2133 B30D CCF4 1739 5EC6 AEF0 8690 2B09 6E8A 8EB6
uid Billy Dickson
sub 2048g/08E07B36 2008-03-18[/code]
[code lang=”bash”]gpg –keyserver –send-key 6E8A8EB6[/code]

Below is a pretty basic bash script that I wrote to backup my public and private keys. I then copied the resulting file to a CD and hid it in my house (somewhere) šŸ™‚
[code lang=”bash”]gpg -a –export-secret-keys 6E8A8EB6 > sec_key.asc; gpg -a –export 6E8A8EB6 >> sec_key.asc[/code]

Leave a Reply