Mailing List Archive

3DES decryption bug in 0.4.0
Hi,

shame on me... It's about half past three in the morning and I went to bed
and than it came to my mind: I made a mistake in the key schedule on 3DES.
I switched on the computer, checked the code, and *bang*, their is really
a bug in Triple-DES decryption.... :-((

Why was this typo not detected by the integrated selftest? The answer is
simple: I wrote my own testcase for my own code. This is generally a bad
idea and as a result of this, the selftest simple doesn't run a test on
the affected subject...

For the first time I appended a hot 'mini-patch' wich fixes the bug to
this mail. I don't think Werner should release a new version to include
this patch.
I will made a larger patch with some more speed improvements on 3DES
tomorrow.

To apply the patch change to directory 'gnupg-0.4.0/cipher' and type in
the command 'patch < PATH_TO_FILE/des-decrypt-bug.patch' and recompile
gnupg.

Please note: The bug apply only to Triple-DES decryption. Encryption is
not affected. Their is no problem with security in manner of unsecure
encryption or leaking session keys or private keys related to this bug.
The 'only' problem is that you can't decrypt message wich used Triple-DES
as symmetric encryption algorithm. Just apply the patch and then you can
decrypt your previous encrypted data.

Ok. Now I will go to bed and hopefully I will not discover more bugs...


cu
Michael Roth
Re: 3DES decryption bug in 0.4.0 [ In reply to ]
On Sat, 19 Sep 1998, Michael Roth wrote:

> Why was this typo not detected by the integrated selftest? The answer is
> simple: I wrote my own testcase for my own code. This is generally a bad
> idea and as a result of this, the selftest simple doesn't run a test on
> the affected subject...
>
> For the first time I appended a hot 'mini-patch' wich fixes the bug to
> this mail. I don't think Werner should release a new version to include
> this patch.
> I will made a larger patch with some more speed improvements on 3DES
> tomorrow.
>
> To apply the patch change to directory 'gnupg-0.4.0/cipher' and type in
> the command 'patch < PATH_TO_FILE/des-decrypt-bug.patch' and recompile
> gnupg.


I was just about to begin playing with the DES features in gpg--thanks to
Michael's quick work, I'll be far less confused. As such, I've updated
Werner's version of my spec file that came with the distribution to also
apply the patch as part of the build process. It may be fetched from my
gpg page.

C=)

<http://technocage.com/~caskey/gpg/>

--------------------------------------------------------------------------
There is hardly a thing in the world that some man can not
make a little worse and sell a little cheaper.
--------------------------------------------------------------------------
Caskey <caskey*technocage.com> /// pager.818.698.2306
TechnoCage Inc. ///| gpg: 1024D/7BBB1485
--------------------------------------------------------------------------
I didn't fight my way to the top of the food chain to be a vegetarian.