unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Ralph Seichter <abbot@monksofcool.net>, notmuch@notmuchmail.org
Subject: Re: Notmuch, Emacs and pinentry -- oh my
Date: Mon, 11 Nov 2019 12:02:06 -0500	[thread overview]
Message-ID: <87v9rqs5wx.fsf@fifthhorseman.net> (raw)
In-Reply-To: <87d0e2peay.fsf@wedjat.horus-it.com>

[-- Attachment #1: Type: text/plain, Size: 2426 bytes --]

On Fri 2019-11-08 16:40:05 +0100, Ralph Seichter wrote:
> I only access the server with a terminal, and that's where Emacs is
> running in. Curses is as graphical as it gets. ;-)

Neither pinentry-tty nor pinentry-curses is designed to work (or capable
of working well) with another process actively sharing the tty to which
it's connected.  That means that having either such interaction in the
same terminal while you're running emacs is probably not going to end
well :/

Have you considered running gpg-agent in a dedicated terminal window,
and handling the gpg-agent prompts from that window?  That would provide
a clean separation between password entry (and other forms of
interaction with the gpg-agent) and interaction with your message store.

My understanding is that this is the recommended way of using gpg-agent
when (a) you have a passphrase-locked secret key, and (b) no graphical
environment is available.

> As for the nuclear option of decoding on indexing: That worries me more
> than using Emacs with some form of pinentry and gpg-agent.

To be clear about your threat model here: an active attacker with access
to your account on the server can relatively easily get a copy of your
secret key in unprotected form.  What they do is intercept your
gpg-agent process, and then next time you enter your password, they use
it to decrypt and exfiltrate your secret key.

So the difference between that situation and a situation where you have
indexed the cleartext is that the same attacker can just raid the
cleartext index directly (e.g. from backups, or from the physical disk
if it's seized), without having to wait to actively intercept your
password.

That's a significant difference, but not a huge one.

If your index was protected (e.g. via an encrypted filesystem), perhaps
you'd feel differently about that tradeoff?

In my queue of things to work on, i've got "notmuch lock" and "notmuch
unlock", which should apply filesystem encryption protection to your
notmuch index.  Is that something you'd be interested in?

note that if you adopt it, then you get a few additional nice features:

 * the ability to search the cleartext of your encrypted messages

 * the ability to destroy old/expired decryption-capable subkey secret
   material without losing access to the cleartext of encrypted messages
   that you want to retain.

happy to talk more about those tradeoffs if you like.

        --dkg

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

  reply	other threads:[~2019-11-11 17:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07 21:57 Notmuch, Emacs and pinentry -- oh my Ralph Seichter
2019-11-08 13:29 ` David Bremner
2019-11-08 13:31   ` David Bremner
2019-11-08 15:40   ` Ralph Seichter
2019-11-11 17:02     ` Daniel Kahn Gillmor [this message]
2019-11-11 19:10       ` Ralph Seichter
2019-11-12  5:59         ` Daniel Kahn Gillmor
2019-11-13 17:07           ` Ralph Seichter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v9rqs5wx.fsf@fifthhorseman.net \
    --to=dkg@fifthhorseman.net \
    --cc=abbot@monksofcool.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).