Emacs interface to gpg?

Steffen Zahn zahn at berlin.snafu.de
Tue Jun 29 23:18:37 CEST 1999


>>>>> "Paul" == Paul D Smith <pausmith at nortelnetworks.com> writes:

Paul> I use mailcrypt for dealing with message signing in gpg, but
Paul> what do people use with Emacs for handling straight
Paul> encryption/decryption of files?

To  solve  this problem  for  pgp  I  use jka-compr.el.   For  the
extension .pgp  and .pgp~  I define import  and export  filters in
jka-compr-compression-info-list like this:

    ["\\.pgp~?\\'"
     "encoding"       "pgp"          ("-f" "-e" "\"Steffen Zahn\"")
     "decoding"       "pgp-auto"     ("-f")
     nil t]

This is limited to a fixed set of recipient keys. If I need a different
set I invent another extension, for example .pgz etc.

pgp-auto is from a package named autopgp that probably predates mailcrypt
and has the property that the passphrase is read through a UNIX-domain
socket. On the other side of the socket waits a perl script that 
reads the passphrase and supplies it over the socket. You start
the perl script in an xterm, enter the passphrase and then you can
load and save *.pgp files.

This `solution' should probably be restricted to machines over which 
you have complete control.

To take care of the temporary files created during import/export I use
the following:

(setq jka-compr-temp-name-template (concat (getenv "HOME") "/.pgp/.wrapper/jka-com"))
(load-library "jka-compr")
(defun jka-compr-delete-temp-file (temp)
  (put (intern temp jka-compr-temp-name-table)
       'active nil)
  (condition-case ()
      (call-process "wipe" nil 0 nil temp)
    (error nil)))

This directs all temporary files to a directory that only the owner can access
and calls wipe to securely overwrite and delete the temp files after use.

Steffen

-- 
home email:  user at domain where domain=berlin.snafu.de, user=zahn
Use of my address for unsolicited commercial advertising is forbidden.
      2^3021377 - 1     |     "Where do you want to crash today?"



More information about the Gnupg-devel mailing list