PGP: The key to your heart

By Hal Stern, Unix Insider |  Development

Now that you've seen how the public and private parts of a key are
used, it's time to generate your own and collect those of your
friends. Keys are kept on key rings, similar in concept to
physical key rings. By default, there are two key rings --
pubring.pgp and secring.pgp -- for your collection
of public keys and your own private keys. You can add other rings for
your co-workers, friends, and other circles of data exchangers as
needed. Key rings live in ~/.pgp, along with the
configuration file.

The first step is to create a unique key pair. This will add your
own key to both the public and private key rings:


huey% pgp -kg
Pick your RSA key size:
1)   512 bits- Low commercial grade, fast but less secure
2)   768 bits- High commercial grade, medium speed, good security
3)  1024 bits- "Military" grade, slow, highest security
Choose 1, 2, or 3, or enter desired number of bits: 3
Generating an RSA key with a 1024-bit modulus.

You need a user ID for your public key.  The desired form for this
user ID is your name, followed by your E-mail address enclosed in
<angle brackets>, if you have an E-mail address.
For example:  John Q. Smith <12345.6789@compuserve.com>
Enter a user ID for your public key: 
Hal L. Stern <hal.stern@unixinsider.com>

You need a pass phrase to protect your RSA secret key.
Your pass phrase can be any sentence or phrase and may have many
words, spaces, punctuation, or any other printable characters.

Enter pass phrase: 
Enter same pass phrase again: 

The first thing you need to specify is the length of the key you want.
There are few reasons to use less than 1,024 bits, given the speed of
most machines you'll be using for encryption. Key generation is a slow
process, due to the large numbers being multiplied and reduced -- it
takes about 40 seconds to create a 1,024-bit key on a SPARCstation 10.
PGP then asks you for your user ID, which is typically your full name
followed by your e-mail address in brackets. In previous examples
requiring a user ID, the string supplied is used to search through the
public key ring for a match in the user ID field. When we chose pepe
as a user ID, we picked up the public key for Pepe
<pepe@unixinsider.com>
.

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Answers - Powered by ITworld

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Ask a Question