Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Feb 2003 23:39:04 +0300
From:      "Andrey A. Chernov" <ache@nagual.pp.ru>
To:        David Malone <dwmalone@maths.tcd.ie>
Cc:        Mark Murray <mark@grondar.org>, Bakul Shah <bakul@bitblocks.com>, "Jeroen C. van Gelderen" <jeroen@vangelderen.org>, phk@FreeBSD.ORG, current@FreeBSD.ORG
Subject:   Re: rand() is broken
Message-ID:  <20030202203904.GA67454@nagual.pp.ru>
In-Reply-To: <200302022005.aa62194@salmon.maths.tcd.ie>
References:  <200302021943.h12JhEaX050421@grimreaper.grondar.org> <200302022005.aa62194@salmon.maths.tcd.ie>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Feb 02, 2003 at 20:05:29 +0000, David Malone wrote:
> > > I presume it also produces reasonably uniform output for most
> > > seeds too.
> 
> > Yes. Modulo the requirement to "burn" a bit of output after a
> > reseed.
> 
> I guess the crypto guys would have junked it otherwise ;-)

Notice that it will happens _each_ time for rand() due to rand_r() 
requirement 1) to output the same sequence as rand() and to 2) to store
one word seed value each time. I.e. it will be reseed on each call.

-- 
Andrey A. Chernov
http://ache.pp.ru/

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?20030202203904.GA67454>