GPG/PGP5 encryption

brian moore bem at cmc.net
Sun Nov 15 16:43:37 CET 1998


On Sun, Oct 25, 1998 at 06:34:11PM +0100, Werner Koch wrote:
> brian moore <bem at cmc.net> writes:
> 
> >     cipher-algo cast5
> >     compress-algo 1
> 
> Hmm, both should be handled by the preferences . I have to give that
> another test.

Okay, I can now say it doesn't work. :)

A key made with PGP5:
pub  1024D/488EE75C  created: 1998-11-15 expires: never      trust: -/q
(1)  postmaster-test <postmaster at localhost>
     S3

So it really only wants to see CAST5 stuff.

If I turn on some of the comments in pkclist.c, I see:
gpg: raw:  01 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00
gpg: DBG: mask=0000000000000000000000000000000000000000000000000000000000000008
gpg: DBG: bits=0000000000000000000000000000000000000000000000000000000000000000
gpg: DBG: prefs of type 1: selected -1

The problem seems to be in the initializing of the 'bits' array, since
this code wipes it:
        for(i=0; i < 8; i++ )
            bits[i] &= mask[i];

That should only be done on the second and subsequent passes through the
loop, though the only easy way to tell which pass you're on is checking
if (pkr == pk_list), which would be true on the first pass, but not
subsequent ones.

-- 
Brian Moore                       | "The Zen nature of a spammer resembles
      Sysadmin, C/Perl Hacker     |  a cockroach, except that the cockroach
      Usenet Vandal               |  is higher up on the evolutionary chain."
      Netscum, Bane of Elves.                 Peter Olson, Delphi Postmaster




More information about the Gnupg-devel mailing list