how to use Emacs crypt++ with GnuPG?

Fred Yankowski
Wed, 12 Jan 2000 12:41:53 -0600

I've been using the Emacs crypt++.el Elisp code to edit files saved
with conventional/symmetrical encryption, on both GNU/Linux and WinNT.
Now I'd like to do the same but using GnuPG instead of PGP.  However,
I can't figure out how to use GnuPG in the context of crypt++, the
problem being that crypt++ wants to call the encrypt/decrypt program
with the passphrase on the command line (and the file itself on stdin)
and GnuPG seems to provide no way to do that.  For Linux I was able to
create a wrapper script in Perl that collects the passphrase on the
command line and then feeds it to a gpg child process via a pipe; and
this works when called from crypt++.  But I don't know how to get that
script to work on WinNT, there being no fork function available to
Perl on NT.

It also looks like the Windows version of GnuPG is hardwired to put
out some messages warning that it is not production quality.  I think
that's going to mess up crypt++, which depends on collecting the newly
encrypted/decrypted file from the output of the program, and hence
needs the program to be totally silent.

Any ideas?

I assume that gpg provides no command-line argument for the passphrase
because that is inherently insecure.  But the result is that to edit a
GPG encrypted file via Emacs on NT I have to create a cleartext file
and edit that, then remember to re-encrypt the results when done.  For
me, that is _much_ less secure (not to mention, much more
inconvenient) than being able to do it all from within Emacs.

Fred Yankowski