Listing 1. Generating a GnuPG Key Pair

jojo@linuxbox:~ > gpg --gen-key
Please select what kind of key you want:
   (1) DSA and ElGamal (default)
   (2) DSA (sign only)
   (3) ElGamal (sign and encrypt)
Your selection? 1
DSA key pair will have 1024 bits.
About to generate a new ELG-E key pair.
              minimum key size is  768 bits
              default key size is 1024 bits
    highest suggested key size is 2048 bits
What key size do you want? (1024) 1024
Requested key size is 1024 bits
Please specify how long the key should be valid.
         0 = key does not expire
      <n>  = key expires in n days
      <n>w = key expires in n weeks
      <n>m = key expires in n months
      <n>y = key expires in n years
Key is valid for? (0) 18m
Key expires at Wed 15 Jan 2003 09:55:56 PM CST
Is this correct (y/n)? y
You need a user ID to identify your key; the software
constructs the user ID from Real Name, Comment and
E-mail Address in this form:
    "Heinrich Heine (Der Dichter)
     <heinrichh@duesseldorf.de>"
Real Name: John Joseph Figplucker
E-mail Address: jojo@figpluckers-supreme.to
Comment: Smooth JoJo
You selected this user ID:
    "John Joseph Figplucker (Smooth JoJo)
     <jojo@figpluckers-supreme.to>"
Change (N)ame, (C)omment, (E)-mail or (O)kay/(Q)uit? O
You need a Passphrase to protect your secret key.
**************************************************
We need to generate a lot of random bytes. It is a
good idea to perform some other action (type on the
keyboard, move the mouse, utilize the disks) during
the prime generation; this gives the random number
generator a better chance to gain enough entropy.
++++++++...++++++++++.+++++++.......++++++++++..
+++++++++++++++...++++++++++.++++++++++++++++..
+++++++++.++++++++++.+++++.++++++++++..
+++++++++++++++.+++++++++++++++.....+++++
.....................+++++
public and secret key created and signed.