GNUpg

From TWUUG

Contents

Description

GNUpg or GNU Privacy Guard

"GnuPG is the GNU project's complete and free implementation of the OpenPGP standard as defined by RFC4880 . GnuPG allows to encrypt and sign your data and communication, features a versatile key managment system as well as access modules for all kind of public key directories. GnuPG, also known as GPG, is a command line tool with features for easy integration with other applications. A wealth of frontend applications and libraries are available. Version 2 of GnuPG also provides support for S/MIME." ^1

License

"GnuPG is Free Software (meaning that it respects your freedom). It can be freely used, modified and distributed under the terms of the GNU General Public License ." ^1

Key Generation

  • To generate a key pair in GNUpg you must first enter "pgpg --gen-key" into the Command line"
  • It asks what kind of key you want, it is always a good general recommendation to use the defualts as I am using (1) DSA and Elgamal.
  • It asks for a key length, depending on your key type the possible lengths will vary. In this instance it is also a good idea to use the default value.
Keep in mind that the longer the key the more processing time is necessary to encrypt and decrypt data.
  • It asks for a validity period. This option is up to you, many people setup non-expiring keys, but in many cases a one time key or limited time period key would be more secure.
  • Now it will ask for certain information about the owner of the key pair.
  • Now it will ask for your passphrase.
The longer the passphrase the better.
Make sure the passphrase is something you cannot forget because it cannot be recovered.
If you loose you passphrase the key will have to be deleted and new one created.
  • After the passphrase in entered it will begin generating your key. begin moving you mouse or doing other things on the computer to all much needed randomness to the key.

The key is now generated and you have a secure online identity.

Exporting Public Key

  • To Export your primary Public Key the syntax is "gpg --export -a>{filename}"

Importing Keys

  • To import a Public Key the syntax is "gpg --import {filename}

Encrypting Files

  • To encrypt a file type "gpg -e {file to encrypt".
  • It will ask for the key to use, enter the value(s) you want, to finish imputing recipients just press enter.

The file is now encrypted in your working directory.

Decrypting Files

  • First the sender's Public Key must have been imported to your keyring.
  • type "gpg {encrypted file]" and the file will be decrypted and output to your current working directory.

Signing Files

  • To sign a file file just type "gpg -s {filename}" in your command line.
  • The resulting gpg file will be output to your current working directory.

Verifying Signatures

  • To verify signatures you first must have the author's Public Key in your keyring.
  • Type "gpg --verify {filename]" in the command line.

The output will tell you if the signature is valid.

Other Resources

  • In Command Line "man gpg"
  • In Command Line "gpg --help"


Quotes and Sources

^1 - GNUPG Official Site taken 12/11/07

Personal tools