Configuring Pretty Good Privacy (PGP)

How to:

The following sections describe how to create the key rings, list the keys, and import/export public keys using the GNU Privacy Guard (GnuPG) utility. If you are using another PGP implementation, then consult the accompanying documentation to learn how to accomplish the same tasks.

Procedure: How to Create Key Rings

The iWay Pretty Good Privacy (PGP) Extension requires access to the public key ring and the secret key ring. To create key rings using the GNU Privacy Guard (GnuPG) utility:

  1. Download the GnuPG utility from the following website:

    http://www.gnupg.org/download/

    For Windows, either the full or light version of Gpg4win is acceptable, since only the command line interface is required.

  2. Install the GnuPG utility.
  3. Open a command prompt and navigate to the directory where the GnuPG utility is installed. For example:
    cd C:\Program Files (x86)\GNU\GnuPG
  4. Generate a master key pair by executing the following command:
    gpg2 --gen-key
  5. Select RSA (sign only) as the key type, and follow the prompts.

    You will be prompted to enter the key length, expiration, user real name, user email address, and an optional comment.

  6. Enter the passphrase, which should be a long password.

    Make note of the passphrase, since your master key becomes unusable without it.

  7. Edit the master key with the following command.
    gpg2 --edit-key user@host

    where:

    user@host

    Is the actual user email address previously entered.

  8. Start adding an encryption subkey using the following command:
    addkey
  9. Enter the passphrase to access the master private key.
  10. Select RSA (encrypt only), enter the key length and expiration.
  11. Save the new subkey and exit the GNU Privacy Guard (GnuPG) utility using the following command:
    save

Procedure: How to List Keys

  • To list the public keys, enter the following command:
    gpg2 --list-keys

    The short key IDs and the user IDs are displayed.

  • To list the private keys, enter the following command.
    gpg2 --list-secret-keys

    The short key IDs and the user IDs are displayed.

  • To view the fingerprint of the public keys, enter the following command:
    gpg2 --fingerprint --fingerprint

    The second identical option is required to view the fingerprints of the subkeys.

  • To view the fingerprint of the private master keys, enter the following command:
    gpg2 --list-secret-keys --fingerprint

    Remember, the fingerprint of a private (sub)key is the same as the fingerprint of the corresponding public (sub)key.

  • To view the long key ID of the public keys, enter the following command:
    gpg2 --list-keys --with-colon

    The output of this command is intended to be machine readable. The long key ID is the field containing 16 hexadecimal digits.

  • To view the long key ID of the private keys, enter the following command:
    gpg2 --list-secret-keys --with-colon

Procedure: How to Export a Public Key

To export your public key to send to a partner, enter the following command:

gpg2 --armor --output pub.asc --export user@host

where:

user@host

Is the actual user email address in the User ID.

The output is in the pub.asc file. This file must be distributed to the communication partners.

Procedure: How to Import a Public Key

To import the public key of a partner, enter the following command:

gpg2 --import filepath

where:

filepath

Is the actual file path.