all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daiki Ueno <ueno@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: tzz@lifelogs.com, 15552@debbugs.gnu.org
Subject: bug#15552: 24.3.50; epa-file-cache-passphrase-for-symmetric-encryption not respected with GnuPG 2.x
Date: Wed, 09 Oct 2013 12:53:14 +0900	[thread overview]
Message-ID: <m3fvsb6qxh.fsf-ueno@gnu.org> (raw)
In-Reply-To: <jwvwqlni22h.fsf-monnier+emacsbugs@gnu.org> (Stefan Monnier's message of "Tue, 08 Oct 2013 23:01:58 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> It used to work like that with gpg1.  However, gpg2's implementation
>> choice is that it does not leak the indication that gpg2 (actually
>> gpg-agent) requires passphrase and it does not allow other tools than
>> pinentry to inject passphrase.
>
> IOW epa-file-cache-passphrase-for-symmetric-encryption only works for
> gpg1 and not for gpg2?

s/works/has no effect/

>> IMO that's a good idea for security (as pinentry uses secmem).
>
> There are many situations where local security is not nearly as
> important as convenience.  But IIUC with gpg2 the general answer is "use
> gpg-agent to do the caching", and it's supposed to work fine (i.e. it's
> just as convenient as caching the password in Emacs).

In this bug report, the reporter intentionally does not set up gpg-agent
for his login session.  Even the GnuPG 2.x manual spends one chapter on
setting up gpg-agent before the chapter on gpg command itself.

>>> Stefan "Also confused about what "symmetric" has to do with it"
>> Perhaps you could try the above recipe under gpg-agent is properly set up:
>> $ echo abc > file
>> $ gpg --symmetric file
>> $ eval `gpg-agent --daemon`
>> $ gpg2 < file.gpg
>> $ gpg2 < file.gpg
>> You won't be asked for the passphrase at the second time, because
>> gpg-agent remembers passphrase based on the file content.
>
> That doesn't really explain to me why
> epa-file-cache-passphrase-for-symmetric-encryption has "symmetric" in
> its name and more specifically why caching of passphrases would be
> different for symmetric than for public key cryptography.

I didn't get the question correctly, then.

Look at the matrix of (info "(epa) Caching Passphrases"), check when a
user is suggested to "set up elisp passphrase cache".

Anyway, the name is not so important to me, as long as it discourages
the use of the variable, so it could be
e.g. epg-file-yo-mama-wears-fancy-glasses-detection-enabled.

https://news.ycombinator.com/item?id=6372466





  reply	other threads:[~2013-10-09  3:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-07 17:56 bug#15552: 24.3.50; epa-file-cache-passphrase-for-symmetric-encryption not respected with GnuPG 2.x Teodor Zlatanov
2013-10-07 23:41 ` Daiki Ueno
2013-10-08  0:46   ` Ted Zlatanov
2013-10-08  3:14   ` Stefan Monnier
2013-10-08  7:03     ` Daiki Ueno
2013-10-08 10:47       ` Ted Zlatanov
2013-10-08 17:17       ` Stefan Monnier
2013-10-08 21:51         ` Daiki Ueno
2013-10-09  3:01           ` Stefan Monnier
2013-10-09  3:53             ` Daiki Ueno [this message]
2013-10-09  9:32               ` Ted Zlatanov
2013-10-09 12:40               ` Stefan Monnier
2013-10-10  3:08                 ` Daiki Ueno
2013-10-10 13:25                   ` Ted Zlatanov
2013-10-10 14:31                     ` Stefan Monnier
2013-10-10 14:32                   ` Stefan Monnier

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

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

  git send-email \
    --in-reply-to=m3fvsb6qxh.fsf-ueno@gnu.org \
    --to=ueno@gnu.org \
    --cc=15552@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=tzz@lifelogs.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.