This is the first marginally useful version.

The binaries are here, but look at the code.  Other components (RSA,
Blowfish, MD2/5, etc.) are in pilotSSLeay which is from the SSLeay
library.  See the copyright notice at the end.

The original Pilot port of SSLeay is by Ian Goldberg
<ian@cypherpunks.ca> and is at http://www.isaac.cs.berkeley.edu/pilot/

I have only included a minimum set for the MUST algorithms. it is up
to you to verify it is legal for you to use more modules if you want
to add more, and portions I have ported.

The two .asc files are keyrings.  The passpharase is "testpass" and only
applies to the DSA key.  The RSA key has no passphrase.

You can substitute your public and secret keyrings by armoring them
and using the "PUBLIC" and "PRIVATE" headers instead of MESSAGE.  Note
that no validity checking of keys is done.  I assume you will do that
on your desktop, and export only the valid public keys.

The rngscnsa.c program can be used for this purpose and will strip
things I don't use from the keyrings.  Note it needs SSLeay's SHA1
routine which is not provided, nor is a makefile.

Also, in this version, only the first key on the secret ring will be
used for signing.

IF YOU DONT SUPPLY A PASSPHRASE AND ONE IS REQUIRED, IT WILL CAUSE A
FATAL ERROR AND REQUIRE A RESET.  THIS APPLIES TO ALL SIGNING AND
ENCRYPTING OPERATIONS.

I recommend EcoHack to speed things up.  Otherwise you may need to
increase the auto-off timer.

NOTE: ONLY DO ONE OPERATION PER RUN - as more passes are performed,
the heap gets used and fragmented more and it will eventually crash.
So set it up to do one encrypt/decrypt/sign/verify, run it, go back to
the memo pad, enable the next (remember to disable any just-encrypted
or just signed message; I add a character in the leading dashes, so it
looks like ---X--BEGIN ).

=========================
To (Clear)Sign a memo:

Simply prefix it with the line "OPGPSIGN" and run OpenPGP.  OPGPSIGN will
turn into DONESIGN.

=========================
To Verify a signature:

Simply adjust it so that -----BEGIN PGP SIGNED MESSAGE----- is the
first line.  The first four dashes will be replaced with GOOD, BAD, or
DONE (the last case if the key is not on the ring or other error
unrelated to the algorithmic correctness of the signature).

========================= Encrypting:

Simply prefix the message with the line "OPGPENCRYPT <hexkeyid>".  If
you also want to sign it, use OPGPENCSIGN in place of OPGPENCRYPT.

NOTE THAT THE HEXKEYID IS THE FULL 16 HEXDIGIT VERSION!!!

Anything after the blank after hexkeyid but before the linefeed will
be taken as a filename to extract to, the default is only to the
screen.  The result memo will be placed just before the encrypt memo
and OPGP will be changed to DONE.

You can also do OPGPENCCONV [filename] to use the passphrase for
conventional instead of passphrase encryption.

=========================
Dearmor/Decrypt/Decompress/etc:

Simply adjust the message so that the -----BEGIN PGP MESSAGE----- line
is at the top.

The literal filename will be prepended to the result which will be
insterted into the memo list just before this message.  If a signature
exists it will be checked and a message printed.

The first four dashes will be replaced with DONE.

=========================

TODO

- Preferred Secret key in pref apps

- Display signer keyid

- Overwrite memory or other wiping functions

- Tune Compression (I am less than the 13 bits normal PGP uses).

- Canonicalize Text

=========================
SSLeay terms:

/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
 * This library is free for commercial and non-commercial use as long as
 * the following conditions are aheared to.  The following conditions
 * apply to all code found in this distribution, be it the RC4, RSA,
 * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
 * included with this distribution is covered by the same copyright terms
 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
 *
 * Copyright remains Eric Young's, and as such any Copyright notices in
 * the code are not to be removed.
 * If this package is used in a product, Eric Young should be given attribution
 * as the author of the parts of the library used.
 * This can be in the form of a textual message at program startup or
 * in documentation (online or textual) provided with the package.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *    "This product includes cryptographic software written by
 *     Eric Young (eay@cryptsoft.com)"
 *    The word 'cryptographic' can be left out if the rouines from the library
 *    being used are not cryptographic related :-).
 * 4. If you include any Windows specific code (or a derivative thereof) from
 *    the apps directory (application code) you must include an acknowledgement:
 *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
 *
 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 * The licence and distribution terms for any publically available version or
 * derivative of this code cannot be changed.  i.e. this code cannot simply be
 * copied and put under another distribution licence
 * [including the GNU Public Licence.]
