PrintLogo

Compiling PGP 2.6.2




This is certainly an old topic, but I always forget how to compile PGP 2.6.2 on GNU/Linux. Grab the source from MIT, probably, is what you want. You may also want to consider gpg. Much has changed since 1994! PGP 2.6.2 is particularly interesting for keeping password files using conventional encryption. It is possible to unencrypt the file temporarily using the -f option, so you don't have unencrypted files laying around with your passwords in it. Let's extract the source:

root@srv-1 pgp262 # ls
pgp262s.tar.gz
root@srv-1 pgp262 # tar -xzf *.gz
root@srv-1 pgp262 # ls
pgp262s.tar.gz  pgp262si.tar.asc  rsaref.tar.asc
pgp262si.tar    rsaref.tar        setup.doc
root@srv-1 pgp262 # 

Read all of the docs and stuff, verify your source distribution if you wish, and uncompress the two tar files:

root@srv-1 pgp262 # tar -xf rsaref.tar
root@srv-1 pgp262 # tar -xf pgp262si.tar
root@srv-1 pgp262 # ls
config.txt  fr.hlp        pgp.hlp           readme.doc    rsaref.tar.asc
contrib     keys.asc      pgp262s.tar.gz    rsalicen.txt  setup.doc
doc         language.txt  pgp262si.tar      rsaref        src
es.hlp      mitlicen.txt  pgp262si.tar.asc  rsaref.tar    vmsbuild
root@srv-1 pgp262 # 

You need to go into rsaref first and compile:

root@srv-1 rsaref # cd install
root@srv-1 install # ls
dos  mac  unix  vax
root@srv-1 install # cd unix
root@srv-1 unix # ls
global.h  makefile
root@srv-1 unix # 
root@srv-1 unix # make
gcc -I. -I../../source/ -I/usr/include -O -c -DPROTOTYPES=1
.
.
.
c.o r_keygen.o r_random.o r_stdlib.o
ar: creating rsaref.a
ranlib rsaref.a
root@srv-1 unix # 

Now, go back in to the src directory. You need to edit the makefile:

linux:
$(MAKE) all ASMDEF=-DSYSV CC=gcc LD=gcc OBJS_EXT="_80386.o _zmatch.o" \
CFLAGS="$(RSAINCDIR) -O6 -g3 -DUNIX -DIDEA32 -DASM"

For more info on this see this news post. Let's compile:

onfig.c     keyadd.h    more.h        r3kd.s      vaxcrtl.opt  zunzip.h
config.h     keymaint.c  mpiio.c       random.c    zbits.c
crypto.c     keymaint.h  mpiio.h       random.h    zdeflate.c
crypto.h     keymgmt.c   mpilib.c      randpool.c  zfile_io.c
descrip.mms  keymgmt.h   mpilib.h      randpool.h  zglobals.c
root@srv-1 src # make linux
make all ASMDEF=-DSYSV CC=gcc LD=gcc OBJS_EXT="_80386.o _zmatch.o" \
CFLAGS="-I../rsaref/source -I../rsaref/test -DUSEMPILIB -O6 -g3 -DUNIX
.
.
.
gcc -I../rsaref
.
.
.
_80386.o _zmatch.o   ../rsaref/install/unix/rsaref.a
make[1]: Leaving directory `/usr/local/pgp262/src'
root@srv-1 src # 

Let's run it:

root@srv-1 src # ./pgp -h
No configuration file found.
Pretty Good Privacy(tm) 2.6.2 - Public-key encryption for the masses.
(c) 1990-1994 Philip Zimmermann, Phil's Pretty Good Software. 11 Oct 94
Uses the RSAREF(tm) Toolkit, which is copyright RSA Data Security, Inc.
Distributed by the Massachusetts Institute of Technology.
Export of this software may be restricted by the U.S. government.
Current time: 2004/10/23 19:31 GMT
Usage summary:
To encrypt a plaintext file with recipent's public key, type:
pgp -e textfile her_userid [other userids] (produces textfile.pgp)
To sign a plaintext file with your secret key:
pgp -s textfile [-u your_userid]           (produces textfile.pgp)
To sign a plaintext file with your secret key, and then encrypt it
with recipent's public key, producing a .pgp file:
pgp -es textfile her_userid [other userids] [-u your_userid]
To encrypt with conventional encryption only:
pgp -c textfile
To decrypt or check a signature for a ciphertext (.pgp) file:
pgp ciphertextfile [plaintextfile]
To produce output in ASCII for email, add the -a option to other options.
To generate your own unique public/secret key pair:  pgp -kg
For help on other key management functions, type:   pgp -k

We are ready to encrypt!

--Agatha



This article comes from NetAdminTools:
http://www.netadmintools.com/

The URL for this story is:
http://www.netadmintools.com/art378.html

Copyright 1997-2007 NetAdminTools.com. Read our Terms of Use.