Subject: Re: kernel ip_randomid() and libc randomid(3) still "broken"
To: Jonathan Stone <jonathan@DSG.Stanford.EDU>
From: Chris Gray <chris@kiffer.eunet.be>
List: tech-net
Date: 11/27/2003 00:29:49
On Tuesday 25 November 2003 23:07, Jonathan Stone wrote:
> In message <20031125213731.D518023410@thoreau.thistledown.com.au>Simon
> Burge wr ites
>
> >While we throw away up to 3 random numbers each time we ask for a single
> >random number, we're always going to have a minimum gap of approximately
> >1/3rd the theoretical gap.
>
> Its enough to make you weep. Well, me anyway.

Me too. Frankly the whole argument seems to be taking place at the level of a 
saloon bar discussion.

I'm no expert in PRNG or cryptography myself, but I do know that:
 - if you don't know what you're doing, you'll probably $%^& up big time.
 - attempts to improve a not-very-good algorithm by post-processing the 
results most often result in an even-worse-than-before algorithm, to the 
dismay of the programmer.
 - there is a tradeoff between randomness (unpredictability) and 
non-repetition. Ask yourself which die is is the more pedictable: the one 
which quite often turns up two sixes in a row (if you just threw a six, the 
chance that you will throw another is exactly 1/6), or the one that is 
guaranteed never to repeat any number within 5 throws?

If all the participants in this debate know even this much, then they don't 
behave as if they do. It's an embarrassment to watch.

-- 
Chris Gray                                  /k/ Embedded Java Solutions
Embedded & Mobile Java, OSGi              http://www.kiffer.be/k/
chris.gray@kiffer.be                                      +32 477 599 703