Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 02 Feb 2003 15:40:04 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Mark Murray <mark@grondar.org>
Cc:        "Jeroen C. van Gelderen" <jeroen@vangelderen.org>, phk@FreeBSD.ORG, current@FreeBSD.ORG
Subject:   Re: rand() is broken
Message-ID:  <3E3DAC54.13A68DE6@mindspring.com>
References:  <200302021532.h12FWWaX047973@grimreaper.grondar.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Mark Murray wrote:
> "Jeroen C. van Gelderen" writes:
> > Wouldn't it be a good idea to change the name at the same time? Or
> > should it be retained for compatibility reasons with other BSDs?
> >
> > Currently the name needlessly exposes implementation detail. Callers
> > expect good, cheap, non-blocking randomness but don't give a hoot if
> > that is actually provided trough use of RC4 or not. I see no reason why
> > the implementation could be changed if the contract is maintained.
> 
> Good point. We can re-implement random() internally with arc4rand().
> 
> Objections?

The same objections I always raise when someone replaces a PRNG that
allows repeatable results with old software with a new one, that does
not, I guess.

BTW: if /dev/random is so damn good, why are you using it as an
implementation detail for these functions, instead of adding yet
another backward-incompatible algorithm?

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E3DAC54.13A68DE6>