From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Daiki Ueno" Newsgroups: gmane.emacs.devel Subject: Re: patch to include EasyPG to Emacs Date: Fri, 15 Feb 2008 11:20:10 +0900 Message-ID: <54a15d860802141820l317efd2bk45955d62065ed956@mail.gmail.com> References: <87ve515pn4.fsf@broken.deisui.org> <200802102236.m1AMaHLU026386@sallyv1.ics.uci.edu> <54a15d860802101534h37b953b7i7061123ae83e4dec@mail.gmail.com> <87odaongwx.fsf@broken.deisui.org> <200802120348.m1C3mJ0B016980@sallyv1.ics.uci.edu> <200802131728.m1DHSV7t011392@sallyv1.ics.uci.edu> <54a15d860802140326t1ede84c9v9ca8abd62f837e21@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1203042035 32213 80.91.229.12 (15 Feb 2008 02:20:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Feb 2008 02:20:35 +0000 (UTC) Cc: dann@ics.uci.edu, mwolson@gnu.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 15 03:20:58 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JPqC3-0003LZ-Di for ged-emacs-devel@m.gmane.org; Fri, 15 Feb 2008 03:20:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JPqBY-0005Bj-NL for ged-emacs-devel@m.gmane.org; Thu, 14 Feb 2008 21:20:20 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JPqBT-0005BL-TQ for emacs-devel@gnu.org; Thu, 14 Feb 2008 21:20:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JPqBQ-0005B8-K2 for emacs-devel@gnu.org; Thu, 14 Feb 2008 21:20:14 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JPqBQ-0005B5-EH for emacs-devel@gnu.org; Thu, 14 Feb 2008 21:20:12 -0500 Original-Received: from hs-out-0708.google.com ([64.233.178.245]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JPqBP-0005tB-IZ for emacs-devel@gnu.org; Thu, 14 Feb 2008 21:20:11 -0500 Original-Received: by hs-out-0708.google.com with SMTP id j58so343682hsj.10 for ; Thu, 14 Feb 2008 18:20:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=CWSEFqDk1kXIr0WfKh/CsoonAiIre5+QAylh1jgeUHI=; b=fWA/XB9SUXlwrmw2HyAcTgMuVsdotLnS/fcP1/cJPuptijMI/8xEbItoHNLM4JAUOhCdAm0fjrghifw/7SVb638L+YaAG2MLo/meTsydX3VFb2RiJpp2VlD+FnkQ+Lx1a8wkcPzXc+eA5xTtGfNPuSW8psLb/nZK5vvWvicllvA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=Esrxt/3nHn4JVItT9e2a8nWOIgpR89roX646sLLnmi2Pp9UeEhpTB/57aA9Nk46MrCkD02ynvjX2fpdVwEtJ4CZvB5jp9sJ5ppXaxk6Dx7fCmp+rfgrQBh0E5arDZp+JQL7l/1TZxFI0jEzXZKIH+Kod7pGnByrJHDMEJbuHwL4= Original-Received: by 10.142.221.19 with SMTP id t19mr1830173wfg.100.1203042010348; Thu, 14 Feb 2008 18:20:10 -0800 (PST) Original-Received: by 10.142.241.4 with HTTP; Thu, 14 Feb 2008 18:20:10 -0800 (PST) In-Reply-To: Content-Disposition: inline X-Google-Sender-Auth: e0d7287f29fab961 X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 (Google crawlbot) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:89131 Archived-At: 2008/2/15, Richard Stallman : > > How can that work? You need to give the key each time you decrypt. > > (I guess that you mean "encrypt" rather than "decrypt"). > > I should have said "give your passphrase". That's needed for > decryption. That depends on situations (reading or writing, symmetric encryption or public key encryption, and gpg-agent is running or not). I believe the current behavior reasonable enough and intuitive for users. Here is the accurate logic in pseudo code. When reading: If the file is encrypted in symmetric encryption If gpg-agent is running use gpg-agent; gpg is able to by-pass the interaction with Emacs, and it will directly ask the user with pinentry. gpg-agent doesn't cache passphrase for symmetric encryption in this case. Else the user will be prompted for passphrase from the minibuffer. The passphrase may be cached if certain variable is set. End Else If gpg-agent is running use gpg-agent. gpg-agent may cache the passphrase in this case. Else the user will be prompted for passphrase from the minibuffer. The passphrase will never be cached. End End When writing: If the file is being created ask user how to encrypt the content Else inherit the encryption parameters of the file End If the user select symmetric encryption the same behavior with the reading case, except that passphrase will be prompted twice for confirmation. Else the same behavior with the reading case End -- Daiki Ueno