From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/17725 Path: news.gmane.org!not-for-mail From: Jens Lechtenboerger Newsgroups: gmane.emacs.help,gmane.emacs.gnus.user Subject: Passphrase caching for GnuPG in Emacs? Date: Sun, 08 Nov 2015 17:00:56 +0100 Message-ID: <87vb9cwkef.fsf@informationelle-selbstbestimmung-im-internet.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1446999608 3059 80.91.229.3 (8 Nov 2015 16:20:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Nov 2015 16:20:08 +0000 (UTC) To: help-gnu-emacs@gnu.org, info-gnus-english@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 08 17:19:59 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZvShB-0001aZ-NJ for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Nov 2015 17:19:57 +0100 Original-Received: from localhost ([::1]:47913 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvShB-0000L7-0i for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Nov 2015 11:19:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvSOt-0004pn-OP for help-gnu-emacs@gnu.org; Sun, 08 Nov 2015 11:01:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZvSOq-00010x-Iu for help-gnu-emacs@gnu.org; Sun, 08 Nov 2015 11:01:03 -0500 Original-Received: from mx1.mailbox.org ([80.241.60.212]:41791) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvSOq-00010r-Cf; Sun, 08 Nov 2015 11:01:00 -0500 Original-Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id A93E3417D1; Sun, 8 Nov 2015 17:00:59 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Original-Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id PdyL5H1NU3XJ; Sun, 8 Nov 2015 17:00:58 +0100 (CET) OpenPGP: id=0xA142FD84; url=http://www.informationelle-selbstbestimmung-im-internet.de/A142FD84.asc Mail-Followup-To: help-gnu-emacs@gnu.org, info-gnus-english@gnu.org User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 80.241.60.212 X-Mailman-Approved-At: Sun, 08 Nov 2015 11:19:41 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:107991 gmane.emacs.gnus.user:17725 Archived-At: 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=E2=80=99s README, =E2=80=9C2.0 is the curre= nt stable version for general use=E2=80=9D, while =E2=80=9C1.4 is the old standalone = version which is most suitable for older or embedded platforms.=E2=80=9D If I=E2=80=99m not mistaken (please let me know if I=E2=80=99m 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=E2=80=99s your opinion? Best wishes Jens P.S. Encryption is self-defense. Learn more: https://emailselfdefense.fsf.org/