Using SHA1 as RNG
Klaus Alexander Seistrup
spam at magnetic-ink.dk
Fri Mar 14 14:25:00 EST 2003
Irmen de Jong wrote:
> I think your idea is flawed, sorry. It only depends on a few
> random values at seeding time, and after that - see my previous
> comment.
No need to be sorry. I posted the example here to get some feedback,
and I have clearly overlooked something, because I never thought
about the possibility that the process might end up repeating itself.
Thanks.
> Even if the hash doesn't repeat itself, you still get a 100%
> predictible sequence of numbers because the SHA algorithm is
> repeatable.
But the same goes for the original Wichmann-Hill generator, doesn't
it?
But to predict the sequence of the SHARandom generator you would need
to know the three initial seeds plus all of the intermediate values,
and the number of steps taken, wouldn't you?
// Klaus
--
><> unselfish actions pay back better
More information about the Python-list
mailing list