On Tue, Mar 28, 2000 at 02:09:20PM +0100, Edmund GRIMLEY EVANS wrote:
> Thomas Roessler <[EMAIL PROTECTED]>:
> > > Perhaps another solution would be to have a separate
> > > suid program that remembers the passphrase and
> > > communicates somehow with the mutt process ...
> > 
> > This would be useless, since mutt would have to store that
> > communication somewhere.  Thus, the problem would bite
> > itself into the tail.
> 
> You're right, of course, though you would get the slight advantage of
> mutt not having to store the passphrase for very long, so it would be
> unlikely that it would be swapped out in that time.
> 
> To be really safe the separate suid program would have to communicate
> directly with GnuPG. Perhaps the separate passphrase-remembering
> program could spawn GnuPG when requested by Mutt ... I'm just
> speculating here ...

Yes, this is the right way to do it, and I believe ssh2 has something
to this effect. The idea is as follows:

1) GnuPG itself requires a passphrase and requires setuid root so that
it can lock the passphrase in memory.

2) You have a daemon, say gnupgd, which is also setuid root. It's
job is to a) cache the passphrase in locked memory, and b) maintain a
list of procs/access tokens that have successfully authenticated
themselves with gnupgd.

3) Your actual application, in this case mutt. Mutt accesses gnupg
through gnupgd. The first time it talks to it, mutt must authenticate
itself with gnupgd.

Advantages of this approach:

-gnupgd is VERY simple, and therefore it should be easier to keep it
 secure

-if mutt is compromised, it does not provide access to the passphrase
 or the key, although it would allow someone to use the key until the
 mutt process or gnupgd died (say on a reboot).

-if the swap space is examined you only get access to a gnupgd token,
 which of course is only valid for a limited period of time.

Disadvantages of this approach:

-you still need some authentication mechanism between gnupgd and
applications, and this must somehow be fairly secure. I believe ssh2
relies on process parent/child relationships to do
authorization/authentication and I don't see this as reliable.

--Chris

PGP signature

Reply via email to