unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jens Lechtenboerger <jens.lechtenboerger@fsfe.org>
To: help-gnu-emacs@gnu.org, info-gnus-english@gnu.org
Subject: Passphrase caching for GnuPG in Emacs?
Date: Sun, 08 Nov 2015 17:00:56 +0100	[thread overview]
Message-ID: <87vb9cwkef.fsf@informationelle-selbstbestimmung-im-internet.de> (raw)

Hi there,

I plan to refactor the code used for GnuPG in the Message mode of
Emacs (Gnus) and started a discussion on the Gnus devel mailing list
ding.  An open issue is passphrase caching within Emacs, which might
be removed in the future.  So if you encrypt e-mail and cache
passphrases inside Emacs (instead of gpg-agent), please let me know
why.  Also, do you think that it is necessary to have four different
variables to enable caching and another four to control caching
duration?  (mml-secure-cache-passphrase, mml1991-cache-passphrase,
mml2015-cache-passphrase, mml-smime-cache-passphrase;
mml-secure-passphrase-cache-expiry, mml1991-passphrase-cache-expiry,
mml2015-passphrase-cache-expiry, mml-smime-passphrase-cache-expiry)

As gpg-agent is the daemon to manage secret keys, I recommend to use
that as trusted place to cache passphrases, which works with GnuPG
1.x. as well as 2.x.  Note that GnuPG 2.x is where the development
happens, and according to GnuPG’s README, “2.0 is the current stable
version for general use”, while “1.4 is the old standalone version
which is most suitable for older or embedded platforms.”

If I’m not mistaken (please let me know if I’m wrong), with GnuPG
2.x (and gpgsm) passphrases cannot be cached within Emacs as
gpg-agent is started automatically and tries to invoke a pinentry
program.  So, caching-related variables only apply to GnuPG 1.x and
S/MIME with openssl (I suggest not to advertise the latter any
longer and will send a separate e-mail to discuss that), which
should be documented if we plan to keep that functionality.

What’s your opinion?

Best wishes
Jens

P.S. Encryption is self-defense.  Learn more:
https://emailselfdefense.fsf.org/



             reply	other threads:[~2015-11-08 16:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-08 16:00 Jens Lechtenboerger [this message]
2015-11-09  8:45 ` Passphrase caching for GnuPG in Emacs? tomas
2015-11-09 13:47   ` Stefan Monnier
2015-11-09 13:45     ` tomas
2015-11-09 13:55   ` Jens Lechtenboerger
2015-11-09 13:50     ` tomas
2016-01-05 15:40 ` Teemu Likonen
2016-01-05 15:58   ` Jens Lechtenboerger
2016-01-05 18:16     ` Jude DaShiell
2016-01-05 19:06       ` Teemu Likonen

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://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87vb9cwkef.fsf@informationelle-selbstbestimmung-im-internet.de \
    --to=jens.lechtenboerger@fsfe.org \
    --cc=help-gnu-emacs@gnu.org \
    --cc=info-gnus-english@gnu.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.
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).