From owner-freebsd-current Sun Feb 2 14: 1:35 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 DABCE37B401 for ; Sun, 2 Feb 2003 14:01:34 -0800 (PST) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB03643F75 for ; Sun, 2 Feb 2003 14:01:33 -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 h12M1Sd6068566; Mon, 3 Feb 2003 01:01:28 +0300 (MSK) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.6/8.12.6/Submit) id h12M1SAd068565; Mon, 3 Feb 2003 01:01:28 +0300 (MSK) (envelope-from ache) Date: Mon, 3 Feb 2003 01:01:28 +0300 From: "Andrey A. Chernov" To: Mark Murray Cc: Bakul Shah , current@FreeBSD.ORG Subject: Re: rand() is broken Message-ID: <20030202220128.GC68356@nagual.pp.ru> References: <200302022057.PAA26422@tonnant.cnchost.com> <200302022123.h12LNhaX051805@grimreaper.grondar.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200302022123.h12LNhaX051805@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 21:23:43 +0000, Mark Murray wrote: > > That was random(9). KERNEL random(). KERNEL random() can be easily implemented (better - replaced) with arc4random(), there is no objections. But... 1) Implementing random(3) with RC4 is not needed, its algorithm is already equal or better. 2) Implementing rand(3) with RC4 can be possible only if seed (i.e. state) can be stored in single word (due to rand_r()) restrictions. -- 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