lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> On Mon, Sep 12, 2011 at 4:55 PM, Roberto Ierusalimschy
> <> wrote:
> > After too many cycles,
> > the accumulation of overflows ends up causing problems (e.g., loosing
> > bits).
> True. By my calculation, you can safely add about a million 32-bit
> integers together before you risk losing bits in the worst-case
> scenario.

Yes. But in the SHA algorithm, we end up summing some Hs with other Hs,
not with 32-bit integers. So, at each step we may get a whole extra
bit in the result; after a few dozen iterations we already may have

-- Roberto