Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 Feb 2003 00:03:38 +0000
From:      Tony Finch <dot@dotat.at>
To:        mark@grondar.org
Cc:        current@freebsd.org
Subject:   Re: rand() is broken 
Message-ID:  <E18fU5K-0006VP-00@chiark.greenend.org.uk>
In-Reply-To: <200302021836.h12Ia2aX049696@grimreaper.grondar.org>
References:  <20030202182009.GA66318@nagual.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Mark Murray <mark@grondar.org> wrote:
>
>3) int random(void) which returns a number statistically
>   random in all bits.
>
>We have most of this, and RC4 can deliver. RC4's "licence" is
>fine. Call it "ArCFour" and there is no problem. The code is
>small, fast and repeatable, and meets conditions 1-4 above.

Note that POSIX 2001 states that random() uses a non-linear additive
feedback random-number generator, and strongly implies that rand()
uses the traditional brain-dead algorithm.

Tony.
--
f.a.n.finch  <dot@dotat.at>  http://dotat.at/
SOLE LUNDY FASTNET: WEST VEERING NORTHWEST 6 OR 7, OCCASIONALLY GALE 8. RAIN
OR SQUALLY SHOWERS. MODERATE OR GOOD.

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?E18fU5K-0006VP-00>