From owner-freebsd-current Sun Feb 2 12:39:15 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 655D037B401; Sun, 2 Feb 2003 12:39:14 -0800 (PST) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 91A0043F75; Sun, 2 Feb 2003 12:39:12 -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 h12Kd5d6067481; Sun, 2 Feb 2003 23:39:05 +0300 (MSK) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.6/8.12.6/Submit) id h12Kd4sY067480; Sun, 2 Feb 2003 23:39:04 +0300 (MSK) (envelope-from ache) Date: Sun, 2 Feb 2003 23:39:04 +0300 From: "Andrey A. Chernov" To: David Malone Cc: Mark Murray , Bakul Shah , "Jeroen C. van Gelderen" , phk@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: rand() is broken Message-ID: <20030202203904.GA67454@nagual.pp.ru> References: <200302021943.h12JhEaX050421@grimreaper.grondar.org> <200302022005.aa62194@salmon.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200302022005.aa62194@salmon.maths.tcd.ie> 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 20:05:29 +0000, David Malone wrote: > > > I presume it also produces reasonably uniform output for most > > > seeds too. > > > Yes. Modulo the requirement to "burn" a bit of output after a > > reseed. > > I guess the crypto guys would have junked it otherwise ;-) Notice that it will happens _each_ time for rand() due to rand_r() requirement 1) to output the same sequence as rand() and to 2) to store one word seed value each time. I.e. it will be reseed on each call. -- 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