cvs commit: src/sys/libkern arc4random.c
Mark Murray
mark at grondar.org
Sun Aug 24 01:27:30 PDT 2003
Mike Silbersack writes:
> > http://www.csua.berkeley.edu/~das/marsaglia/ .
> > I can run it again if there's interest.
>
> Can you turn it into a port? :)
That would be nifty :-)
> > I'm not a cryptographer, but FWIW, I'm told that there are
> > statistical tests that can differentiate an ARC4 sequence from a
> > truly random sequence. However, it takes something like 2^31 bits
> > of data to detect the statistical bias.
>
> According to the paper referenced in the comment, the pattern is
> *especially* apparent in the first 256 words of output, which is why they
> should be thrown out. (From my original reading of the paper, I was
> unable to determine if by his terminology he meant the first 256 bytes,
> words, dwords, quadwords, or what. So I throw away the first 256 dwords,
> just to be safe.)
It is the first 2048 _bits_. Throwing away more doesn't hurt.
M
--
Mark Murray
iumop ap!sdn w,I idlaH
More information about the cvs-src
mailing list