GPG/PGP5 encryption

brian moore bem at cmc.net
Sun Nov 15 17:10:53 CET 1998


On Sun, Nov 15, 1998 at 04:43:37PM -0800, brian moore wrote:
> 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.

Hrrm, it's a bit more complex than that.  Again, with a pgp5 key that
only knows cast5:
gpg: DBG: mask=0000000000000000000000000000000000000000000000000000000000000008
gpg: DBG: bits=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000004
gpg: DBG: prefs of type 1: selected -1

I think the initial seeding of 'bits' will have to allow for all the
algorithms GPG knows, not just 3DES.

-- 
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