GPG II
Summary:- Installation
- Testing And Configuration
- Public Key Distribution
- GPG And Mail Programs
GPG II
Installation
- If you are using a Mandrake release older than 7.2, get the gnupg and the pgpgpg packages from one of M's cryptography servers or get the sources from ~GnuPG.org. Releases 7.2 and later come with the ~GnuPG package on the CD.
- Install them. If you've used the RPM packages, run
rpm ––verify gnupg
- Now you have to generate your key pair with
gpg ––gen-key
- You will be asked some questions (kind of key, key size, validity). Go with the defaults unless you know better.
- Now you have to supply a user ID: your real name, your email address and a (optional) comment.
- Enter your passphrase (it will not show up). As usual, you will be prompted to enter it again to prevent typos.
- Now your key will be generated. To help the program gather enough random data, move your mouse around and hit the CTRL, ALT or SHIFT keys some times.
- Ready1.1 '~/.gnupg' should now contain these files: 'options' (configuration file), 'pubring.gpg' (your public key) and 'secring.gpg' (your private key).
Testing And Configuration
Before you distribute your key, you should do some testing:- will list your key pair. The output will look like this:
gpg ––list-keys
pub {keylenght}/{key ID} {Creation date} [Expiration date] {Real name} {comment} {email address} sub {keylenght}/{key ID} {Creation Date} [Expiration date]
- Encrypt and sign a file with . This will generate an encrypted file called '{file}.gpg'.
gpg -es -r {first part of your real name} {file}
- Decrypt this file with .
gpg {file}.gpg
- will create a signed but unencrypted file called '{file}.asc'.
gpg ––clearsign {file}
- Verify this signature with
gpg ––verify {file}.asc
- Beginning with Mandrake 8.2, Mandrake's public key was automatically imported into the root user's keyring when the gnupg package was installed. All other users: add Mandrake's public key on the CD to your keyring: . A good example of why a regular user might want to do this is if the user wants to build rpms from source rpms. The user will want to verify that the source rpm packages he has are bona fide Mandrake source rpm.
gpg ––import /mnt/cdrom/RPM-GPG-KEYS - Check the GPG RPM: . You should get
rpm ––checksig gnupg-{...}mdk.rpm
.gnupg-{...}mdk: md5 gpg OK
- Create a revocation certificate. You will need it in case your secret key gets lost or is compromised: . Save the file 'revoke.asc' to a secure place.
gpg -o revoke.asc ––gen-revoke {key ID}
- Remove the leading hash (#) from (removes the copyright message) and
no-greeting
(lets yourself be the default recipient).default-recipient-self - Change the 'keyserver' line to or use the default keyserver by removing the hash.
keyserver search.keyserver.net
- Add to get rid of those pesky GPG warnings about using insecure memory.
no-secmem-warning
man gpg
Public Key Distribution
To distribute your public key by email or on your website, you have to export your key to a text file first. To prevent GPG from using the binary format, add the––armor
gpg ––armor ––export {key ID} -o mykey
gpg ––import mykeygpg ––keyserver search.keyserver.net ––send-key {key ID or your email address}
gpg ––keyserver search.keyserver.net ––recv-key {key ID}
––keyserver
To verify keys, exchange encrypted messages containing the key fingerprints (
gpg ––fingerprint {key ID}
GPG And Mail Programs
Here are some mail programs currently supporting GPG:- Arrow, a nice, lightweight mail client for X.
- Exmh, X front end for the MH mailing system.
- KMail, KDE's standard mail client.
- Mew, a MIME mail reader for (X)Emacs.
- Mutt, a very popular console based mail reader.
- Pine, another popular console based mail reader. You will need an add-on like pgp4pine.
- Postilion, a next-ish mail application for X.
- Spruce, a GTK+ mail client.
- XFMail, a very powerful MUA for X.
pgp_create_traditional ask-yes
Related Resources:
GNU Privacy HandbookList Of Related Applications
man gpg
Author: Tom Berger, Todd Lyons Legal: This page is covered by the GNU Free Documentation License. Standard disclaimers of warranty apply. Copyright LSTB and Mandrakesoft.
GPG II
Version 1.4 last modified by Flink on 14/01/2006 at 12:26
Version 1.4 last modified by Flink on 14/01/2006 at 12:26
Document data
- Lost account?
- Join the community, be part of the Club: it's free!
- Get the PWP Download Subscription!


