emacs-devel
[Top][All Lists]
Advanced

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

Re: pgg symmetric encryption patch


From: Sascha Wilde
Subject: Re: pgg symmetric encryption patch
Date: Fri, 7 Oct 2005 23:49:52 +0200
User-agent: Mutt/1.5.10i

On Fri, Oct 07, 2005 at 02:06:55PM -0400, Ken Manheimer wrote:
> On 10/7/05, Sascha Wilde <address@hidden> wrote:
> > On Thu, Oct 06, 2005 at 06:41:14PM -0400, Ken Manheimer wrote:

> > > 1. my most serious concern is with the unpatched pgg code.  the text that
> > >    it encrypts is altered from the original, in order to append \r 
> > > carriage
> > >    returns to the text (using pgg-as-lbt / pgg-convert-lbt).
> > >
> > >    the problem with this is that decryption on unix-ish platforms with
> > >    anything other than pgg will result in text that is different than the
> > >    original.
> >
> > This is supposed to be a feature, not a bug.
> > But read on, there actually _is_ a bug in PGG...
[...]
> > THE BUG: pgg does the newline conversion by it self (I'm not quite
> > sure why) but fails to tell the backend (gpg) that it should operate
> > in textmode, so the Data Packet is tagged as binary, not text data...
> 
> pgg is definitely doing the wrong thing in converting the text to DOS
> format, itself.  that requires that pgg be the decryption program used
> if the platform where the message is being decrypted does not use DOS
> file-encoding.

While I agree, that it is unnecessary (at least with gpg as backend) I
wouldn't say, that it is wrong.  When the content of the data packet
is tag as text, _any_ decrypting application is required to convert
the <CR><LF> to the type of linebreak matching the local system.

> > Please try if the appended patch (only against pgg-gpg.el) fixes this
> > issue.
> 
> that didn't work, but lead me in the right direction to what looks
> like the fix.
> 
> it does work if you also remove the invocation of the pgg-as-lbt macro
> which encloses the pgg-gpg-process-region call. 

As explained it shouldn't make any difference if the conversion is
done by pgg or gpg, as long as the data is tagged as text.

I tried it here with my latest patches and gpg and I was able to
encrypt a text using pgg and decrypt it with gpg on the command line
as well as with pgg within emacs and getting the right result (unix
like linebreakes, that is) in both cases.  What happens when you try
it?



> i'm including a patch which does that for all of the pgg-gpg.el
> routines which use pgg-as-lbt.

hmm, I don't think you did...  ;-)  And, as explained, I think this
shouldn't be needed.

Anyway I found another (unrelated) bug in my code, please see the
attached patch.

> the problem was that the 'result' value in dolist was being setq'd,
> but not made local, so the previous result is used in the case that no
> new result is found.  i added a '(let (result) ...)' around the
> dolist, and it's now behaving properly.  that's in my version of your
> patch.

Yes, this was a bug.  (Funny enough, I just found it m self)

Everybody: please attache the provided patch...

[...]
> we're making some good progress here.

yes, seems so!  :-)

Thanks for your work.

cheers
sascha
-- 
Sascha Wilde : "Lies, was ich meine, nicht, was ich schreibe."
             : (Urs Traenkner in de.alt.admin)

Attachment: pgg-gpg_symmetric-key-p.patch
Description: Text document

Attachment: pgp2dHfD55gcR.pgp
Description: PGP signature


reply via email to

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