How to configure UNIX PINE for use with PGP

The concept for configuring PINE for use with PGP is simple. Newer versions of PINE allow external scripts, or filters, to be called when viewing or sending messages. By taking advantage of this, filters can be installed to automatically sign, encrypt, decrypt and check the signatures of both outgoing and incoming PGP-enhanced messages with minimal user interaction.

                 How to configure UNIX PINE for use with PGP
                      Howto Version 0.01 (Aug 25, 1996)
             Maintained By Sean B. Hamor

This text is not an introduction to PGP; it contains only information for
configuring PINE for use with PGP and assumes the following criteria:

  o  You are running UNIX PINE 3.92 or higher.
  o  PGP has already been installed.
  o  You have a basic knowledge of PGP, UNIX and PINE.

The concept for configuring PINE for use with PGP is simple.  Newer versions
of PINE allow external scripts, or filters, to be called when viewing or
sending messages.  By taking advantage of this, filters can be installed to
automatically sign, encrypt, decrypt and check the signatures of both
outgoing and incoming PGP-enhanced messages with minimal user interaction.

Incoming cleartext messages are treated normally.  Incoming PGP-enhanced
messages, however, will fire off these filters and automatically display PGP
output (to check a signature) or prompt you for your pass phrase as required
(to decrypt messages).

The setup for these filters is simple.  The first step is to create symbolic
links to the pgp binary for easy identification.  The reason for this will
become more obvious after using the filters for outgoing PGP-enhanced
messages.

Assuming all your personal PGP files are stored in ~/.pgp/ and the pgp
binary is /usr/local/bin/pgp, create two symbolic links in the ~/.pgp/
directory.

hamors (16 18:12) litterbox:~/.pgp> ln -s /usr/local/bin/pgp encrypt
hamors (17 18:12) litterbox:~/.pgp> ln -s /usr/local/bin/pgp pgpsign

Now that the symbolic links for the outgoing message options have been
created, you must install a script for decrypting and checking signatures
for incoming PGP-enhanced messages.

The following 5-line script was acquired from the comp.mail.pine newsgroup
and was taken off J. Yuan's  homepage.  This script should
be user executable and installed as ~/.pgp/display.sh.

# BEGIN display.sh

#!/bin/sh
pgp
echo "Press [RETURN] to continue" >/dev/tty
read junk
addressbook-formats      =



To add multiple "sending-filters," use the "Add Value" command to add your
first filter, then use the "Add Value" command again to add your second
filter.

If everything has been set up correctly, PINE will now be fully configured
to automatically sign, encrypt, decrypt and check the signatures of both
outgoing and incoming PGP-enhanced messages with minimal user interaction.

The displaying of incoming PGP-enhanced messages will be completely self
explanatory and at most will only require a PGP pass phrase.  An example of
an incoming PGP-enhanced message is as follows:



  PINE 3.95   FOLDER INDEX                     Folder: pgp  Message 2 of 3 ANS

+     1 Jul 28 Bill Arcand         (1,370) pgp
+ A   2 Jul 28 Bill Arcand         (2,192) Hey there chief...
+     3 Aug  2 Bill Arcand         (2,621) // talk \\

? Help       M Main Menu  P PrevMsg     - PrevPage    D Delete      R Reply
O OTHER CMDS V [ViewMsg]  N NextMsg   Spc NextPage    U Undelete    F Forward



After selecting message 2, the following screen pops up, giving you the
standard output from PGP.  If this were a PGP-signed message and not a PGP-
encrypted message, display.sh wouldn't have asked for a PGP pass phrase; it
would have only displayed the signature:



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: 1996/08/25 23:29 GMT

File is encrypted.  Secret key is required to read it.
Key for user ID: Sean B. Hamor
2047-bit key, Key ID 59209F85, created 1996/07/26

You need a pass phrase to unlock your RSA secret key.
Enter pass phrase:
Pass phrase is good.  Just a moment......
File has signature.  Public key is required to check signature. .
Good signature from user "Bill Arcand ".
Signature made 1996/07/28 13:51 GMT
Press [RETURN] to continue



  PINE 3.95   MESSAGE TEXT                 Folder: pgp  Message 2 of 3 ALL ANS

Date: Sun, 28 Jul 1996 09:52:17 -0400 (EDT)
From: Bill Arcand
To: "Sean."
Subject: Hey there chief...

Hey there guy...

                                [ALL of message]
? Help       M Main Menu  P PrevMsg     - PrevPage    D Delete      R Reply
O OTHER CMDS V ViewAttch  N NextMsg   Spc NextPage    U Undelete    F Forward



As you can see, the PGP-encrypted message was automatically decrypted and
completely stripped of all evidence that it was a PGP-enhanced message.  The
message is still held in encrypted form in your INBOX, but with the filters
installed PGP becomes pseudo-transparent and you never actually see the
ciphertext.

Sending outgoing PGP-enhanced messages requires a little more interaction on
your part.  After composing a message and hitting CTRL-x to send, you will
be prompted for the filter you wish to use to send your message.  An example
of an outgoing PGP-enhanced message is as follows:



  PINE 3.95   COMPOSE MESSAGE                         Folder: pgp  3 Messages

To      : "Sean B. Hamor"
Cc      :
Attchmnt:
Subject : This is a test of a test...
----- Message Text -----

This is a test of a test...wheee...

Finger [email protected]           /\_/\          mailto:[email protected]
for PGP public key block.          ( o.o )     http://www.ishiboo.com/~hamors/
alt.litterbox, The Home of TOCA     > ^  when prompted for your pass phrase will neither
display nor harm the message.  It's best to skip the message and wait until
you've opened up a secure connection or logged in on console.

Have fun, and happy ciphering...