Installing and using PGP





Compiling pgp263is on a Linux target


This is pretty starightforward.

Create a temporary directory used to compile the binary mkdir $HOME/tmp
Uncompress the file cp pgp263is.tar.gz $HOME/tmp/
cd $HOME/tmp
gunzip pgp263is.tar.gz
tar xvf pgp263is.tar
tar xvf pgp263ii.tar
Build the pgp's binary cd src
make linux


Installing pgp on your linux system


This section assumes that you will install PGP under your home directory in the directory $HOME/pgp.

Make all the target directories cd $HOME
mkdir .pgp
mkdir pgp
mkdir pgp/bin
mkdir pgp/doc
mkdir pgp/man1
Copy the generic PGP configuration file into the directory $HOME/.pgp cp $HOME/config.txt $HOME/.pgp/
Copy the help files info the directory $HOME/.pgp cp $HOME/*.hlp $HOME/.pgp/

Note that there is one help file per language (which is configured from the file 'config.txt'). So you should need only one help file.
Copy the file "language.txt" file into the directory $HOME/.pgp cp $HOME/tmp/language.txt $HOME/.pgp/
Copy the PGP manuals into the directory $HOME/pgp/doc cp $HOME/tmp/doc/pgpdoc1.txt $HOME/pgp/doc
cp $HOME/tmp/doc/pgpdoc2.txt $HOME/pgp/doc

Note that this step is very important since PGP will not work if it can't find these two files.
Copy the PGP's man page into the directory $HOME/pgp/man1 cp $HOME/tmp/doc/pgp.1 $HOME/pgp/man1

Note that if you want to consult the PGP's man page, you can use the following command: "man -M ~/pgp pgp"
OK ... now copy PGP itself to the right location: cp $HOME/tmp/src/pgp $HOME/pgp/bin
Edit the file $HOME/.bashrc, and add the following lines: PATH=${PATH}:${HOME}/pgp/bin
PGPPATH=${HOME}/.pgp
alias pgpm="man -M $HOME/pgp pgp"

Note that the second line is not absolutely necessary since "${HOME}/.pgp" is the default value for PGPPATH.


Creating ney keys


Just type the following command:

pgp -kg


and follow the instructions.

Once this is done, you can see the two keys (the public and the private) into your directory $HOME/.pgp. The keys are saved into the files:
  • pubring.pgp (public keys)
  • secring.pgp (private keys)


Extracting a public key


The following command extracts the public key for the user "liberty" from your public key ring. The key will be stored into the file "liberty_key.pgp".

pgp -kx liberty liberty_key


If you want the key to be ASCII formated type:

pgp -kxa liberty liberty_key


In this case, the key will be stored in the file "liberty_key.asc"


Adding your friends' public keys to your public key ring


Assuming that the liberty's public key is saved in the file "/tmp/liberty.pgp", you can add this key to your ring by typing:

pgp -ka /tmp/liberty




Dumping the content of the key ring


The following command:

pgp -kv


will dump the content of your public ring. But you can also dump the content of your private key ring. In this case you must specify the full path to your provate ring.

pgp -kv ./.pgp/secring.pgp


File encryption


Assuming that you want to encode the file "pgp.tar" for the user "liberty". In other words, you've used the liberty's public key, so that only "liberty" can decrypt it. Of course, this implies that you've added the liberty's public key to your own public key ring.

pgp -e pgp.tar liberty


Then you get the encoded file "pgp.tar.pgp". Only the user "liberty" can decode it with his own private key.

The file "pgp.tar.pgp" we've just encrypted is not ASCII formated, which may not be suitable. To create an ASCII formated file, just type:

pgp -ea pgp.tar liberty


In this case we obtain the encoded file "pgp.taDecrr.asc".


File decryption


Assuming that you are the user "liberty" and that the file "pgp.tar.pgp" has been encoded using your own public key, you can decode it by typing:

pgp pgp.tar