From owner-freebsd-current Sun Feb 2 7:44: 1 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 262D137B405; Sun, 2 Feb 2003 07:44:00 -0800 (PST) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 187B143F43; Sun, 2 Feb 2003 07:43:58 -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 h12Fhud6065213; Sun, 2 Feb 2003 18:43:56 +0300 (MSK) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.6/8.12.6/Submit) id h12Fhu0a065212; Sun, 2 Feb 2003 18:43:56 +0300 (MSK) (envelope-from ache) Date: Sun, 2 Feb 2003 18:43:56 +0300 From: "Andrey A. Chernov" To: Mark Murray Cc: "Jeroen C. van Gelderen" , phk@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: rand() is broken Message-ID: <20030202154356.GA65166@nagual.pp.ru> References: <200302021532.h12FWWaX047973@grimreaper.grondar.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200302021532.h12FWWaX047973@grimreaper.grondar.org> 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 15:32:32 +0000, Mark Murray wrote: > "Jeroen C. van Gelderen" writes: > > Wouldn't it be a good idea to change the name at the same time? Or > > should it be retained for compatibility reasons with other BSDs? > > > > Currently the name needlessly exposes implementation detail. Callers > > expect good, cheap, non-blocking randomness but don't give a hoot if > > that is actually provided trough use of RC4 or not. I see no reason why > > the implementation could be changed if the contract is maintained. > > Good point. We can re-implement random() internally with arc4rand(). > > Objections? We can't, simple because sequence must be repeated for the same seed across the calls. -- 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