emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EasyPG API and usage questions


From: Daiki Ueno
Subject: Re: EasyPG API and usage questions
Date: Wed, 05 Mar 2008 16:25:22 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>>>>> In <address@hidden> 
>>>>>   Ted Zlatanov <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]