Re: What's wrong with this RC4?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


sci.crypt archive

Re: What's wrong with this RC4?

From: Andrew Pogrebennyk <andrew86@voliacable.com>
Date: Sun Dec 18 2005 - 20:53:21 CET

Sebastian Gottschalk wrote:

>> [...]
>
> strlen(char[]) is undefined and most-likely zero, so your loop doesn't even
> run. Try using strlen(&buffer) respective strlen(&key) instead.
>
> I wonder that you couldn't even debug such a little problem, f.e. by simply
> printing the value of counter and all fields in every loop iteration.
>
> For the next, you should clean up that mess. i < SIZE + 1 is equivalent to
> i <= SIZE, the loop counters can be local, AND 255 is much faster than %256
> and can be done implicitely by working on uint8_t (aka Bytes).

I've really asked too early, found a few more bugs. Will not repeat that
again, thanks for beeing patient.
Received on Fri Dec 23 20:10:54 2005