unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Daiki Ueno <ueno@unixuser.org>
To: Ted Zlatanov <tzz@lifelogs.com>
Cc: emacs-devel@gnu.org
Subject: Re: EasyPG API and usage questions
Date: Wed, 05 Mar 2008 16:25:22 +0900	[thread overview]
Message-ID: <87d4q9my3h.fsf@broken.deisui.org> (raw)
In-Reply-To: <867igiblec.fsf@jumptrading.com> (Ted Zlatanov's message of "Tue,  04 Mar 2008 08:42:51 -0600")

>>>>> In <867igiblec.fsf@jumptrading.com> 
>>>>>	Ted Zlatanov <tzz@lifelogs.com> 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




  reply	other threads:[~2008-03-05  7:25 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-25 10:12 Suggestion: epa-file-select-keys should show currently selected keys Sascha Wilde
2008-02-25 19:01 ` Richard Stallman
2008-02-26  9:35   ` Sascha Wilde
2008-02-26 23:47     ` Richard Stallman
2008-02-27  8:39   ` Daiki Ueno
2008-02-27 16:08     ` Richard Stallman
2008-02-28  8:36       ` Daiki Ueno
2008-02-28 13:56     ` Bastien
2008-02-29  1:40       ` Richard Stallman
2008-02-29  4:07       ` Daiki Ueno
2008-02-29  4:59         ` Stefan Monnier
2008-02-29 16:40         ` EasyPG API and usage questions (was: Suggestion: epa-file-select-keys should show currently selected keys) Ted Zlatanov
2008-03-01  0:23           ` Daiki Ueno
2008-03-01  0:38             ` Daiki Ueno
2008-03-03 20:19             ` EasyPG API and usage questions Ted Zlatanov
2008-03-04  6:31               ` Daiki Ueno
2008-03-04 14:42                 ` Ted Zlatanov
2008-03-05  7:25                   ` Daiki Ueno [this message]
2008-03-05 16:24                     ` Ted Zlatanov
2008-03-05 16:41                     ` Ted Zlatanov
2008-03-01 10:20           ` Reiner Steib
2008-03-03 19:50             ` Ted Zlatanov
2008-02-26  9:42 ` Suggestion: epa-file-select-keys should show currently selected keys Sascha Wilde
2008-02-27  8:07   ` Daiki Ueno
2008-02-27 12:01     ` Sascha Wilde
2008-03-04 14:36       ` Sascha Wilde
2008-03-11  8:53         ` Sascha Wilde
2008-03-16  4:05           ` Michael Olson

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=87d4q9my3h.fsf@broken.deisui.org \
    --to=ueno@unixuser.org \
    --cc=emacs-devel@gnu.org \
    --cc=tzz@lifelogs.com \
    /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).