Date: Sun, 02 Feb 2003 22:35:54 +0000 From: Mark Murray <mark@grondar.org> To: "Andrey A. Chernov" <ache@nagual.pp.ru> Cc: current@FreeBSD.ORG Subject: Re: rand() is broken Message-ID: <200302022235.h12MZsaX052670@grimreaper.grondar.org> In-Reply-To: Your message of "Mon, 03 Feb 2003 01:30:43 %2B0300." <20030202223043.GB68806@nagual.pp.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
"Andrey A. Chernov" writes: > On Sun, Feb 02, 2003 at 22:19:33 +0000, Mark Murray wrote: > > > > 1) Implementing random(3) with RC4 is not needed, its algorithm is > > > already equal or better. > > > > Rubbish. :-) RC4's internal state is 256 bytes. In theory, its > > cycle-of-repetition is 2^(8*256) bits. > > This is comparable with random() TYPE4 which internal state is 252 bytes. I stand (somewhat) corrected. The random() code is _nasty_ complexity-wise. Its not obvious how it works. RC4 is 10-20 lines and clean with no magic numbers. M -- Mark Murray iumop ap!sdn w,I idlaH 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?200302022235.h12MZsaX052670>