[dev] Re: [cvs] commit: horde/lib/Cipher rc2.php

Mike Cochrane mike at graftonhall.co.nz
Thu Jul 3 05:10:07 PDT 2003


> ----- Message from chuck at horde.org ---------
>
> Quoting Mike Cochrane <mike at graftonhall.co.nz>:
>
> >   Log:
> >   Fix decryption to not use unreliable bitwise operators,
>
> I'm curious - unreliable how? Also, does this have any performance
> implications?

Performance loss reasonably large but I haven't measured. The code is the
equvalent of a circular left shift, on a 32bit integer. As php doesn't have a
32bit integer with a left shift operator, this is the most reliable way of
getting it to work.

I spend ages debugging the cast128 code and found the problem was in the left
shift implementation also.

- mike :-)



More information about the dev mailing list