On Sun, Apr 11, 2010 at 05:20:07PM -0700, Jamie Zawinski wrote:
> I believe this was fixed in xscreensaver 5.06 in July 2008.
> 
> The problem was a single character typo in yarandom.c: it said "024"
> (octal) where it should have said "24" (decimal), causing the two lags
> to not be co-prime.

lakeview ok % diff -u unicode-screensaver-0.2/utils/yarandom.c 
xscreensaver-5.10/utils/yarandom.c; echo $?
0

So, no, this is not fixed.  The issue that was present in the yarandom.c
I patched was that the value of seed when the generator is being
initialized becomes identical after around i == 7.  My conjecture is
that you're basically losing randomness since seed is multiplied by a
large number.  This pushes whatever randomness existed from the
additional seed to higher and higher bits until it disappears
altogether.  By using a bitwise rotate, we move that randomness to a
variety of bits and therefore the avalanche effect is dramatically
increased.

Files dump[4-6] in #573989 show how the generator produces identical
numbers very quickly, and using diff on pairs of these files shows how
the seed variable ends up as a constant.  The issue is not the actual
generator at all, but the seeding.  Whether the algorithm varies
slightly from Knuth seems to be mostly irrelevant here.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

Attachment: signature.asc
Description: Digital signature

Reply via email to