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: EasyPG API and usage questions Date: Wed, 05 Mar 2008 16:25:22 +0900 Message-ID: <87d4q9my3h.fsf@broken.deisui.org> References: <87d4qiaj3j.fsf@broken.deisui.org> <87skzdi3pw.fsf@bzg.ath.cx> <871w6w1k38.fsf@broken.deisui.org> <8663w7hg1o.fsf_-_@lifelogs.com> <54a15d860802291623m3c9844d1k80515e661f435179@mail.gmail.com> <86bq5vd0gk.fsf@lifelogs.com> <87wsojngp6.fsf@broken.deisui.org> <867igiblec.fsf@jumptrading.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204701954 13651 80.91.229.12 (5 Mar 2008 07:25:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Mar 2008 07:25:54 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 05 08:26:20 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 1JWo0u-0007k4-41 for ged-emacs-devel@m.gmane.org; Wed, 05 Mar 2008 08:26:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JWo0M-0004pZ-LT for ged-emacs-devel@m.gmane.org; Wed, 05 Mar 2008 02:25:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JWo0I-0004p6-P6 for emacs-devel@gnu.org; Wed, 05 Mar 2008 02:25:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JWo0G-0004o2-7u for emacs-devel@gnu.org; Wed, 05 Mar 2008 02:25:29 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JWo0G-0004nq-43 for emacs-devel@gnu.org; Wed, 05 Mar 2008 02:25:28 -0500 Original-Received: from an-out-0708.google.com ([209.85.132.248]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JWo0F-0002ue-Nz for emacs-devel@gnu.org; Wed, 05 Mar 2008 02:25:27 -0500 Original-Received: by an-out-0708.google.com with SMTP id c25so347525ana.84 for ; Tue, 04 Mar 2008 23:25:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references:date:in-reply-to:message-id:user-agent:mime-version:content-type:sender; bh=NilpMGsm6wxlV17hZyFyKdHQWNaPSz9OLkCa+qzy/R0=; b=qaMeRzpsL19uBTcchlO3HV4y3B5+Fp+lrU23V7GbtY36+8H0tTKptG1P0003WHLl1I9rTbG4rfQqzXUp11YnTWBGtIg6jjS3cB1JVU4oazUBE+DM0PH8Qc0MuNaUJx0qtA7+bKRDJmbH1DgkOSk9UhHVg4PiQ59hY5uWdfNgq5g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id:user-agent:mime-version:content-type:sender; b=GPtZfCF/GQSuJ3x2mRamRx+doIEmeMiJKWpblacb4jjktGdBsCfFP2b7mKEPgYcPyvrnwARLIziMU6FYArIxtk0+mGT2hYbW2/znPpr+2esUduTupYTxJXkBn6XV4XEiDCNnal9FJ38TXmhbV5o/7W1e8PYKuKbjGctWOa17j0E= Original-Received: by 10.100.6.13 with SMTP id 13mr6045617anf.16.1204701926633; Tue, 04 Mar 2008 23:25:26 -0800 (PST) Original-Received: from p360 ( [150.82.173.253]) by mx.google.com with ESMTPS id 5sm725916wrh.24.2008.03.04.23.25.24 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 04 Mar 2008 23:25:26 -0800 (PST) In-Reply-To: <867igiblec.fsf@jumptrading.com> (Ted Zlatanov's message of "Tue, 04 Mar 2008 08:42:51 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:91363 Archived-At: >>>>> In <867igiblec.fsf@jumptrading.com> >>>>> Ted Zlatanov wrote: DU> I think that it would not be too late to implement these features until DU> someone else really wants them. The former is not even provided by DU> GPGME, GPA, etc., > I don't think that just because a feature has not been done means it's > not useful. I gave specific examples: I'd like to encrypt a Maildir > spool, and don't want to burn the CPU cycles necessary to use the > default cipher on it. On the other hand, I want a good cipher (better > than the default if possible) applied to my passwords file. If you > think those examples are only useful to me, I'll set up my own functions > to do it. I think other users would like that kind of flexibility. Well, please don't make a hypothesis. Do you really see any performance issues in your use cases? Do you really see significant relevance between speed and strength of ciphers which GnuPG supports? I tried each cipher to encrypt 46MiB linux-2.6.24.tar.bz2, and got the following result: 3DES 4.201s, CAST5 1.558s, BLOWFISH 2.628s, AES 1.901s, AES192 1.988, AES256 2.108s, and TWOFISH 2.029s. Here the fastest algorithm is CAST5 (128bit key), and the longest key length algorithm is AES256. The time difference of them are only 0.55s (1/4 of AES256's). The difference will decrease if the inputs are relatively small files in mail spools. > >> I think specifying symmetric encryption at the epa-file level would be > >> nice too. DU> No, epa-file already supports this. You have never used epa-file, DU> have you? It interactively asks you which encryption to use. > Here's what I did (before asking you those questions) from an Emacs CVS > checkout (epa-mode is t, and I also ran epa-file-enable): [...] > Here I assumed I need to set up GPG keys (I have none) and gave up. Ah, that's a bug. Thanks for finding it in the corner case. Here is a patch to fix this. Index: lisp/epa.el =================================================================== RCS file: /sources/emacs/emacs/lisp/epa.el,v retrieving revision 1.6 diff -c -r1.6 epa.el *** lisp/epa.el 12 Feb 2008 01:24:20 -0000 1.6 --- lisp/epa.el 5 Mar 2008 07:16:21 -0000 *************** *** 542,551 **** NAMES is a list of strings to be matched with keys. If it is nil, all the keys are listed. If SECRET is non-nil, list secret keys instead of public keys." ! (let ((keys (epg-list-keys context names secret))) ! (if (> (length keys) 1) ! (epa--select-keys prompt keys) ! keys))) (defun epa--show-key (key) (let* ((primary-sub-key (car (epg-key-sub-key-list key))) --- 542,548 ---- NAMES is a list of strings to be matched with keys. If it is nil, all the keys are listed. If SECRET is non-nil, list secret keys instead of public keys." ! (epa--select-keys prompt (epg-list-keys context names secret))) (defun epa--show-key (key) (let* ((primary-sub-key (car (epg-key-sub-key-list key))) Regards, -- Daiki Ueno