From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jens Schmidt via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#64154: Fwd: Some additions to the EasyPG Assistant's manual Date: Sun, 18 Jun 2023 19:32:29 +0200 Message-ID: <90275992-b539-e611-d92b-9bfe57d9d58d@vodafonemail.de> References: <83wn02r0s7.fsf@gnu.org> Reply-To: Jens Schmidt Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31117"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 To: 64154@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 18 19:33:31 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qAwHL-0007tV-IV for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Jun 2023 19:33:31 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qAwGu-00056M-Jo; Sun, 18 Jun 2023 13:33:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAwGs-000564-78 for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2023 13:33:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qAwGr-000828-Ub for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2023 13:33:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qAwGr-0002E5-Q1 for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2023 13:33:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jens Schmidt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Jun 2023 17:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64154 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 64154-submit@debbugs.gnu.org id=B64154.16871095648530 (code B ref 64154); Sun, 18 Jun 2023 17:33:01 +0000 Original-Received: (at 64154) by debbugs.gnu.org; 18 Jun 2023 17:32:44 +0000 Original-Received: from localhost ([127.0.0.1]:54925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAwGa-0002DV-1b for submit@debbugs.gnu.org; Sun, 18 Jun 2023 13:32:44 -0400 Original-Received: from mr4.vodafonemail.de ([145.253.228.164]:43022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAwGY-0002DG-Nd for 64154@debbugs.gnu.org; Sun, 18 Jun 2023 13:32:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1687109556; bh=42nFSKNFrbmhVdTr+3zGULQujf0DbZjEAINbH9MtSXQ=; h=Message-ID:Date:User-Agent:Subject:References:Content-Language: From:To:In-Reply-To:Content-Type:From; b=nkhb+fRzDFeO4E91REdA+ALNMAaK+cAEN3pBOygxfX1nPToJ99HyljEzD5S0zumOI Ri9Jtn0biQw1/hj4wX6J7MUCXVXEW7XcbV4u21yumpoZdvaJVQGyyGC82iU1mEDPoj TzpvKznsqXQQok4DAYqFJwSY4B1iRYMzsBPV4cqg= Original-Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr4.vodafonemail.de (Postfix) with ESMTPS id 4Qkg2X6Xk4z1y4H for <64154@debbugs.gnu.org>; Sun, 18 Jun 2023 17:32:36 +0000 (UTC) Original-Received: from [192.168.0.74] (p54a6dbed.dip0.t-ipconnect.de [84.166.219.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4Qkg2S4XxrzMm7K for <64154@debbugs.gnu.org>; Sun, 18 Jun 2023 17:32:29 +0000 (UTC) Content-Language: de-DE-frami, en-US In-Reply-To: <83wn02r0s7.fsf@gnu.org> X-Forwarded-Message-Id: <83wn02r0s7.fsf@gnu.org> X-purgate-type: clean X-purgate: clean X-purgate-size: 5719 X-purgate-ID: 155817::1687109552-8AFF9023-E9C6ED89/0/0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263648 Archived-At: -------- Forwarded Message -------- Subject: Re: Some additions to the EasyPG Assistant's manual Date: Sat, 17 Jun 2023 10:44:08 +0300 From: Eli Zaretskii To: Jens Schmidt CC: emacs-devel@gnu.org > Date: Sun, 11 Jun 2023 20:00:12 +0200 > From: Jens Schmidt > > Hi, > > I have been setting up GnuPG for Emacs/EPA lately for transparent file > encryption and decryption, and done so for the first time. I've > condensed my experiences in some additions to the EPA texi file, see > attached patch. Of course, such experiences are highly personal, but at > least on Stackoverflow others have been struggling with the same issues > as I did ... > > This patch still needs some brushing up, and some splitting up probably > as well. It is based on emacs-29. Please in the future post patches via "M-x report-emacs-bug". > +You can use EasyPG Assistant without any Emacs or GnuPG configuration > +whatsoever, for example to encrypt and decrypt files automatically > +with symmetric encryption, @xref{Encrypting/decrypting gpg files}. ^^^^^ You want "see @ref" here, not @xref. The latter is only pertinent at the beginning of a sentence, because it produces a capitalized "See". > +When you save a buffer, say, to file @file{foo.gpg} for the first > +time, EasyPG Assistant presents you a list of keys in a new buffer > +@file{*Keys*} where you can select recipients for encryption. I don't think "new" is right here: Emacs generally reuses buffers that already exist. I'd drop "new" there. > +@xref{Key management} for a description of the format of that buffer. ^ Comma missing there. Some old version of Texinfo need it. > +You can streamline this recipient selection step by customizing > +variables @code{epa-file-encrypt-to} and @code{epa-file-select-keys}, > +see below. Instead of "see below", please add a cross-reference to the node where these variables are documented. > +If you have created your own keypair@footnote{For encryption and > +decryption of files you do not intend to share you do not have to use ^ A comma is missing there. > +also use some free-form string that gives information on the use of > +the keypair, like @code{backup} or @code{account database}.} you can ^ Another comma missing there. > +encryption for that file. Since encryption is performed with your > +public key, no passphrase is prompted for the buffer save, but you > +will be prompted for your passphrase for file reads every now and > +then, depending on the gpg-agent cache configuration. Passive voice alert! > +@xref{Caching Passphrases} for more information. ^ Comma after the closing brace is missing. > +As of June 2023, there are three active branches of GnuPG: 2.4, > +2.2, and 1.4. All those branches should work flawlessly with Emacs > with basic use-cases. They have, however, some incompatible > characteristics, which might be visible when used from Emacs. Given the known issues with GnuPG 2.4.1, do we need to say something about that here? > +@node GnuPG Pinentry > +@chapter GnuPG Pinentry Pleased add an index entry for the subject of this chapter. In general, it is a good idea to have an index entry for each chapter/section/subsection naming is main subject. > +@enumerate > +@item Use Emacs only for GnuPG requests that are triggered by Emacs itself, > +@item use Emacs for all GnuPG requests, or > +@item use Emacs for all GnuPG requests with other Pinentry as fallback. The capitalization if these items is inconsistent. > +FIXME: Brush the following paragraphs up. ?? > +1.: Ensure allow-loopback-pinentry is is configured for the GPG agent, > +which should be the default. Configure epg-pinentry-mode to > +`loopback. > + > +2.: Make pinentry-emacs the default pinentry by means of your > +operating system. Install package pinentry from GNU ELPA and execute > +M-x pinentry-start to start the Pinentry service. All GnuPG > +passphrase requests should result in a minibuffer prompt in the > +running Emacs. If Emacs or pinentry service are not running, > +passphrase requests fail. > + > +3.: Ensure other Pinentry supports Emacs prompt. pinentry-curses > +does, for example. Configure option allow-emacs-pinentry in > +gpg-agent.conf. Set environment variable INSIDE_EMACS for the calling > +process. Install package pinentry. Now if Emacs is running and > +pinentry-start has been exeucted, all GnuPG passphrase requests should > +result in a minibuffer prompt in the running Emacs. If Emacs or > +Pinentry service are not running, GnuPG uses the regular Pinentry > +instead. > + > +First alternative can be configured in addition to onw of the others: > +Requests triggered from within Emacs (like opening a gpg-encrypted > +file) are handled through loopback pinentry, Requests outside of emacs > +through pinentry feature. > + > +Note that the selection of a concrete Pinentry program determines only > +@emph{how} GnuPG queries for passphrases and not @emph{how often}. > +For the latter question @xref{Caching Passphrases}. This doesn't seem to be finalized? > +need to re-enter the passphrase occasionally. However, the > +configuration is a bit confusing since it depends on your GnuPG > +installation @xref{GnuPG version compatibility}, encryption method ^^^^^ Here, a @pxref in parentheses is TRT. Thanks.