From owner-freebsd-current Sun Feb 2 10:25:46 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADAA537B401; Sun, 2 Feb 2003 10:25:45 -0800 (PST) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id A157F43F3F; Sun, 2 Feb 2003 10:25:44 -0800 (PST) (envelope-from ache@pobrecita.freebsd.ru) Received: from pobrecita.freebsd.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.12.6/8.12.6) with ESMTP id h12IPhd6066429; Sun, 2 Feb 2003 21:25:43 +0300 (MSK) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.6/8.12.6/Submit) id h12IPhgF066428; Sun, 2 Feb 2003 21:25:43 +0300 (MSK) (envelope-from ache) Date: Sun, 2 Feb 2003 21:25:43 +0300 From: "Andrey A. Chernov" To: Mark Murray Cc: Doug Barton , Kris Kennaway , current@FreeBSD.ORG Subject: Re: rand() is broken Message-ID: <20030202182543.GC66318@nagual.pp.ru> References: <20030202124258.GA63153@nagual.pp.ru> <200302021730.h12HUmaX048964@grimreaper.grondar.org> <20030202182009.GA66318@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030202182009.GA66318@nagual.pp.ru> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Feb 02, 2003 at 21:20:09 +0300, Andrey A. Chernov wrote: > On Sun, Feb 02, 2003 at 17:30:48 +0000, Mark Murray wrote: > > > > Why not? Arc4 is a) deterministic and b) good for all bits. > > If you mean arc4random() function - not, because it use true randomness, > if you mean RC4 algorithm, probably yes, but we should compare its > distribution with our current variant and be sure that speed is > acceptable. What form RC4 distribution have? BTW, if we ever think about replacing our current variant with such complex and unknown (at least to me) thing as RC4-based PseudoRNG, I simpatize more to Knuth variant mentioned by David Schultz: http://www-cs-faculty.stanford.edu/~knuth/programs/rng.c RC4 is good for hashing existen randomness, but is it good as PseudoRNG? -- 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