unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Daiki Ueno <ueno@gnu.org>
To: Artur Malabarba <bruce.connor.am@gmail.com>
Cc: Werner Koch <wk@gnupg.org>, 20550@debbugs.gnu.org
Subject: bug#20550: 25.0.50; Add GnuPG 2.x support to epa-file-cache-passphrase-for-symmetric-encryption.
Date: Tue, 12 May 2015 19:48:49 +0900	[thread overview]
Message-ID: <87lhguxe9a.fsf-ueno@gnu.org> (raw)
In-Reply-To: <CAAdUY-LY03Q_TfP8qRM+ynZaze0=fw1g-nF8MMiimnkJXuSdPA@mail.gmail.com> (Artur Malabarba's message of "Tue, 12 May 2015 09:49:55 +0100")

Artur Malabarba <bruce.connor.am@gmail.com> writes:

> - It made things worse in the sense that I now have to type the
> password 4(!) times when saving the file (all prompts are inside
> emacs). The first prompt is "Passphrase for symmetric encryption for
> /.../file.gpg: ", then I get "Confirm password: ", then I get the
> first one again, then the second one again.

Oh, you are right.  GnuPG 2.1 --pinentry-mode=loopback asks passphrase
twice on symmetric encryption, while GnuPG 1.x does that only once (look
at the GET_HIDDEN lines below):

  $ gpg2 --command-fd=1 --status-fd=1 --pinentry-mode=loopback --symmetric -o /dev/null < /dev/null
  gpg: NOTE: THIS IS A DEVELOPMENT VERSION!
  gpg: It is only intended for test purposes and should NOT be
  gpg: used in a production environment or with production keys!
  [GNUPG:] NEED_PASSPHRASE_SYM 7 3 2
  [GNUPG:] GET_HIDDEN passphrase.enter
  test
  [GNUPG:] GOT_IT
  [GNUPG:] GET_HIDDEN passphrase.enter
  test
  [GNUPG:] GOT_IT
  [GNUPG:] BEGIN_ENCRYPTION 2 7
  [GNUPG:] END_ENCRYPTION

  $ gpg --command-fd=1 --status-fd=1 --symmetric -o /dev/null < /dev/null
  [GNUPG:] NEED_PASSPHRASE_SYM 3 3 2
  [GNUPG:] GET_HIDDEN passphrase.enter
  test
  [GNUPG:] GOT_IT
  [GNUPG:] BEGIN_ENCRYPTION 0 3
  [GNUPG:] END_ENCRYPTION

Though I suppose the repetition is meant to be a confirmation, I think
it is not very useful for clients (since we already know that the
confirmation is needed) and causes compatibility issues.

Could this be fixed in GnuPG itself?

Thanks,
-- 
Daiki Ueno





  reply	other threads:[~2015-05-12 10:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-11 19:19 bug#20550: 25.0.50; Add GnuPG 2.x support to epa-file-cache-passphrase-for-symmetric-encryption Artur Malabarba
2015-05-11 22:48 ` Daiki Ueno
2015-05-11 23:25   ` Artur Malabarba
2015-05-12  8:49     ` Artur Malabarba
2015-05-12 10:48       ` Daiki Ueno [this message]
2015-05-12 11:26         ` Werner Koch
2015-05-12 23:05           ` Daiki Ueno
2015-06-19  9:09             ` Daiki Ueno
2015-06-21 18:53               ` Artur Malabarba

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=87lhguxe9a.fsf-ueno@gnu.org \
    --to=ueno@gnu.org \
    --cc=20550@debbugs.gnu.org \
    --cc=bruce.connor.am@gmail.com \
    --cc=wk@gnupg.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://git.savannah.gnu.org/cgit/emacs.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).