Re: ANNOUNCE: New "Leopard7" CSPRNG !

From: Tom St Denis (tomstdenis@iahu.ca)
Date: 02/21/03


From: "Tom St Denis" <tomstdenis@iahu.ca>
Date: Thu, 20 Feb 2003 22:05:15 -0500


"Gregory G Rose" <ggr@qualcomm.com> wrote in message
news:b33uu4$bgs@qualcomm.com...
> In article <20030220141802.05172.00000012@mb-fb.aol.com>,
> Mrsjunecarey <mrsjunecarey@aol.com> wrote:
> >http://wizardsworks.org/~robin/leopard.html
>
> Trivially broken. Consider cases where the indexes
> differ by a multiple of two (ie. half the time on
> average). The special case where x==y is
> particularly badly broken.
>
> They just get worse...

Not to mention the code is horribly written and not portable. If
"mrsjunecarey" took the eight seconds it requires to stop and form a
complete thought then maybe he/she/it wouldn't repeated post nonsense
designs.

Some examples of this persons complete lack of coding knowledge

1. The code is in a header file
2. "// ANSI C" nuff said
3. passing const everywhere. While its generally a good idea its not
always useful.
4. The swap function doesn't wrap the indicies
5. mixing function calls then variable definitions, e.g. sign of no
organizational skills
6.

 stateIndex += (state [ i ] + key [ keyIndex ]);
 Swap (i, stateIndex);

Bound to cause errors.

7.

    L7ByteType Byte (void) {
      Swap (state [ x++ ], state [ y++ ]);
      return state [ state [ x ] ];
    }

x++ and y++ wander off into lala land after at most 256 outputs...

8.

    size_t QueryStateSize (void) const {

The use of const is?

Tom