Commits

Anonymous committed eeed702

Created

Comments (0)

Files changed (12)

+Mailcrypt version 3.4 is now available.
+
+Mailcrypt is an Emacs Lisp package which provides a simple interface
+to message encryption with PGP.  (You do use Emacs to handle your mail
+and news, right?)
+
+Features: Encryption, decryption, signing, adding keys, extracting
+keys, passphrase caching with timeout, multiple secret key (identity)
+support, a simple but flexible interface to Cypherpunk remailers
+(including chaining, response blocks, pseudonyms, and Mixmaster
+support), and an automatic keyserver interface via HTTP.
+
+*We* think it's the best interface to these functions anywhere, but
+then again, we're biased.
+
+The NEWS file is appended to this message.
+
+Obtain it from the Mailcrypt home page at
+
+	http://cag-www.lcs.mit.edu/mailcrypt/
+
+or via FTP to
+
+	ftp://cag.lcs.mit.edu/pub/patl/
+
+Enjoy!
+
+ - Patrick J. LoPresti (patl@lcs.mit.edu)
+ - Jin S. Choi (jin@atype.com)
+1998-01-12  SL Baur  <steve@altair.xemacs.org>
+
+	* Makefile: Update to newer package interface.
+
+1997-01-05  SL Baur  <steve@altair.xemacs.org>
+
+	* Makefile: Update to newer package interface.
+
+1997-12-21  SL Baur  <steve@altair.xemacs.org>
+
+	* Makefile: Created.
+
+Wed Apr 24 17:59:45 1996  Steven L Baur  <steve@miranova.com>
+
+	* mailcrypt.el (mc-modes-alist): September Gnus has message-mode
+	for editing mail and news messages.
+
+Tue Oct 10 15:53:01 1995  Patrick J. LoPresti  <patl@eiffel.lcs.mit.edu>
+
+	* Version 3.4 released.
+
+Wed Oct  4 18:25:02 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* INSTALL: Document setting mc-pgp-comment to nil if using
+	obsolete version of PGP.
+
+	* mc-remail.el (mc-parse-levien-buffer): Allow remailers with
+ 	"mix" property, even if "pgp" and "cpunk" properties are lacking.
+	(mc-generic-pre-encrypt-function): Don't try to
+	expand-mail-aliases if 'mail-abbrevs is provided.
+
+	* mc-pgp.el (mc-pgp-always-fetch): New variable.  Use to regulate
+	key fetching.
+
+Fri Sep 29 14:39:17 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mailcrypt.el (mc-deactivate-passwd): Don't give feedback unless
+	called interactively.
+	(mc-get-fields): Use `buffer-substring-no-properties' to get the
+	body of the field as well as the name.  Egad.
+
+Fri Sep 22 15:34:47 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-toplev.el (mc-gnus-verify-signature): Renamed from
+	`mc-gnus-summary-verify-signature'.
+	(mc-gnus-snarf-keys): Renamed from `mc-gnus-summary-snarf-keys'.
+	(mc-gnus-decrypt-message): Renamed from
+	`mc-gnus-summary-decrypt-message'.
+
+	* mailcrypt.el (mc-modes-alist): Add `gnus-article-mode'.
+	Reflect	name changes to Gnus support functions.
+
+Wed Sep 20 09:30:53 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-toplev.el (mc-gnus-summary-decrypt-message): Bind
+	`case-fold-search' to nil when matching "Gnus".
+
+	* mailcrypt.el (mc-xemacs-p): "XEmacs", not "Xemacs".
+
+Sat Sep 16 09:51:03 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-pgp.el (mc-pgp-encrypt-region): If no recipients, just armor
+	file.
+	(mc-pgp-msg-end-line): Match optional newline at end.
+	(mc-pgp-encrypt-region): Don't honor mc-encrypt-for-me if only
+	armoring.
+	Output "Armoring..." if only armoring.
+
+	* mc-toplev.el (mc-gnus-summary-decrypt-message): Don't
+	bother trapping error on decrypt.
+	Require Gnus version 5.0.4 or higher.
+	Use new	`gnus-group-read-only-p' predicate.
+	Pass t to `gnus-summary-edit-article'.
+	(mc-encrypt-message): Punt check for no recipients.
+
+Sun Sep 10 16:36:37 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-pgp.el (mc-pgp-decrypt-parser): Deal with armor-only files.
+
+	* mc-remail.el (mc-eliminate-continuation-lines): New function.
+	(mc-generic-pre-encrypt-function): Eliminate continuation lines in
+	preserved headers.
+	(mc-rewrite-for-mixmaster): Ditto.
+
+Mon Sep  4 17:57:47 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mailcrypt.el (mc-process-region): Make sure we are in the source
+ 	buffer when starting process, in case `process-environment' is
+ 	buffer-local.
+
+	* mc-remail.el (mc-rewrite-for-mixmaster): Signal error if
+ 	attempting to post through a Mixmaster.
+
+Sun Sep  3 18:09:58 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-pgp.el (mc-pgp-decrypt-region): Add strategic
+ 	`save-excursion' calls to avoid changing buffers inside `let'.
+
+Fri Sep  1 15:05:56 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-remail.el (mc-remailer-remove-property): New function.
+	(mc-remailer-canonicalize-chain): Make second arg CHAINS-ALIST
+	optional; default to `(mc-remailer-make-chains-alist)'.
+	(mc-demix): New function.
+
+	* mailcrypt.el (mc-process-region): Fix regexp to match "Process
+	*PGP* killed" et al.
+
+Thu Aug 31 12:52:44 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-toplev.el (mc-encrypt-message): Clean up.  Use
+	`mc-get-fields' and `mc-strip-addresses'.
+
+	* mailcrypt.el (mc-strip-addresses): New function. Use everywhere.
+	
+	* mc-remail.el (mc-remailer-choose-first): New function.
+	(mc-remailer-choose-chain): New function.
+	(mc-parse-levien-buffer): Add support for returning a "ranking" of
+	remailers.
+	(mc-remailer-canonicalize-elmt): Add support for using an integer
+	N in a remailer-list to represent the top N remailers, shuffled
+	randomly.
+	(mc-strip-address): New function.  Use everywhere.
+
+	* mc-toplev.el (mc-vm-decrypt-message): Bind `this-command' to
+	`vm-edit-message-end' to trick VM into doing the right thing when
+	redisplaying.
+
+Sun Aug 27 13:12:22 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-toplev.el (mc-sign-generic): Only run hooks if signing was
+	successful.
+
+Sat Aug 26 09:18:51 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-toplev.el (mc-vm-decrypt-message): Bind `vm-frame-per-edit'
+	to nil.
+
+Fri Aug 25 17:41:28 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-toplev.el (mc-sign-generic): Return result of signing
+	message, instead of always returning nil.
+
+Mon Aug 21 11:58:07 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mailcrypt.el (mc-modes-alist): Add support for
+	`vm-virutal-mode'.
+
+Sun Aug 20 15:19:52 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* Makefile.in (install): Use a loop for installing .elc files,
+	since install-sh can't copy multiple files at once.
+
+	* mc-toplev.el (mc-gnus-summary-decrypt-message): Back out 8/4
+	change; call `gnus-summary-edit-article-postpone' instead.
+	Call `gnus-version' function instead of reading variable.
+
+Fri Aug  4 11:51:37 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-toplev.el (mc-gnus-summary-decrypt-message): Run
+	`gnus-article-display-hook' after decrypting.
+
+Wed Aug  2 10:05:06 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mailcrypt.el (mc-split): Use \\' instead of $ to match end of
+	string.
+	
+Tue Aug  1 15:55:47 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* Version 3.3 released.
+
+Mon Jul 31 11:22:23 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-toplev.el (mc-rmail-decrypt-message): Use abstractions for
+	keymaps to work with XEmacs.
+	(mc-gnus-summary-decrypt-message): Clean up.
+	(mc-gnus-summary-verify-signature): Don't display all headers.
+	(mc-gnus-summary-snarf-keys): Ditto.
+
+Sat Jul 29 11:47:51 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-pgp.el (mc-pgp-decrypt-region): Call `undo-boundary'.
+
+Thu Jul 27 20:56:41 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* load-path.hack: Give a friendly warning if a version of Emacs
+	other than 19 is used to byte-compile.
+
+Thu Jul 27 16:05:13 1995  Patrick J. LoPresti  <patl@eiffel.lcs.mit.edu>
+
+	* configure.in: Use `EMACS19' instead of `EMACS' for autoconf
+ 	substitution variable, lest "configure" get confused when run
+ 	under an Emacs shell.
+
+	* Makefile.in: Ditto.
+
+Thu Jul 27 10:24:47 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-pgp.el (mc-pgp-keyserver-address): Use "pgp.ai.mit.edu"
+	instead of "www-swiss.ai.mit.edu".
+
+	* ANNOUNCE: Update version and date in preparation for 3.3
+ 	release.
+
+	* INSTALL: Updated to reflect new installation directory and
+	absolute requirement of `easymenu'.
+
+	* mailcrypt.el (mc-process-region): Fix parenthesization error.
+	Again.
+
+Wed Jul 26 12:48:50 1995  Patrick J. LoPresti  <patl@eiffel.lcs.mit.edu>
+
+	* mc-remail.el (mc-rewrite-for-remailer): Use `mc-encrypt-for-me'
+	instead of `mc-encrypt-to-me', since there the latter does not
+	exist.
+
+Sun Jul 23 13:01:47 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-pgp.el (mc-pgp-decrypt-region): Clean up case where key is
+	missing and we offer to fetch it.
+
+Thu Jul 20 11:51:06 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-pgp.el (mc-pgp-newkey-re): Incorporate fix from Mike Long to
+	only recognize key additions.
+
+Wed Jul 19 10:50:55 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mailcrypt.el: Deal with unbound buffer-substring-no-properties
+ 	to work with Emacs 19.28 after all.
+
+	* mc-pgp.el (mc-pgp-verify-region): Return nil if signature fails
+	to verify.
+
+	* mc-toplev.el (mc-sign-generic): Make sure start and end are
+	markers before calling mc-pre-signature-hook.
+	(mc-encrypt-generic): Ditto, mc-pre-encryption-hook.
+
+	* mc-remail.el (mc-remailer-insert-response-block): Fix
+ 	parenthesization error.
+
+	* mc-toplev.el (mc-gnus-summary-decrypt-message): Incorporate Fran
+	Litterio's changes for (ding) GNUS.
+	Clean up MH-E stuff a bit.  Should really redo it entirely at some
+	point.
+
+	* texi2html.ext: New file.
+
+Tue Jul 18 14:26:00 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* Fix stuff all over to silence byte compilation warnings under
+	XEmacs.
+
+	* mailcrypt.el: (require 'easymenu) outright.  Starting now we
+ 	demand at least FSF Emacs 19.28 or XEmacs 19.13.
+
+Mon Jul 17 16:30:43 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* Makefile.in: Minor tweaks.  Use `.../share/emacs/site-lisp'.
+
+Sun Jul 16 13:48:06 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-pgp.el: Use "buffer-substring-no-properties" everywhere.  Feh.
+	mc-remail.el: Ditto.
+	
+Sat Jul 15 01:41:18 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-pgp.el: Add "+language=en" to PGP command lines so that we
+	are sure to parse the output correctly.
+
+Wed Jul 12 16:37:37 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-toplev.el (mc-vm-verify-signature): Call vm-widen-page in
+	case vm-honor-page-delimiters is set.
+	(mc-vm-snarf-keys): Ditto.
+	('mail-utils): Required for mail-fetch-field on some Emacsen.
+
+Fri Jun 30 10:20:52 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-remail.el (mc-rewrite-news-to-mail): Nuke "Newsgroups" field.
+
+Fri Jun 23 11:04:54 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* Version 3.2 released.
+
+	* mc-pgp.el (mc-pgp-fetch-key): Add "+batchmode" to PGP arglist.
+	(mc-pgp-key-begin-line): Allow match only when delimiter string
+	is the entire line.
+	(mc-pgp-key-end-line): Likewise.
+
+	* configure.in: New file.
+	configure: New file.
+	Makefile.in: New file.  Brought into conformance with GNU
+	standards.
+	INSTALL: Revised to reflect `autoconf'-generated configuration
+	scheme.
+
+	* mailcrypt.el (mc-deactivate-passwd, mc-activate-passwd): Do the
+	right thing if both `timer' and `itimer' are present.
+
+Thu Jun 22 16:57:49 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-pgp.el (mc-pgp-generic-parser): Include '\n' from final
+	delimiter line.
+
+Wed Jun 21 18:13:10 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-pgp.el (mc-pgp-fetch-key): Give a diagnostic if the key was
+	not found.
+
+Tue Jun 20 00:53:51 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-toplev.el (mc-rmail-view-quit): Mark buffer unmodified when
+	quitting.
+
+	* mailcrypt.el (mc-process-region): Don't rely on
+	accept-process-output returning immediately if process is dead
+	(for XEmacs' sake).
+
+	* README: Revised (i.e., truncated) to reflect INSTALL file,
+        Texinfo docs, and Web pages.
+
+	* INSTALL: New file.
+
+	* Makefile: New file.
+
+Mon Jun 19 16:55:39 1995  Patrick J. LoPresti  <patl@catfish.lcs.mit.edu>
+
+	* NEWS: New file.
+
+	* mailcrypt.texi: New file.  Spent last few days getting this
+	written and the Web pages up.
+
+Fri Jun 16 17:55:14 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-pgp.el (mc-pgp-comment): New variable.
+
+Thu Jun 15 00:33:44 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mc-pgp.el: New file.
+
+	* mc-toplev.el: New file.
+
+Wed Jun 14 16:51:00 1995  Patrick J. LoPresti  <patl@catfish.lcs.mit.edu>
+
+	* mailcrypt.el (mc-pgp-fetch-from-keyrings): New function.
+	(mc-pgp-fetch-keyring-list): New variable.
+	Forgot to document most of the changes in the past week, oh well.
+	(mc-scheme-pgp): New function to replace variable of same name in
+	preparation for putting PGP support into its own file.
+
+Thu Jun  8 13:16:50 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mailcrypt.el (mc-pgp-fetch-finger): New function.
+	(mc-pgp-fetch-http): New function.
+	(mc-pgp-fetch-key): New function.
+
+Thu Jun  1 20:09:21 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mailcrypt.el (mc-encrypt-generic): Only use Email addresses in
+	default-recipients.
+	(mc-pgp-generic-parser): Fix parenthesis error causing non-nil
+	return on bad passphrase.  Fix regular expression for bad
+	passphrase.
+
+Thu May 11 19:32:19 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mailcrypt.el (mc-pgp-display-snarf-output): New variable,
+	defaults to nil.  If t, pop up a window to display the output of
+	key snarfing.
+
+	* mc-remail.el (mc-nuke-field): Do not clobber markers.  (This is
+	the wrong place to do it anyway.)
+	(mc-rewrite-for-remailer): Eliminate "Comment" and "From" headers
+	after encryption.
+
+Tue May  9 15:58:53 1995  Patrick J. LoPresti  <patl@eiffel.lcs.mit.edu>
+
+	* mailcrypt.el (mc-modes-alist): Fix typos for mh-folder-mode and
+	gnus-summary-mode.
+	(mc-sign-message): Fix parenthesization error in let.
+
+Mon May  8 22:27:20 1995  Patrick J. LoPresti  <patl@skyclad.lcs.mit.edu>
+
+	* mailcrypt.el (mc-encrypt-region): New interactive function.
+        Encrypts the current region by calling the appropriate function as
+        determined by mc-modes-alist.
+	(mc-encrypt-generic): New function; bottom level of
+	scheme-independent encryption routines.
+	(mc-encrypt-message): Rewritten to call mc-encrypt-generic.
+	(mc-encrypt): Rewritten to just call mc-encrypt-region.
+	Upshot of all this is to allow encryption in arbitrary buffers,
+	not just message buffers.
+	(mc-sign-region): New interactive function.
+	(mc-sign-generic): New function; bottom level of
+	scheme-independent signing routines.
+	(mc-sign-message): Rewritten to call mc-sign-generic.
+	(mc-sign): Rewritten to just call mc-sign-region.
+	Upshot of all this is to allow signing in arbitrary buffers, not
+	just message buffers.
+
+Mon May  8 16:02:45 1995  Patrick J. LoPresti  <patl@eiffel.lcs.mit.edu>
+
+	* mailcrypt.el (mc-always-replace): Add 'never option.
+	(mc-message): Remove "is-err" argument.
+	Only deactivate passphrase on "Bad passphrase" error.
+# Makefile for Mailcrypt lisp code
+
+# This file is part of XEmacs.
+
+# XEmacs is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2, or (at your option) any
+# later version.
+
+# XEmacs is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with XEmacs; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+VERSION = 1.02
+PACKAGE = mailcrypt
+PKG_TYPE = regular
+REQUIRES = gnus vm mail-lib xemacs-base
+CATEGORY = comm
+
+ELCS = mailcrypt.elc mc-pgp.elc mc-remail.elc mc-toplev.elc
+
+INFO_FILES = $(PACKAGE).info*
+
+include ../../XEmacs.rules
+
+all:: $(ELCS) auto-autoloads.elc $(PACKAGE).info
+
+srckit: srckit-std
+
+binkit: binkit-sourceinfo
+Noteworthy changes in Mailcrypt version 3.4:
+
+Several bug fixes, mostly in the remailer functions.
+
+`C-c / d' can now decode armor-only messages.
+
+`C-c / e' with an empty recipient list now generates an armor-only
+message.
+
+Better support for Gnus 5 (formerly "(ding) Gnus"), including
+decryption of messages in read-only groups.  Requires Gnus 5.0.4 or
+higher.
+
+Better support for recent versions (5.95+) of VM.
+
+New option for remailer list entries: Positive integer N represents a
+random permutation of the N "best" remailers as ordered in
+`~/.remailers'.
+
+New configuration variable `mc-pgp-always-fetch' to control attempts
+to fetch PGP keys.  Legal values are t, 'never, and nil (the default).
+
+
+Noteworthy changes in Mailcrypt version 3.3:
+
+Numerous minor bugs have been fixed.
+
+Mailcrypt now requires at least FSF Emacs version 19.28 or XEmacs
+version 19.12.  Sorry, but anything else is too annoying.
+
+Support has been added for reading mail under (ding) Gnus.
+
+
+Noteworthy changes in Mailcrypt version 3.2:
+
+Mailcrypt now uses "start-process" instead of "call-process-region" to
+run PGP; this uses a pipe instead of a temp file for various inputs,
+including your passphrase.  Ahem.
+
+All Mailcrypt commands now start with the prefix `C-c /' to bring
+Mailcrypt into line with documented GNU standards.
+
+`mc-insert-public-key' is now bound to `C-c / x' (an in "extract")
+instead of `C-c a'.
+
+`mc-deactivate-passwd' is bound to `C-c / f' (as in "forget").
+
+`mc-read-mode' and `mc-write-mode' are now full-blown minor modes.  So
+you can do, for example, `M-x mc-install-write-mode' from a Text mode
+buffer and have the normal encryption and signing commands available.
+The keymaps for the modes are configurable variables.
+
+Interactive commands `mc-encrypt-region', `mc-sign-region', etc. are
+now defined.
+
+If you use RMAIL and you say no to "Replace encrypted message with
+decrypted?", you will be dropped into RMAIL mode for viewing.
+
+RMAIL summary mode is now supported.
+
+Documentation in the form of a Texinfo file is now part of the
+distribution.
+
+Mailcrypt can now fetch a needed key from finger, HTTP, or any of a
+list of locally stored keyrings.  `C-c / k' initiates a fetch
+manually; Mailcrypt will offer to initiate one automatically as
+appropriate during encryption or signature verification.
+
+The remailer functions now support Mixmaster.
+
+`C-c / d' can handle conventionally encrypted messages.
+;;{{{ Change Log
+;;{{{ Changes from 3.0:
+;; * Generate a warning if some public keys are found while others
+;;   are not during encryption.
+;; * Rewrite calls like (message msg) to (message "%s" msg), in case
+;;   msg includes a "%".
+;; * Handle case in mc-pgp-decrypt-region when signature verifies, but
+;;   key has not been certified.
+;; * Put save-excursion around each top-level function.
+;; * Handle case in mc-pgp-decrypt-region when signature fails to verify
+;;   because you don't have the necessary public key.
+;; * Locally bind mc-encrypt-for-me to nil before encrypting in
+;;   mc-remail.
+;; * Include "+encrypttoself=off" in PGP command line flags.
+;; * Include "+verbose=1" in PGP command line flags (finally).
+;; * Hacked mc-rmail-verify-signature to make sure rmailkwd is loaded
+;;   before message is verified.
+;; * (require 'gnus) when compiling.  Thanks to Peter Arius
+;;    <arius@immd2.informatik.uni-erlangen.de>
+;;}}}
+;;{{{ Changes from 2.0:
+;; * C-u to mc-encrypt-message now prompts for an ID to use
+;;   for signing.  C-u C-u also prompts for scheme to use.
+;; * Signing now uses the From line (pseudonym) to choose key.
+;; * Support for multiple secret keys added.  Many internal interfaces
+;;   changed.
+;; * autoload remailer support for mc-remail.el and set default keybindings.
+;; * mc-pgp-always-sign now has a 'never option.
+;; * mc-pgp-encrypt-region returns t on success.
+;; * Added mc-vm-snarf-keys, from Joe Reinhardt
+;;   <jmr@everest.radiology.uiowa.edu>.
+;; * Changed mc-snarf-keys to actually snarf all keys in the buffer instead
+;;   of just the first one.
+;; * In VM, not replacing a message puts the message into its own VM buffer
+;;   so you can reply to it, forward it, etc. Thanks to Pat Lopresti
+;;   <patl@lcs.mit.edu> for the suggestion.
+;; * Abort edit mode in VM and RMAIL decrypt functions if no encrypted 
+;;   message was found. 
+;; * Added version string.
+;; * Applied some new patches from stig adding autoloads and minor additions.
+;; * Made check for window-system generic, and only for emacs versions > 19.
+;; * Added option to mc-sign-message to disable clearsig when signing messages.
+;;   From Stig <stig@hackvan.com>.
+;; * Fixed extra comma bug when offering default recipients to encrypt for.
+;;}}}
+;;{{{ Changes from 1.6:
+;; * Decrypting a signed message in RMAIL adds a verified tag to the message.
+;; * mc-sign-message takes an optional argument specifying which key to use,
+;;   for people who have multiple private keys.
+;; * Added mc-{pre,post}-{de,en}cryption-hooks.
+;; * Additions to docstrings of the major functions and `mailcrypt-*' aliases
+;;   for the same.
+;; * Added cleanup for possible temp files left over if a process was
+;;   interrupted.
+;; * Easier installation instructions.
+;; * Lots of little bug fixes from all over. Too many to list
+;;   individual credits, but I've tried to include all of them. Thanks
+;;   to all who sent them in, especially to John T Kohl who fixed an
+;;   especially trying problem.
+;; * Another optional argument to mc-insert-public-key that allows the
+;;   user to specify which public key to insert when called with a
+;;   prefix argument.
+;; * Tons of changes from Paul Furnanz <paul_furnanz@rainbow.mentorg.com>:
+;; 1) Use the itimer package instead of the timer package if it exists.
+;;    This makes the password deactivation code work for Lemacs as well
+;;    as emacs 19.
+;; 2) Fractured the code, so that there is a single function to use
+;;    when calling the encryption program.  The new function is
+;;    mc-process-region.  The function copies all data to a temporary
+;;    buffer, and does the work there.  This way if you do an undo after
+;;    an encryption or signing, your password is not visible on the
+;;    screen. 
+;; 3) All process output goes to the *MailCrypt* buffer.  No longer use
+;;    a separate buffer for decryption, encryption, verification, ...
+;;    This allows the user to always look at the *MailCrypt* buffer to
+;;    see what pgp or ripem said.
+;; 4) No longer call mc-temp-display.  Use display-buffer if there is a
+;;    reason to show the buffer (like an error occured).
+;; 5) Try to print more useful messages.
+;; 6) If an error occurs on encryption, the message is left unchanged.
+;;    No reason to undo.
+;;}}}
+;;{{{ Changes from 1.5:
+;; * Changed mc-temp-display to just dump into a temp buffer, without
+;;   any fancy display stuff. Pick up show-temp.el if you liked the
+;;   display stuff (or uncomment the old mc-temp-buffer and remove the
+;;   new version).
+;; * Provided a generic read mode function to call in hooks, like the
+;;   generic write mode function that was already there.
+;; * Fixed bug in regexp that prevented compilation under recent
+;;   versions of FSF emacs.
+;; * Narrow to headers when extracting default recipients for encryption
+;;   to avoid pulling in recipients of included messages.
+;; * Use `fillarray' to overwrite passwords with nulls before deactivation
+;;   for increased security.
+;; * Load mail-extr.el to get mail-extract-address-components defined.
+;; Thanks to Kevin Rodgers <kevin@traffic.den.mmc.com> for the following
+;; improvements.
+;; * Quoted an unquoted lambda expression that prevented optimized 
+;;   compilation under emacs 18.
+;; * Used `nconc' instead of `append' in various places to save on 
+;;   garbage collection.
+;; * Modified mc-split to run more efficiently.
+;;}}}
+;;{{{ Changes from 1.4:
+;; * Call mail-extract-address-components on the recipients if we guessed
+;;   them from the header fields.
+;; * If you don't replace a message with its decrypted version, it will now
+;;   pop you into a view buffer with the contents of the message.
+;; * Added support for mh-e, contributed by Fritz Knabe <Fritz.Knabe@ecrc.de>
+;; * Fixed bug in snarfing keys from menubar under GNUS.
+;; * Fixed RIPEM verification problem, thanks to Sergey Gleizer
+;;   <sgleizer@cs.nmsu.edu>.
+;;}}}
+;;{{{ Changes from 1.3:
+;; * Temp display function does not barf on F-keys or mouse events.
+;;     Thanks to Jonathan Stigelman <stig@key.amdahl.com>
+;; * Lucid emacs menu support provided by William Perry <wmperry@indiana.edu>
+;; * Cited signed messages would interfere with signature 
+;;	verification; fixed.
+;;}}}
+;;{{{ Changes from 1.2:
+;; * Added menu bar support for emacs 19.
+;; * Added GNUS support thanks to Samuel Druker <samuel@telmar.com>.
+;;}}}
+;;{{{ Changes from 1.1:
+;; * Added recipients field to mc-encrypt-message.
+;;}}}
+;;{{{ Changes from 1.0:
+;; * Fixed batchmode bug in decryption, where unsigned messages would return
+;;   with exit code of 1.
+;;}}}
+;;{{{ Changes from 0.3b:
+;; * Only set PGPPASSFD when needed, so PGP won't break when used
+;;   in shell mode.
+;; * Use call-process-region instead of shell-command-on-region in order
+;;   to detect exit codes.
+;; * Changed mc-temp-display to not use the kill ring.
+;; * Bug fixes.
+;;}}}
+;;{{{ Changes from 0.2b:
+;; * Prompts for replacement in mc-rmail-decrypt-message.
+;; * Bug fixes.
+;;}}}
+;;{{{ Changes from 0.1b:
+;; * Several bug fixes.
+;; Contributed by Jason Merrill <jason@cygnus.com>:
+;; * VM mailreader support
+;; * Support for addresses with spaces and <>'s in them
+;; * Support for using an explicit path for the pgp executable
+;; * Key management functions
+;; * The ability to avoid some of the prompts when encrypting
+;; * Assumes mc-default-scheme unless prefixed
+;;}}}
+
+;;}}}
+Mailcrypt is an Emacs lisp package which provides a simple interface
+to cryptographic functions with PGP.  It was written by Patrick
+LoPresti (patl@lcs.mit.edu) and Jin Choi (jin@atype.com).
+
+The latest version of Mailcrypt is always (?) available through the
+Mailcrypt home page at `http://cag-www.lcs.mit.edu/mailcrypt/'.  An
+FTP mirror is at `ftp://cag.lcs.mit.edu/pub/patl/'.
+
+To install the Mailcrypt package on your system, follow the directions
+in the file `INSTALL'.
+
+To hook Mailcrypt into your mail and news browsers, follow the
+directions in the "Installation" section of the Mailcrypt manual.  If
+you don't know how to use the Emacs Info browser, you should learn;
+type `C-h i' and poke around.  You can read the Info version of the
+Mailcrypt manual by doing `C-u C-h i' on the file `mailcrypt.info'.
+
+Or read the HTML version of the manual which is directly accessible
+from the Mailcrypt home page.
+
+To automatically be informed of improvements to Mailcrypt, add
+yourself to the (very low volume) Mailcrypt announcement list.  Send
+Email to mc-announce-request@cag.lcs.mit.edu with a request to be
+added.
+
+Send all bug reports and comments to the authors.  And most of all,
+enjoy!
+
+ - Patrick LoPresti (patl@lcs.mit.edu) and Jin Choi (jin@atype.com)
+   Thu Jun 22 19:58:35 1995
+;; mailcrypt.el v3.4, mail encryption with PGP
+;; Copyright (C) 1995  Jin Choi <jin@atype.com>
+;;                     Patrick LoPresti <patl@lcs.mit.edu>
+;; Any comments or suggestions welcome.
+;; Inspired by pgp.el, by Gray Watson <gray@antaire.com>.
+
+;;{{{ Licensing
+;; This file is intended to be used with GNU Emacs.
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to
+;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;;}}}
+
+;;{{{ Load some required packages
+
+(eval-when-compile
+  ;; Quiet warnings
+  (autoload 'start-itimer "itimer")
+  (autoload 'cancel-itimer "itimer")
+  (autoload 'delete-itimer "itimer"))
+
+(require 'easymenu)
+(require 'comint)
+
+(eval-and-compile
+  (condition-case nil (require 'itimer) (error nil))
+  (if (not (featurep 'itimer))
+      (condition-case nil (require 'timer) (error nil)))
+
+  (if (not (fboundp 'buffer-substring-no-properties))
+      (fset 'buffer-substring-no-properties 'buffer-substring)))
+
+(defconst mc-xemacs-p (string-match "XEmacs" emacs-version))
+
+(if (not mc-xemacs-p)
+    (progn
+      (autoload 'mc-decrypt "mc-toplev" nil t)
+      (autoload 'mc-verify "mc-toplev" nil t)
+      (autoload 'mc-snarf "mc-toplev" nil t)
+      (autoload 'mc-pgp-fetch-key "mc-pgp" nil t)
+      (autoload 'mc-encrypt "mc-toplev" nil t)
+      (autoload 'mc-sign "mc-toplev" nil t)
+      (autoload 'mc-insert-public-key "mc-toplev" nil t)
+      (autoload 'mc-remailer-encrypt-for-chain "mc-remail" nil t)
+      (autoload 'mc-remailer-insert-response-block "mc-remail" nil t)
+      (autoload 'mc-remailer-insert-pseudonym "mc-remail" nil t)))
+
+;;}}}
+
+;;{{{ Minor mode variables and functions
+
+(defvar mc-read-mode nil
+  "Non-nil means Mailcrypt read mode key bindings are available.")
+
+(defvar mc-write-mode nil
+  "Non-nil means Mailcrypt write mode key bindings are available.")
+
+(make-variable-buffer-local 'mc-read-mode)
+(make-variable-buffer-local 'mc-write-mode)
+
+(defvar mc-read-mode-string " MC-r"
+  "*String to put in mode line when Mailcrypt read mode is active.")
+
+(defvar mc-write-mode-string " MC-w"
+  "*String to put in mode line when Mailcrypt write mode is active.")
+
+(defvar mc-read-mode-map nil
+  "Keymap for Mailcrypt read mode bindings.")
+
+(defvar mc-write-mode-map nil
+  "Keymap for Mailcrypt write mode bindings.")
+
+(or mc-read-mode-map
+    (progn
+      (setq mc-read-mode-map (make-sparse-keymap))
+      (define-key mc-read-mode-map "\C-c/f" 'mc-deactivate-passwd)
+      (define-key mc-read-mode-map "\C-c/d" 'mc-decrypt)
+      (define-key mc-read-mode-map "\C-c/v" 'mc-verify)
+      (define-key mc-read-mode-map "\C-c/a" 'mc-snarf)
+      (define-key mc-read-mode-map "\C-c/k" 'mc-pgp-fetch-key)))
+
+(or mc-write-mode-map
+    (progn
+      (setq mc-write-mode-map (make-sparse-keymap))
+      (define-key mc-write-mode-map "\C-c/f" 'mc-deactivate-passwd)
+      (define-key mc-write-mode-map "\C-c/e" 'mc-encrypt)
+      (define-key mc-write-mode-map "\C-c/s" 'mc-sign)
+      (define-key mc-write-mode-map "\C-c/x" 'mc-insert-public-key)
+      (define-key mc-write-mode-map "\C-c/k" 'mc-pgp-fetch-key)
+      (define-key mc-write-mode-map "\C-c/r"
+	'mc-remailer-encrypt-for-chain)
+      (define-key mc-write-mode-map "\C-c/b"
+	'mc-remailer-insert-response-block)
+      (define-key mc-write-mode-map "\C-c/p"
+	'mc-remailer-insert-pseudonym)))
+
+(easy-menu-define
+ mc-read-mode-menu (if mc-xemacs-p nil (list mc-read-mode-map))
+ "Mailcrypt read mode menu."
+ '("Mailcrypt"
+   ["Decrypt Message" mc-decrypt t]
+   ["Verify Signature" mc-verify t]
+   ["Snarf Keys" mc-snarf t]
+   ["Fetch Key" mc-pgp-fetch-key t]
+   ["Forget Passphrase(s)" mc-deactivate-passwd t]))
+
+(easy-menu-define
+ mc-write-mode-menu (if mc-xemacs-p nil (list mc-write-mode-map))
+ "Mailcrypt write mode menu."
+ '("Mailcrypt"
+   ["Encrypt Message" mc-encrypt t]
+   ["Sign Message" mc-sign t]
+   ["Insert Public Key" mc-insert-public-key t]
+   ["Fetch Key" mc-pgp-fetch-key t]
+   ["Encrypt for Remailer(s)" mc-remailer-encrypt-for-chain t]
+   ["Insert Pseudonym" mc-remailer-insert-pseudonym t]
+   ["Insert Response Block" mc-remailer-insert-response-block t]
+   ["Forget Passphrase(s)" mc-deactivate-passwd t]))
+
+(or (assq 'mc-read-mode minor-mode-map-alist)
+    (setq minor-mode-map-alist
+	  (cons (cons 'mc-read-mode mc-read-mode-map)
+		minor-mode-map-alist)))
+
+(or (assq 'mc-write-mode minor-mode-map-alist)
+    (setq minor-mode-map-alist
+	  (cons (cons 'mc-write-mode mc-write-mode-map)
+		minor-mode-map-alist)))
+
+(or (assq 'mc-read-mode minor-mode-alist)
+    (setq minor-mode-alist
+	  (cons '(mc-read-mode mc-read-mode-string) minor-mode-alist)))
+
+(or (assq 'mc-write-mode minor-mode-alist)
+    (setq minor-mode-alist
+	  (cons '(mc-write-mode mc-write-mode-string) minor-mode-alist)))
+
+(defun mc-read-mode (&optional arg)
+  "\nMinor mode for interfacing with cryptographic functions.
+\\<mc-read-mode-map>
+\\[mc-decrypt]\t\tDecrypt an encrypted message
+\\[mc-verify]\t\tVerify signature on a clearsigned message
+\\[mc-snarf]\t\tAdd public key(s) to keyring
+\\[mc-pgp-fetch-key]\t\tFetch a PGP key via finger or HTTP
+\\[mc-deactivate-passwd]\t\tForget passphrase(s)\n"
+  (interactive)
+  (setq mc-read-mode
+	(if (null arg) (not mc-read-mode)
+	  (> (prefix-numeric-value arg) 0)))
+  (and mc-read-mode mc-write-mode (mc-write-mode nil))
+  (if mc-read-mode
+      (easy-menu-add mc-read-mode-menu)
+    (easy-menu-remove mc-read-mode-menu)))
+	
+(defun mc-write-mode (&optional arg)
+  "\nMinor mode for interfacing with cryptographic functions.
+\\<mc-write-mode-map>
+\\[mc-encrypt]\t\tEncrypt (and optionally sign) message
+\\[mc-sign]\t\tClearsign message
+\\[mc-insert-public-key]\t\tExtract public key from keyring and insert into message
+\\[mc-pgp-fetch-key]\t\tFetch a PGP key via finger or HTTP
+\\[mc-remailer-encrypt-for-chain]\t\tEncrypt message for remailing
+\\[mc-remailer-insert-pseudonym]\t\tInsert a pseudonym (for remailing)
+\\[mc-remailer-insert-response-block]\t\tInsert a response block (for remailing)
+\\[mc-deactivate-passwd]\t\tForget passphrase(s)\n"
+  (interactive)
+  (setq mc-write-mode
+	(if (null arg) (not mc-write-mode)
+	  (> (prefix-numeric-value arg) 0)))
+  (and mc-write-mode mc-read-mode (mc-read-mode nil))
+  (if mc-write-mode
+      (easy-menu-add mc-write-mode-menu)
+    (easy-menu-remove mc-write-mode-menu)))
+
+;;;###autoload
+(defun mc-install-read-mode ()
+  (interactive)
+  (mc-read-mode 1))
+
+;;;###autoload
+(defun mc-install-write-mode ()
+  (interactive)
+  (mc-write-mode 1))
+
+;;}}}
+
+;;{{{ Note:
+;; The funny triple braces you see are used by `folding-mode', a minor
+;; mode by Jamie Lokier, available from the elisp archive.
+;;}}}
+
+;;{{{ User variables.
+(defconst mc-version "3.4")
+(defvar mc-default-scheme 'mc-scheme-pgp "*Default encryption scheme to use.")
+(defvar mc-passwd-timeout 60
+  "*Time to deactivate password in seconds after a use.
+nil or 0 means deactivate immediately.  If the only timer package available
+is the 'timer' package, then this can be a string in timer format.")
+
+(defvar mc-ripem-user-id (or (getenv "RIPEM_USER_NAME")
+			     (user-full-name) "*Your RIPEM user ID."))
+
+(defvar mc-always-replace nil
+  "*If t, decrypt mail messages in place without prompting.
+
+If 'never, always use a viewer instead of replacing.")
+
+(defvar mc-use-default-recipients nil "*Assume that the message should
+  be encoded for everyone listed in the To, Cc, and Bcc fields.")
+
+(defvar mc-encrypt-for-me nil "*Encrypt all outgoing messages with
+  user's public key.")
+
+(defvar mc-pre-signature-hook nil
+  "*List of hook functions to run immediately before signing.")
+(defvar mc-post-signature-hook nil
+  "*List of hook functions to run immediately after signing.")
+(defvar mc-pre-encryption-hook nil 
+  "*List of hook functions to run immediately before encrypting.")
+(defvar mc-post-encryption-hook nil 
+  "*List of hook functions to run after encrypting.")
+(defvar mc-pre-decryption-hook nil 
+  "*List of hook functions to run immediately before decrypting.")
+(defvar mc-post-decryption-hook nil 
+  "*List of hook functions to run after decrypting.")
+
+(defconst mc-buffer-name "*MailCrypt*"
+  "Name of temporary buffer for mailcrypt")
+
+(defvar mc-modes-alist
+  '((rmail-mode (decrypt . mc-rmail-decrypt-message)
+		(verify . mc-rmail-verify-signature))
+    (rmail-summary-mode (decrypt . mc-rmail-summary-decrypt-message)
+			(verify . mc-rmail-summary-verify-signature)
+			(snarf . mc-rmail-summary-snarf-keys))
+    (vm-mode (decrypt . mc-vm-decrypt-message)
+	     (verify . mc-vm-verify-signature)
+	     (snarf . mc-vm-snarf-keys))
+    (vm-virtual-mode (decrypt . mc-vm-decrypt-message)
+		     (verify . mc-vm-verify-signature)
+		     (snarf . mc-vm-snarf-keys))
+    (vm-summary-mode (decrypt . mc-vm-decrypt-message)
+		     (verify . mc-vm-verify-signature)
+		     (snarf . mc-vm-snarf-keys))
+    (mh-folder-mode (decrypt . mc-mh-decrypt-message)
+		    (verify . mc-mh-verify-signature)
+		    (snarf . mc-mh-snarf-keys))
+    ;; September Gnus (5.2) has a new message editing mode
+    (message-mode (encrypt . mc-encrypt-message)
+		  (sign . mc-sign-message))
+    (gnus-summary-mode (decrypt . mc-gnus-decrypt-message)
+		       (verify . mc-gnus-verify-signature)
+		       (snarf . mc-gnus-snarf-keys))
+    (gnus-article-mode (decrypt . mc-gnus-decrypt-message)
+		       (verify . mc-gnus-verify-signature)
+		       (snarf . mc-gnus-snarf-keys))
+    (mail-mode (encrypt . mc-encrypt-message)
+	       (sign . mc-sign-message))
+    (vm-mail-mode (encrypt . mc-encrypt-message)
+		  (sign . mc-sign-message))
+    (mh-letter-mode (encrypt . mc-encrypt-message)
+		    (sign . mc-sign-message))
+    (news-reply-mode (encrypt . mc-encrypt-message)
+		     (sign . mc-sign-message)))
+
+  "Association list (indexed by major mode) of association lists
+(indexed by operation) of functions to call for each major mode.")
+
+;;}}}
+;;{{{ Program variables and constants.
+
+(defvar mc-timer nil "Timer object for password deactivation.")
+
+(defvar mc-passwd-cache nil "Cache for passphrases.")
+
+(defvar mc-schemes '(("pgp" . mc-scheme-pgp)))
+
+;;}}}
+
+;;{{{ Utility functions.
+
+(defun mc-message-delimiter-positions (start-re end-re &optional begin)
+  ;; Returns pair of integers (START . END) that delimit message marked off
+  ;; by the regular expressions start-re and end-re. Optional argument BEGIN
+  ;; determines where we should start looking from.
+  (setq begin (or begin (point-min)))
+  (let (start)
+    (save-excursion
+      (goto-char begin)
+      (and (re-search-forward start-re nil t)
+	   (setq start (match-beginning 0))
+	   (re-search-forward end-re nil t)
+	   (cons start (point))))))
+
+
+(defun mc-split (regexp str)
+  "Splits STR into a list of elements which were separated by REGEXP,
+stripping initial and trailing whitespace."
+  (let ((data (match-data))
+	(retval '())
+	beg end)
+    (unwind-protect
+	(progn
+	  (string-match "[ \t\n]*" str)	; Will always match at 0
+	  (setq beg (match-end 0))
+	  (setq end (string-match "[ \t\n]*\\'" str))
+	  (while (string-match regexp str beg)
+	    (setq retval
+		  (cons (substring str beg (match-beginning 0)) 
+			retval))
+	    (setq beg (match-end 0)))
+	  (if (not (= (length str) beg)) ; Not end
+	      (setq retval (cons (substring str beg end) retval)))
+	  (nreverse retval))
+      (store-match-data data))))
+
+;;; FIXME - Function never called?
+;(defun mc-temp-display (beg end &optional name)
+;  (let (tmp)
+;    (if (not name)
+;	(setq name mc-buffer-name))
+;    (if (string-match name "*ERROR*")
+;	(progn
+;	  (message "mailcrypt: An error occured!  See *ERROR* buffer.")
+;	  (beep)))
+;    (setq tmp (buffer-substring beg end))
+;    (delete-region beg end)
+;    (save-excursion
+;      (save-window-excursion
+;	(with-output-to-temp-buffer name
+;	  (princ tmp))))))
+
+;; In case I ever decide to do this right.
+(defconst mc-field-name-regexp "^\\(.+\\)")
+(defconst mc-field-body-regexp "\\(.*\\(\n[ \t].*\\)*\n\\)")
+
+(defun mc-get-fields (&optional matching bounds nuke)
+  "Get all header fields within BOUNDS.  Return as an
+alist ((FIELD-NAME . FIELD-BODY) (FIELD-NAME . FIELD-BODY) ...).
+
+Argument MATCHING, if present, is a regexp which each FIELD-NAME
+must match exactly.  Matching is case-insensitive.
+
+Optional arg NUKE, if non-nil, means eliminate all fields returned."
+  (save-excursion
+    (save-restriction
+      (let ((case-fold-search t)
+	    (header-field-regexp
+	     (concat mc-field-name-regexp ":" mc-field-body-regexp))
+	    ret name body field-start field-end)
+	;; Ensure exact match
+	(if matching
+	    (setq matching (concat "^\\(" matching "\\)$")))
+
+	(if bounds
+	    (narrow-to-region (car bounds) (cdr bounds)))
+
+	(goto-char (point-max))
+ 
+	(while (re-search-backward header-field-regexp nil 'move)
+	  (setq field-start (match-beginning 0))
+	  (setq field-end (match-end 0))
+	  (setq name (buffer-substring-no-properties
+		      (match-beginning 1) (match-end 1)))
+	  (setq body (buffer-substring-no-properties
+		      (match-beginning 2) (match-end 2)))
+	  (if (or (null matching) (string-match matching name))
+	      (progn
+		(setq ret (cons (cons name body) ret))
+		(if nuke
+		    (delete-region field-start field-end)))))
+	ret))))
+
+(defsubst mc-strip-address (addr)
+  "Strip everything from ADDR except the basic Email address."
+  (car (cdr (mail-extract-address-components addr))))
+
+(defun mc-strip-addresses (addr-list)
+  "Strip everything from the addresses in ADDR-LIST except the basic
+Email address.  ADDR-LIST may be a single string or a list of strings."
+  (if (not (listp addr-list)) (setq addr-list (list addr-list)))
+  (setq addr-list
+	(mapcar
+	 (function (lambda (s) (mc-split "\\([ \t\n]*,[ \t\n]*\\)" s)))
+	 addr-list))
+  (setq addr-list (apply 'append addr-list))
+  (mapconcat 'mc-strip-address addr-list ", "))
+
+(defun mc-display-buffer (buffer)
+  "Like display-buffer, but always display top of the buffer."
+  (save-excursion
+    (set-buffer buffer)
+    (goto-char (point-min))
+    (display-buffer buffer)))
+
+(defun mc-message (msg &optional buffer default)
+  ;; returns t if we used msg, nil if we used default
+  (let ((retval t))
+    (if buffer
+	(setq msg
+	      (save-excursion
+		(set-buffer buffer)
+		(goto-char (point-min))
+		(if (re-search-forward msg nil t)
+		    (buffer-substring-no-properties
+		     (match-beginning 0) (match-end 0))
+		  (setq retval nil)
+		  default))))
+    (if msg (message "%s" msg))
+    retval))
+
+(defun mc-process-region (beg end passwd program args parser &optional buffer)
+  (let ((obuf (current-buffer))
+	(process-connection-type nil)
+	mybuf result rgn proc)
+    (unwind-protect
+	(progn
+	  (setq mybuf (or buffer (generate-new-buffer " *mailcrypt temp")))
+	  (set-buffer mybuf)
+	  (erase-buffer)
+	  (set-buffer obuf)
+	  (buffer-disable-undo mybuf)
+	  (setq proc
+		(apply 'start-process "*PGP*" mybuf program args))
+	  (if passwd
+	      (progn
+		(process-send-string proc (concat passwd "\n"))
+		(or mc-passwd-timeout (mc-deactivate-passwd t))))
+	  (process-send-region proc beg end)
+	  (process-send-eof proc)
+	  (while (eq 'run (process-status proc))
+	    (accept-process-output proc 5))
+	  (setq result (process-exit-status proc))
+	  ;; Hack to force a status_notify() in Emacs 19.29
+	  (delete-process proc)
+	  (set-buffer mybuf)
+	  (goto-char (point-max))
+	  (if (re-search-backward "\nProcess \\*PGP.*\n\\'" nil t)
+	      (delete-region (match-beginning 0) (match-end 0)))
+	  (goto-char (point-min))
+	  ;; CRNL -> NL
+	  (while (search-forward "\r\n" nil t)
+	    (replace-match "\n"))
+	  ;; Hurm.  FIXME; must get better result codes.
+	  (if (stringp result)
+	      (error "%s exited abnormally: '%s'" program result)
+	    (setq rgn (funcall parser result))
+	    ;; If the parser found something, migrate it
+	    (if (consp rgn)
+		(progn
+		  (set-buffer obuf)
+		  (delete-region beg end)
+		  (goto-char beg)
+		  (insert-buffer-substring mybuf (car rgn) (cdr rgn))
+		  (set-buffer mybuf)
+		  (delete-region (car rgn) (cdr rgn)))))
+	  ;; Return nil on failure and exit code on success
+	  (if rgn result))
+      ;; Cleanup even on nonlocal exit
+      (if (and proc (eq 'run (process-status proc)))
+	  (interrupt-process proc))
+      (set-buffer obuf)
+      (or buffer (null mybuf) (kill-buffer mybuf)))))
+
+;;}}}
+
+;;{{{ Passphrase management
+(defun mc-activate-passwd (id &optional prompt)
+  "Activate the passphrase matching ID, using PROMPT for a prompt.
+Return the passphrase.  If PROMPT is nil, only return value if cached."
+  (cond ((featurep 'itimer)
+	 (if mc-timer (delete-itimer mc-timer))
+	 (setq mc-timer (if mc-passwd-timeout
+			    (start-itimer "mc-itimer"
+					  'mc-deactivate-passwd
+					  mc-passwd-timeout)
+			  nil)))
+	((featurep 'timer)
+	 (let ((string-time (if (integerp mc-passwd-timeout)
+				(format "%d sec" mc-passwd-timeout)
+			      mc-passwd-timeout)))
+	   (if mc-timer (cancel-timer mc-timer))
+	   (setq mc-timer (if string-time
+			      (run-at-time string-time 
+					   nil 'mc-deactivate-passwd)
+			    nil)))))
+  (let ((cell (assoc id mc-passwd-cache))
+	passwd)
+    (setq passwd (cdr-safe cell))
+    (if (and (not passwd) prompt)
+	(setq passwd (comint-read-noecho prompt)))
+    (if cell
+	(setcdr cell passwd)
+      (setq mc-passwd-cache (cons (cons id passwd) mc-passwd-cache)))
+    passwd))
+
+;;;###autoload
+(defun mc-deactivate-passwd (&optional inhibit-message)
+  "*Deactivate the passphrase cache."
+  (interactive)
+  (if mc-timer
+      (cond ((featurep 'itimer) (delete-itimer mc-timer))
+	    ((featurep 'timer) (cancel-timer mc-timer))))
+  (mapcar
+   (function
+    (lambda (cell)
+      (if (stringp (cdr-safe cell)) (fillarray (cdr cell) 0))
+      (setcdr cell nil)))
+   mc-passwd-cache)
+  (or inhibit-message
+      (not (interactive-p))
+      (message "Passphrase%s deactivated"
+	       (if (> (length mc-passwd-cache) 1) "s" ""))))
+
+;;}}}
+
+;;{{{ Define several aliases so that an apropos on `mailcrypt' will
+;; return something.
+(defalias 'mailcrypt-encrypt 'mc-encrypt)
+(defalias 'mailcrypt-decrypt 'mc-decrypt)
+(defalias 'mailcrypt-sign 'mc-sign)
+(defalias 'mailcrypt-verify 'mc-verify)
+(defalias 'mailcrypt-insert-public-key 'mc-insert-public-key)
+(defalias 'mailcrypt-snarf 'mc-snarf)
+;;}}}
+(provide 'mailcrypt)
+\input texinfo @c -*-Texinfo-*-
+
+@c tighten default spacing
+@c @parskip 5pt plus 1 pt
+@c @secheadingskip 10pt plus 6pt minus 3pt
+@c @subsecheadingskip 8pt plus 6pt minus 3pt
+@c @singlespace
+
+@c %**start of header
+@setfilename ../info/mailcrypt.info
+@settitle @value{TITLE}
+@setchapternewpage off
+@c %**end of header
+
+@syncodeindex ky cp
+@syncodeindex vr cp
+@syncodeindex fn cp
+
+@set TITLE Mailcrypt
+@set VERSION 3.4
+@set UPDATED October 10, 1995
+
+@ifinfo
+
+This documentation describes Mailcrypt version @value{VERSION}.  This
+documentation was last updated on @value{UPDATED}.
+
+Copyright 1995 Patrick J. LoPresti
+
+The Mailcrypt program and this manual are published as free software.
+You may redistribute and/or modify them under the terms of the GNU
+General Public License as published by the Free Software Foundation;
+either version 2, or (at your option) any later version.
+
+Mailcrypt is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License along
+with GNU Emacs; see the file COPYING.  If not, write to the Free
+Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+@end ifinfo
+
+@titlepage
+@title Mailcrypt: An EMACS Interface to PGP
+@subtitle Version @value{VERSION}
+@subtitle @value{UPDATED}
+@author Patrick J. LoPresti <patl@@lcs.mit.edu>
+
+@c Copyright page
+@page
+@vskip 0pt plus 1filll
+Copyright @copyright{} 1995 Patrick J. LoPresti
+
+The Mailcrypt program and this documentation are published as free
+software.  You may redistribute and/or modify them under the terms of
+the GNU General Public License as published by the Free Software
+Foundation; either version 2, or (at your option) any later version.
+
+Mailcrypt is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License along
+with GNU Emacs; see the file COPYING.  If not, write to the Free
+Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+@end titlepage
+
+@ifinfo
+@node Top, Introduction, (dir), (dir)
+@top Mailcrypt
+
+Mailcrypt is an Emacs Lisp package which provides a simple but powerful
+interface to cryptographic functions for mail and news.
+
+This documentation describes Mailcrypt version @value{VERSION}.  The
+documentation was last updated on @value{UPDATED}.
+
+@end ifinfo
+
+@menu
+* Introduction::                Read this first.
+* General Use::                 Everyday cryptographic functions.
+* Remailer Support::            Interface to secure anonymous remailers.
+* Passphrase Cache::            Letting Mailcrypt remember your passphrase
+                                  for a while.
+* Key Fetching::                Automatically retrieving public keys
+                                  via finger or HTTP.
+* Miscellaneous Configuration::  Random tweakables.
+* Tips::                        Hints and tricks.
+* Limitations::                 Things Mailcrypt does not do.
+* References::                  Pointers to relevant information.
+* Credits::                     Whom to blame.
+* Index::                       Keys, variables, and functions.
+
+ --- The Detailed Node Listing ---
+
+Introduction
+
+* Prerequisites::               Complicated stuff you may have to do.
+* Installation::                Simple stuff you probably have to do.
+* Command Overview::            A brief summary of the most common
+                                  commands.
+
+Installation
+
+* Hooking into Rmail::          
+* Hooking into VM::             
+* Hooking into MH-E::           
+* Hooking into Gnus::           
+
+General Use
+
+* Encrypting::                  Encrypting a message to one or more
+                                  recipients.
+* Signing::                     Clearsigning a message.
+* Inserting Keys::              Extracting a key from your public key
+                                  ring and inserting it.
+* Decrypting::                  Decrypting a message to you.
+* Verifying::                   Verifying the signature on a clearsigned
+                                  message.
+* Snarfing Keys::               Finding a key in the current message and
+                                 adding it to your keyring.
+
+Remailer Support
+
+* Remailer Introduction::       A little about remailers in general.
+* Remailer Quick Start::        Getting started quickly.
+* Remailer Chains::             Creating custom chains of your very own.
+* Response Blocks::             A way to let people reply to your
+                                  anonymous messages.
+* Pseudonyms::                  Who do you want to be today?
+* Remailing Posts::             Posting to USENET anonymously or
+                                  pseduonymously.
+* Mixmaster Support::           Remailers for the truly paranoid.
+* Remailer Security::           Caveats.
+* Verifiable Pseudonyms::       Giving expression to the voices in your
+                                  head.
+* Remailer Tips::               Free advice.
+
+Key Fetching
+
+* Keyring Fetch::               Fetching from one or more other
+                                  keyrings on the local system.
+* Finger Fetch::                Fetching a key through finger.
+* HTTP Fetch::                  Fetching a key off of the Web.
+
+Miscellaneous Configuration
+
+* Alternate Keyring::           Specifying a different file to act
+                                  like your public keyring.
+* Comment Field::               Burma
+                                  Shave
+* Mode Line::                   Changing that "MC-w" and "MC-r" stuff
+* Key Bindings::                Which keys cause which actions.
+* Nonstandard Paths::           Useful if your PGP installation is weird.
+
+References
+
+* Online Resources::            Recreational reading with a purpose.
+* Key Servers::                 Keepers of the Global Keyring.
+* Mailing List::                Staying informed while pumping the
+                                  authors' egos.
+* Politics::                    Anarcho-foobarism.
+@end menu
+
+@node Introduction, General Use, Top, Top
+@chapter Introduction
+
+Mailcrypt is an Emacs Lisp package which provides a simple but powerful
+interface to cryptographic functions for mail and news.  With Mailcrypt,
+encryption becomes a seamlessly integrated part of your mail and news
+handling environment.
+
+This manual is long because it is complete.  All of the information you
+need to get started is contained in this Introduction alone.
+
+@menu
+* Prerequisites::               Complicated stuff you may have to do.
+* Installation::                Simple stuff you probably have to do.
+* Command Overview::            A brief summary of the most common
+                                  commands.
+@end menu
+
+@node Prerequisites, Installation, Introduction, Introduction
+@section Prerequisites
+
+Mailcrypt requires version 19 of GNU Emacs.  Mailcrypt has been tested
+on a variety of systems under both FSF Emacs and XEmacs.
+
+Mailcrypt requires Pretty Good (tm) Privacy, usually known as PGP.  This
+document assumes that you have already obtained and installed PGP and
+that you are familiar with its basic functions.  The best way to become
+familiar with these functions is to read the @cite{PGP User's Guide}, at
+least Volume I.
+
+For more information on obtaining and installing PGP, refer to the MIT
+PGP home page at @file{http://web.mit.edu/network/pgp.html}.
+
+Although Mailcrypt may be used to process data in arbitrary Emacs
+buffers, it is most useful in conjunction with other Emacs packages for
+handling mail and news.  Mailcrypt has specialized support for Rmail
+(@pxref{Rmail, Rmail, Reading Mail with Rmail, emacs, The GNU Emacs
+Manual}), VM (@pxref{Top, VM, Introduction, vm, The VM User's Manual}),
+MH-E, and Gnus (@pxref{Top, Gnus, Overview, gnus, The Gnus Manual}).
+Information on the general use of these packages is beyond the scope of
+this manual.
+
+@node Installation, Command Overview, Prerequisites, Introduction
+@section Installation
+
+If Mailcrypt is not installed on your system, obtain the latest version
+from the Mailcrypt home page at
+@file{http://cag-www.lcs.mit.edu/mailcrypt/} and follow the instructions
+in the file @file{INSTALL}.
+
+Next, teach your Emacs how and when to load the Mailcrypt functions and
+install the Mailcrypt key bindings.  Almost all Emacs major modes
+(including mail and news handling modes) have corresponding "hook"
+variables which hold functions to be run when the mode is entered.  All
+you have to do is add the Mailcrypt installer functions to the
+appropriate hooks; then the installer functions will add the Mailcrypt
+key bindings when the respective mode is entered.
+
+Specifically, begin by placing the following lines into your
+@file{.emacs} file (or the system-wide @file{default.el} file):
+
+@lisp
+(autoload 'mc-install-write-mode "mailcrypt" nil t)
+(autoload 'mc-install-read-mode "mailcrypt" nil t)
+(add-hook 'mail-mode-hook 'mc-install-write-mode)
+@end lisp
+
+Then add additional lines for your own mail and news packages as
+described below.
+
+@menu
+* Hooking into Rmail::          
+* Hooking into VM::             
+* Hooking into MH-E::           
+* Hooking into Gnus::           
+@end menu
+
+@node Hooking into Rmail, Hooking into VM, Installation, Installation
+@subsection Hooking into Rmail
+
+To hook Mailcrypt into Rmail, use the following lines:
+
+@lisp
+(add-hook 'rmail-mode-hook 'mc-install-read-mode)
+(add-hook 'rmail-summary-mode-hook 'mc-install-read-mode)
+@end lisp
+
+@node Hooking into VM, Hooking into MH-E, Hooking into Rmail, Installation
+@subsection Hooking into VM
+
+To hook Mailcrypt into VM, use the following lines:
+
+@lisp
+(add-hook 'vm-mode-hook 'mc-install-read-mode)
+(add-hook 'vm-summary-mode-hook 'mc-install-read-mode)
+(add-hook 'vm-virtual-mode-hook 'mc-install-read-mode)
+(add-hook 'vm-mail-mode-hook 'mc-install-write-mode)
+@end lisp
+
+@node Hooking into MH-E, Hooking into Gnus, Hooking into VM, Installation
+@subsection Hooking into MH-E
+
+To hook Mailcrypt into MH-E, use the following lines:
+
+@lisp
+(add-hook 'mh-folder-mode-hook 'mc-install-read-mode)
+(add-hook 'mh-letter-mode-hook 'mc-install-write-mode)
+@end lisp
+
+@node Hooking into Gnus,  , Hooking into MH-E, Installation
+@subsection Hooking into Gnus
+
+To hook Mailcrypt into Gnus, use the following lines:
+
+@lisp
+(add-hook 'gnus-summary-mode-hook 'mc-install-read-mode)
+(add-hook 'news-reply-mode-hook 'mc-install-write-mode)
+@end lisp
+
+@node Command Overview,  , Installation, Introduction
+@section Command Overview
+
+All Mailcrypt commands are (by default) activated by three-character key
+sequences which begin with @kbd{C-c /}.  The four most common operations
+are:
+
+@table @emph
+
+@item Encrypting a Message
+@kbd{C-c / e} encrypts a message using the recipient's (or recipients')
+public key(s).  @xref{Encrypting, , Encrypting a Message}.
+
+@item Decrypting a Message
+@kbd{C-c / d} decrypts a message using your secret key.
+@xref{Decrypting, , Decrypting a Message}.
+
+@item Signing a Message
+@kbd{C-c / s} clearsigns a message using your secret key.
+@xref{Signing, , Signing a Message}.
+
+@item Verifying a Signature
+@kbd{C-c / v} verifies the signature on a clearsigned message using the
+sender's public key.  @xref{Verifying, , Verifying a Signature}.
+
+@end table
+
+These functions and others are documented in detail in the following
+chapters.
+
+Any time you are composing or reading mail or news, you can get a
+summary of the available commands by typing @kbd{C-h m}.  If you are
+running Emacs under X, an even easier way to see the available commands
+is to access the @code{Mailcrypt} pull-down menu.
+
+@node  General Use, Remailer Support, Introduction, Top
+@chapter General Use
+
+@findex mc-read-mode
+@findex mc-write-mode
+Mailcrypt works by providing two minor modes for interfacing with
+cryptographic functions: @code{mc-read-mode} and @code{mc-write-mode}.
+@code{mc-read-mode} provides key bindings for processing messages which
+you have received; @code{mc-write-mode} provides key bindings for
+processing messages which you are about to send.  These minor modes will
+indicate when they are active by placing a characteristic string in the
+mode line (@pxref{Mode Line}).  They will also add a @code{Mailcrypt}
+pull-down menu to the menu bar.
+
+@findex mc-install-read-mode
+@findex mc-install-write-mode
+The normal installation procedure (@pxref{Installation}) will arrange
+for the appropriate mode to be active when you read and compose mail and
+news.  But you may want to use Mailcrypt's functions at other times; to
+do so, you can call @code{mc-install-read-mode} or
+@code{mc-install-write-mode} directly.  For example, if you were editing
+a file in Text mode and wanted to digitally sign it, you would type
+@kbd{M-x mc-install-write-mode}, then @kbd{C-c / s} (@pxref{Signing}).
+
+Once one of the Mailcrypt modes is active, you can get a summary of the
+available functions by typing @kbd{C-h m} or by examining the
+@code{Mailcrypt} pull-down menu.
+
+The description of each function below includes which of the modes has a
+binding for that function.
+
+@menu
+* Encrypting::                  Encrypting a message to one or more
+                                  recipients.
+* Signing::                     Clearsigning a message.
+* Inserting Keys::              Extracting a key from your public key
+                                  ring and inserting it.
+* Decrypting::                  Decrypting a message to you.
+* Verifying::                   Verifying the signature on a clearsigned
+                                  message.
+* Snarfing Keys::               Finding a key in the current message and
+                                 adding it to your keyring.
+@end menu
+
+@node Encrypting, Signing, General Use, General Use
+@section Encrypting a Message
+
+@findex mc-encrypt
+@kindex C-c / e
+The function @code{mc-encrypt} will encrypt a message in the current
+buffer.  @code{mc-write-mode} binds this function to @kbd{C-c / e} by
+default.
+
+When this function is called, Mailcrypt will prompt you for a
+comma-separated list of recipients.  If called from a mail composition
+buffer, the recipient list will default to the Email addresses in the
+@samp{To}, @samp{CC}, and @samp{BCC} lines of the message.
+
+@vindex mc-encrypt-for-me
+If you want to be able to decrypt the message yourself, you need to add
+yourself to the recipient list.  If you always want to do so, set the
+variable @code{mc-encrypt-for-me} to @code{t}.  (Note that Mailcrypt
+overrides the PGP "encrypttoself" flag; use this variable instead.)
+
+If you provide an empty recipient list, Mailcrypt will ASCII-armor the
+message without encrypting it.
+
+@vindex mc-pgp-always-sign
+Once you have edited the recipient list to your satisfaction, type
+@kbd{@key{RET}} to accept it.  You will then be asked whether you want
+to sign the message; answer @kbd{y} or @kbd{n}.  You can avoid this
+question by setting the variable @code{mc-pgp-always-sign}:  A value of
+@code{t} means "yes", a value of @code{'never} means "no".
+
+If you elect to sign the message, Mailcrypt will prompt you for the
+appropriate passphrase unless it is cached (@pxref{Passphrase Cache}).
+
+@vindex mc-pre-encryption-hook
+@vindex mc-post-encryption-hook
+Mailcrypt will then pass the message to PGP for processing.  Mailcrypt
+will call the functions listed in @code{mc-pre-encryption-hook} and
+@code{mc-post-encryption-hook} immediately before and after processing,
+respectively.  The encrypted message will then replace the original
+message in the buffer.  You can undo the encryption with the normal
+Emacs undo command @kbd{C-x u} (@pxref{Undo, Emacs Undo, Undoing
+Changes, emacs, The GNU Emacs Manual}).
+
+If an error occurs, Mailcrypt will display an appropriate diagnostic.
+If you do not have the public key for one of the specified recipients,
+Mailcrypt will offer to try to fetch it for you (@pxref{Key Fetching}).
+
+@vindex mc-pgp-user-id
+The default key for signing is the first one on the secret key ring
+which matches the string @code{mc-pgp-user-id}; this defaults to
+@code{(user-login-name)}.  Note that this differs from PGP's normal
+default, which is to use the first of @emph{all} of the secret keys.  To
+mimic PGP's behavior, set this variable to @code{""}.
+
+If you want to use a secret key other than your default for signing the
+message, pass a prefix argument to @code{mc-encrypt}.  (That is, type
+@kbd{C-u C-c / e}.)  Mailcrypt will prompt for a string and will sign with
+the first key on your secret keyring which matches that string.  It will
+be assumed that you want to sign the message, so you will not be
+prompted.
+
+@node Signing, Inserting Keys, Encrypting, General Use
+@section Signing a Message
+
+@findex mc-sign
+@kindex C-c / s
+The function @code{mc-sign} will clearsign a message in the current
+buffer.  @code{mc-write-mode} binds this function to @kbd{C-c / s} by
+default.
+
+When this function is called, Mailcrypt will prompt you for the
+appropriate passphrase unless it is cached (@pxref{Passphrase Cache}).
+
+@vindex mc-pre-signature-hook
+@vindex mc-post-signature-hook
+Mailcrypt will then pass the message to PGP for processing.  Mailcrypt
+will call the functions listed in @code{mc-pre-signature-hook} and
+@code{mc-post-signature-hook} immediately before and after processing,
+respectively.  The signed message will replace the original message in
+the buffer.  @emph{Do not} edit the message further with the signature
+attached, because the signature would then be incorrect.  If you
+discover you need to edit a message after you have signed it, remove the
+signature first with the normal Emacs undo command @kbd{C-x u}
+(@pxref{Undo, Emacs Undo, Undoing Changes, emacs, The GNU Emacs
+Manual}).
+
+The variable @code{mc-pgp-user-id} controls which secret key is used for
+signing; it is described in @ref{Encrypting, , Encrypting a Message}.
+To use a different secret key, pass a prefix argument to @code{mc-sign}.
+(That is, type @kbd{C-u C-c / s}.)  Mailcrypt will prompt for a string
+and will sign with the first key on your secret keyring which matches
+that string.
+
+@node Inserting Keys, Decrypting, Signing, General Use
+@section Inserting a Public Key Block
+
+@findex mc-insert-public-key
+@kindex C-c / x
+The function @code{mc-insert-public-key} will extract a key from your
+public keyring and insert it into the current buffer.
+@code{mc-write-mode} binds this function to @kbd{C-c / x} by default.
+
+This function is useful for sending your public key to someone else or
+for uploading it to the key servers (@pxref{Key Servers}).  The inserted
+key will be the first one on your public key ring which matches the
+string @code{mc-pgp-user-id} (@pxref{Encrypting, , Encrypting a
+Message}).
+
+You may want to insert a different public key instead; for example, you
+may have signed someone's key and want to send it back to them.  To do
+so, pass a prefix argument to @code{mc-insert-public-key}.  (That is,
+type @kbd{C-u C-c / x}.)  You will be prompted for a string; the first key
+on your public key ring which matches that string will be inserted.
+
+@node Decrypting, Verifying, Inserting Keys, General Use
+@section Decrypting a message
+
+@findex mc-decrypt
+@kindex C-c / d
+The function @code{mc-decrypt} will decrypt a message in the current
+buffer.  @code{mc-read-mode} binds this function to @kbd{C-c / d} by
+default.
+
+When this function is called, Mailcrypt will prompt you for the
+appropriate passphrase unless it is cached (@pxref{Passphrase Cache}).
+
+The encrypted message will then be passed to PGP for processing.  If you
+are not in a mail buffer, the decrypted message will replace the
+encrypted form.  If you are in a mail buffer, you will be prompted
+whether to do the replacement.
+
+If you answer @kbd{n}, you will be placed in a new mail reading buffer
+to view the decrypted message.  This new mail reading buffer will have
+no corresponding disk file; its purpose is to provide you with all of
+your usual reply and citation functions without requiring you to save
+the message in decrypted form.  Type @kbd{q} to kill this buffer.
+
+@vindex mc-always-replace
+You can avoid the question of whether to replace the encrypted message
+by setting the variable @code{mc-always-replace}.  A value of @code{t}
+means "yes"; a value of @code{'never} means "no".
+
+If the encrypted message is also signed, PGP will attempt to verify the
+signature.  If the verification fails because you lack the necessary
+public key, Mailcrypt will offer to fetch it for you (@pxref{Key
+Fetching}).
+
+Look in the @code{*MailCrypt*} buffer to see the result of the signature
+verification.
+
+@node Verifying, Snarfing Keys, Decrypting, General Use
+@section Verifying a Signature
+
+@findex mc-verify
+@kindex C-c / v
+The function @code{mc-verify} will verify the cleartext signature on a
+message in the current buffer.  @code{mc-read-mode} binds this function
+to @kbd{C-c / v} by default.
+
+When this function is called, Mailcrypt will pass the message to PGP for
+processing and report whether or not the signature verified.
+
+If the signature failed to verify because you lack the necessary public
+key, Mailcrypt will offer to fetch it for you (@pxref{Key Fetching}).
+
+@node Snarfing Keys,  , Verifying, General Use
+@section Snarfing a Key
+
+@findex mc-snarf
+@kindex C-c / a
+The function @code{mc-snarf} will add to your keyring any keys in the
+current buffer.  @code{mc-read-mode} binds this function to @kbd{C-c / a}
+by default.
+
+This function is useful when someone sends you a public key in an Email
+message.
+
+@node Remailer Support, Passphrase Cache, General Use, Top
+@chapter Remailer Support
+This is a long chapter describing an advanced feature; you
+may want to skip it on first reading.
+
+@menu
+* Remailer Introduction::       A little about remailers in general.
+* Remailer Quick Start::        Getting started quickly.
+* Remailer Chains::             Creating custom chains of your very own.
+* Response Blocks::             A way to let people reply to your
+                                  anonymous messages.
+* Pseudonyms::                  Who do you want to be today?
+* Remailing Posts::             Posting to USENET anonymously or
+                                  pseduonymously.
+* Mixmaster Support::           Remailers for the truly paranoid.
+* Remailer Security::           Caveats.
+* Verifiable Pseudonyms::       Giving expression to the voices in your
+                                  head.
+* Remailer Tips::               Free advice.
+@end menu
+
+@node Remailer Introduction, Remailer Quick Start, Remailer Support, Remailer Support
+@section Remailer Introduction
+There are several anonymous remailer services running on the Internet.
+These are programs that accept mail, strip off information that would
+identify the origin of the message, and forward the mail to the
+designated recipient.  This simple scheme alone, however, is insecure if
+the anonymous remailer becomes compromised (or if the remailer was set
+up by an untrustworthy party in the first place).  Whoever controls the
+remailer will have access to the identities of senders and recipients.
+
+One solution to this is to use @emph{chains} of remailers that send
+encrypted messages.  For example, suppose Bill wishes to send a message
+to Louis using a chain of remailers A, B, and C.  He writes the message
+(possibly encrypting it for Louis), then encrypts the result (including
+the fact that Louis is the recipient) using a public key supplied by
+remailer C.  Then he encrypts this result using a public key supplied by
+remailer B.  Then he encrypts this result using a public key supplied by
+A and sends the message to A.
+
+When A receives the message, it decrypts the message with its key to
+produce something encrypted for B, learns that the next remailer in the
+chain is B, strips off the information that the message came from Bill,
+and sends the message on to B.  B then decrypts, learns that the next
+remailer in the chain is C, strips off the information that the message
+came from A, and sends the result to C.  C then decrypts, learns that
+the destination is Louis, strips off the information that the message
+came from B, and sends the result to Louis.  With this arrangement, only
+A knows that the original message came from Bill, and only C knows that
+the intended recipient is Louis.  In general, the sender and recipient
+can both be known only to someone who has compromised all remailers in
+the chain.
+
+If Bill wishes, he can include an encrypted "response block" in his
+message to Louis, which defines a remailer chain that Louis can use to
+reply to Bill.  Louis can use this chain without knowing who Bill is --
+only the last remailer in the chain need know the final recipient.  Bill
+can also establish a @emph{pseudonym} for use in signing his anonymous
+messages.
+
+Mailcrypt includes facilities for sending messages via remailers, for
+defining chains of remailers, for generating response blocks, and for
+using pseudonyms.
+
+@node Remailer Quick Start, Remailer Chains, Remailer Introduction, Remailer Support
+@section Remailer Quick Start
+
+To use Mailcrypt's remailing facilities, you need to configure them
+first.  Begin with the following steps:
+
+@enumerate
+
+@item
+Do @samp{finger remailer-list@@kiwi.cs.berkeley.edu > ~/.remailers}.
+This will create a Levien-format list of remailers in the file
+@file{.remailers} in your home directory.  Mailcrypt will parse this the
+first time you access a remailer function.
+
+@item
+Look over the @file{.remailers} file and find the ones you want to use.
+
+@item
+Add their PGP public keys to your keyring.  You can @code{finger
+pgpkeys@@kiwi.cs.berkeley.edu} for a list of remailer public keys.  Note
+that Mailcrypt @emph{requires} that you have the public keys of all the
+remailers you want to use, and therefore that the remailers support PGP
+encryption.
+
+@end enumerate
+
+@quotation
+@emph{Note:} These steps need only be done once, although repeating them
+from time to time is probably a good idea, since remailers come and go.
+@end quotation
+
+Now test the remailer functions.  First compose an outgoing Email
+message (using @kbd{C-x m}, for example) addressed to yourself.  Type
+@kbd{C-c / r}.  Choose a remailer; use @kbd{@key{TAB}} to get completion
+on its name.  The buffer will be rewritten for anonymous mailing through
+that remailer.
+
+@node Remailer Chains, Response Blocks, Remailer Quick Start, Remailer Support
+@section Remailer Chains
+
+@findex mc-remailer-encrypt-for-chain
+@kindex C-c / r
+@code{mc-write-mode} binds the function
+@code{mc-remailer-encrypt-for-chain} to the key @kbd{C-c / r}.  This
+function rewrites the message for a remailer or chain.  The resulting
+buffer is just a new Email message, so it can itself be rewritten for
+another remailer; this is one way to manually construct a remailer
+chain.
+
+Mailcrypt also has powerful facilities for defining automatic chains.
+We will start with an example.  Suppose you have put the following into
+your @file{.emacs} file:
+
+@vindex mc-remailer-user-chains
+@lisp
+(setq mc-remailer-user-chains
+      '(("Foo" "alumni" "robo")
+        ("Bar" (shuffle-vector ["replay" "flame" "spook"]))
+        ("Baz" "Foo" "Bar" "rahul" "Bar")
+        ("Quux" 4)))
+@end lisp
+
+This code defines four chains.  The first is named "Foo" and consists of
+"alumni" and "robo", in that order.  The second is named "Bar" and
+consists of "replay", "flame", and "spook" in some random order (a
+different order will be chosen each time the chain is used).  The third
+is named "Baz" and consists of 9 remailers: The two from "Foo", followed
+by a permutation of the three from "Bar", followed by "rahul", followed
+by another permutation of the three from "Bar".  Finally, the fourth is
+named "Quux" and consists of a random permutation of the four best
+remailers as ordered in the @file{~/.remailers} file.
+
+Now whenever you are prompted for a "remailer or chain", the chains
+"Foo", "Bar", "Baz", and "Quux" will be available, including
+@kbd{@key{TAB}} completion on their names.  By capitalizing their names,
+you guarantee they will show up near the top of the completion list if
+you type @kbd{@key{TAB}} on an empty input.
+
+Now for the gritty details.  @code{mc-remailer-user-chains} is a list of
+chain definitions.  A chain definition is a list whose first element is
+the name (a string) and whose remaining elements form a @dfn{remailer
+list}.  Each element of a remailer list is one of the following:
+
+@enumerate
+
+@item
+A raw remailer structure.  This is the base case, but you will probably
+never want nor need to deal with these directly.
+
+@item
+A string naming another remailer chain to be spliced in at this point.
+
+@item
+A positive integer N representing a chain to be spliced in at this point
+and consisting of a random permutation of the top N remailers as ordered
+in the @file{~/.remailers} file.
+
+@item
+An arbitrary Emacs Lisp form, which should return another remailer
+list which will be spliced in at this point and recursively
+evaluated.  Mmmm, Lisp.
+
+@end enumerate
+So, in the example "Bar" above, @code{shuffle-vector} is actually a Lisp
+primitive which returns a random permutation of the argument vector.
+(Which brings up a side note: A remailer list can be a vector instead of
+a list if you like.)
+
+So where do the definitions for "replay" etc. come from?
+
+@vindex mc-remailer-internal-chains
+There is another variable, @code{mc-remailer-internal-chains}, which has
+the same format as @code{mc-remailer-user-chains}.  In fact, the
+concatenation of the two is always used internally when resolving chains
+by name.  The "internal chains" are normally generated automatically
+from a Levien-format remailer list, which lives in @file{~/.remailers}
+by default and is parsed at startup time.  The parser creates several
+chains, each containing a single remailer, and names each chain after
+the respective remailer.
+
+Thus "replay" (for example) is actually the name of a @emph{chain} whose
+single element is the remailer at <remailer@@replay.com>.  So "replay"
+is a valid name of a chain to include in the definition of another
+chain, as was done above in the definition of "Bar".
+
+@node Response Blocks, Pseudonyms, Remailer Chains, Remailer Support
+@section Response Blocks
+
+@kindex C-c / b
+Mailcrypt can generate a response block for you.  Just type @kbd{C-c / b}
+in an outgoing mail buffer.  That will prompt you for a chain to use,
+and will insert the response block at point.  Note that you can use any
+chain you want for your response block; it need not be related to the
+chain you (later) use to remail the message.
+
+If instead you type @kbd{C-u C-c / b}, you will be dropped into a
+recursive edit of the innermost part of the response block.  This text
+is what you will see at the top of the message when the response block
+is used.  This text is the only way to identify the response block,
+since it will be used to mail you through anonymous remailers.
+
+You probably won't need to use the @kbd{C-u} feature, since by default
+the response block contains the date, @samp{To} field, and @samp{From}
+field of the message you are composing.  However, if you want your
+response block to point to a USENET newsgroup instead of your Email
+address, you may edit the innermost part of the response block to have a
+@samp{Newsgroups} line instead of a @samp{To} line.
+
+Inserting a response block also updates the @samp{Reply-to} hashmark
+header field.  So, when your recipient replies to your message, the
+reply will automatically be addressed properly.  This only works if the
+last remailer in the chain used to encrypt the @emph{message} supports
+hashmarks (the response block chain doesn't matter).  If the last
+remailer does not support hashmarks, Mailcrypt will generate an error
+when you try to use the chain.
+
+Note that you should insert your response block before you encrypt the
+message for remailing.  Also, see @ref{Remailer Security}.
+
+@node Pseudonyms, Remailing Posts, Response Blocks, Remailer Support
+@section Pseudonyms
+
+@kindex C-c / p
+Mailcrypt supports pseudonyms.  Type @kbd{C-c / p} in an outgoing message
+buffer and you will be prompted for a pseudonym to use.  Your pseudonym
+will show up in the @samp{From} line that the recipient sees.  Your
+pseudonym may either be a complete @samp{From} line (including an Email
+address), or just a full name (with no Email address).  In the latter
+case, the Email address will automatically be set to <x@@x.x>, an invalid
+address designed to prevent sendmail from going rewrite-happy.
+
+If you have one or more pseudonyms which you normally use, and you
+aren't afraid of revealing them if your account is compromised, you can
+set up a default list of pseudonyms with lines like the following in
+your @file{.emacs} file:
+
+@vindex mc-remailer-pseudonyms
+@lisp
+(setq mc-remailer-pseudonyms
+      '("Elvis Presley" "Vanna White" "Charles Manson"))
+@end lisp
+
+Then those names will be available for completion when you are
+prompted for your pseudonym.
+
+You should insert your pseudonym before you insert a response block, so
+that the response block will contain the @samp{From} line as well as the
+@samp{To} line.  That way you can tell who you were pretending to be
+when you get a reply to your message.
+
+Note: Many remailers do not support pseudonyms.  In addition, the Levien
+format does not (yet) indicate which do and which do not, so Mailcrypt
+can't warn you when your pseudonym isn't going to work.  The only way to
+be sure is to send yourself a test message, and to try different
+remailers until you find one or more which work.  On the bright side,
+only the last remailer in the chain needs to provide such support; none
+of the others matter.
+
+@node Remailing Posts, Mixmaster Support, Pseudonyms, Remailer Support
+@section Remailing Posts
+Mailcrypt knows how to rewrite USENET posts for anonymous or
+pseudonymous remailing.  Just compose your post or followup normally,
+and use @kbd{C-c / r} to rewrite it for a remailer chain.  You don't
+even need to start your newsreader to make a post; you can just compose
+a message in mail mode and replace the @samp{To} line with a
+@samp{Newsgroups} line before doing @kbd{C-c / r}.
+
+@vindex mc-remailer-preserved-headers
+Mailcrypt will generate an error if the last remailer in the chain does
+not have both the @code{post} and @code{hash} (hashmarks) properties.
+The hashmarks are used to preserve @samp{References} and similar
+headers, so your anonymous or pseudonymous followups will thread
+properly.  The variable @code{mc-remailer-preserved-headers} controls
+which headers are preserved when rewriting a message, but you should not
+need to change it since the default value is reasonable.
+
+Before rewriting, you can use @kbd{C-c / p} to insert your pseudonym,
+and @kbd{C-c / b} to insert your response block, just like when
+composing mail.  In this case, the response block will include the
+@samp{From} line and the @samp{Newsgroups} line (which is the news
+analogue to the @samp{To} line).
+
+@node Mixmaster Support, Remailer Security, Remailing Posts, Remailer Support
+@section Mixmaster Support
+
+@dfn{Mixmaster} is a new kind of remailer which provides excellent
+security against traffic analysis and replay attacks.  (For more
+information on these attacks and Mixmaster, see Lance Cottrell's home
+page at @file{http://www.obscura.com/~loki/}.
+
+If you do not use Mixmaster, you may skip this section entirely;
+Mailcrypt's default configuration treats Mixmaster as if it did not
+exist.
+
+If you have the Mixmaster executable installed, you can tell Mailcrypt
+to use it by placing lines like the following into your @file{.emacs}
+file:
+
+@vindex mc-mixmaster-path
+@vindex mc-mixmaster-list-path
+@lisp
+(setq mc-mixmaster-path "mixmaster")
+(setq mc-mixmaster-list-path "/foo/bar/baz/type2.list")
+@end lisp
+
+@code{mc-mixmaster-path} is a string representing the Mixmaster
+executable.  @code{mc-mixmaster-list-path} is the complete path to the
+@code{type2.list} file.
+
+Once these variables are defined, Mailcrypt will automatically try to
+use the Mixmaster executable whenever possible.  Specifically, when you
+rewrite a message for a chain, Mailcrypt will find maximal length
+sub-chains which have the @code{mix} property and will use the Mixmaster
+executable to rewrite for those sub-chains.
+
+This allows arbitrary intermingling of Mixmaster and normal (also called
+@dfn{Type 1}) remailers, but you should note that this is @emph{not
+recommended}.  The recommended procedure is to have a single Mixmaster
+sub-chain which is most or all of the whole chain.
+
+There are advantages and disadvantages to having the Mixmaster sub-chain
+at the end of the whole chain.  The primary advantage is that Mixmaster
+remailers support multiple recipients.  The primary disadvantages are
+that they do not support pseudonyms nor posting.
+
+So here, as always, it is the last element of the chain which needs to
+support the special features you want.  In general, the remaining
+elements do not matter, and the superior security of Mixmaster remailers
+is a good argument for using them for the bulk of your chains.
+
+@findex mc-demix
+Mixmaster remailers also have a "Type 1 compatibility mode" which you
+might want to invoke to use a pseudonym or make a post.  You can do this
+with the function @code{mc-demix}.  Here is an example of its use:
+
+@lisp
+(setq mc-remailer-user-chains
+      '(("Foo" "vishnu" "spook")
+        ("Bar" "Foo" (mc-demix "replay"))))
+@end lisp
+
+This makes "Bar" a chain of three remailers, and guarantees that the
+last one ("replay") will be used in compatibility mode.
+
+Note that Mixmaster remailers cannot be used for response blocks.
+Mailcrypt will ignore the @code{mix} property when generating a response
+block.
+
+@node Remailer Security, Verifiable Pseudonyms, Mixmaster Support, Remailer Support
+@section Remailer Security
+
+Keep in mind that there is only one person fully qualified to protect
+your privacy: @emph{you}.  You are responsible for obtaining a list of
+remailers and their public keys; you are responsible for choosing which
+of them to use and in what order.  There are public lists of remailers
+and keys (the Quick Start section above relies on them), but you pay for
+the convenience by putting your trust in a single source.  This is one
+reason Mailcrypt does not access these public lists automatically; you
+need to get into the habit of watching what goes on behind the scenes.
+You should also try to learn something about the remailers themselves,
+since you are relying on them to help protect your privacy.
+
+How many remailers should you include in your chain, and how should
+you choose them?  That depends on whom you perceive as a threat.  If
+the threat is your ex-spouse or your boss, even a single remailer is
+probably adequate (more won't hurt, but will cost in latency).  If the
+threat is the Church of Scientology, you probably want to use a fair
+number of remailers across multiple continents.  If the threat is a
+major world government, well, best of luck to you.
+
+Also, there is a huge difference between chains suitable for regular
+messages and chains suitable for response blocks.  Some remailers don't
+even keep mail logs (at least, their operators claim they do not), so it
+may be literally impossible to trace a message back to you after the
+fact if you chain it through enough remailers.  Response blocks, on the
+other hand, have your identity buried in there @emph{somewhere}.  In
+principle, at least, it is possible to compromise the keys of all the
+remailers in the chain and decrypt the response block.  So you should
+either use very long and strong chains for your response blocks, avoid
+using response blocks at all, or only use response blocks which
+themselves ultimately point to a newsgroup.