huey% pgp message.pgp
Don't try to view the encrypted file with an editor or
more, since it is a binary file that will at the least
wreak havoc with your keyboard driver. Be sure to remove the original,
plain text version of the file (or have PGP do it for you using the
-w option), or your encryption efforts are for naught.
The conventional encryption feature of PGP makes it possible to
standardize on PGP for all of your data-security tasks.
Let's actually swap secret bits with someone. Hand PGP the options
-eat and the recipients' user ID (we'll send this to our
heuy% pgp -eat message pepe Recipients' public key(s) will be used to encrypt. Key for user ID: Pepe <email@example.com> 1024-bit key, Key ID 13FAC021, created 1995/05/17 . Transport armor file: message.asc
We'll come back to the user ID, and how it relates to a recipient and
his or her key shortly. The options produce a message suitable for
- Encryption is turned on with the
-aflag tells PGP to produce an ASCII output
file. Most mailers can't handle a binary file, so use the ASCII option
to perform the equivalent of a
uuencode. In PGP-speak,
the ASCII output is called an ASCII armor file or a transport armor
file, and is given the .asc extension.
- PGP treats the message like a text file when the
option is given. When this file is decrypted on a Macintosh or
Windows/DOS machine, it will have the correct end of line characters
inserted. Unless you're specifically encrypting a binary file (such as
a data set), use the
-toption to preserve your end-of-line
Now that we have message.asc, we can simply drop it in the
mail to Pepe:
heuy% mail firstname.lastname@example.org < message.asc
Very few people compose mail in a text file and then pipe it to mail.
PGP's filter option (
-f) makes it easier to combine
the encryption and composition steps: