From owner-freebsd-current Sun Feb 2 10:33: 3 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 D257637B401; Sun, 2 Feb 2003 10:33:01 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id F40C843E4A; Sun, 2 Feb 2003 10:33:00 -0800 (PST) (envelope-from phk@freebsd.org) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id h12IWo4W029597; Sun, 2 Feb 2003 19:32:50 +0100 (CET) (envelope-from phk@freebsd.org) To: "Andrey A. Chernov" Cc: Mark Murray , Doug Barton , Kris Kennaway , current@freebsd.org Subject: Re: rand() is broken From: phk@freebsd.org In-Reply-To: Your message of "Sun, 02 Feb 2003 21:20:09 +0300." <20030202182009.GA66318@nagual.pp.ru> Date: Sun, 02 Feb 2003 19:32:50 +0100 Message-ID: <29596.1044210770@critter.freebsd.dk> 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 In message <20030202182009.GA66318@nagual.pp.ru>, "Andrey A. Chernov" writes: >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? RC4 can be implemented in about 4 lines of C. Anyway, last time we discussed this, I think we stuck with the rand() we had because we feared that people were using it's repeatable well documented sequence of random numbers in regression testing. This is still a valid concern, but I don't know how significant a concern it is. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message