From owner-freebsd-questions@FreeBSD.ORG Tue Sep 23 13:22:26 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA5F0106567F for ; Tue, 23 Sep 2008 13:22:26 +0000 (UTC) (envelope-from fbsd06+2B=235abae4@mlists.homeunix.com) Received: from mxout-03.mxes.net (mxout-03.mxes.net [216.86.168.178]) by mx1.freebsd.org (Postfix) with ESMTP id 949FF8FC14 for ; Tue, 23 Sep 2008 13:22:26 +0000 (UTC) (envelope-from fbsd06+2B=235abae4@mlists.homeunix.com) Received: from gumby.homeunix.com. (unknown [87.81.140.128]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTP id 7613623E4BA for ; Tue, 23 Sep 2008 09:22:25 -0400 (EDT) Date: Tue, 23 Sep 2008 14:22:23 +0100 From: RW To: freebsd-questions@freebsd.org Message-ID: <20080923142223.0016c952@gumby.homeunix.com.> In-Reply-To: <20080923133935.2523d8de@gumby.homeunix.com.> References: <18648.30321.369520.631459@jerusalem.litteratus.org> <20080923133935.2523d8de@gumby.homeunix.com.> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: using /dev/random X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2008 13:22:26 -0000 On Tue, 23 Sep 2008 13:39:35 +0100 RW wrote: > On Tue, 23 Sep 2008 00:51:02 -0700 > "Ted Mittelstaedt" wrote: > > If you really want to roll-your-own and not use these functions > > then you could read blocks from /dev/random and run > > a Chi-square and Monte Carlo test on each > > block and discard the ones that don't pass. > > > > I've done my experimenting with the ENT program: > > > > http://www.fourmilab.ch/random/ > > I'm sceptical about this, if Rijndael in counter-mode produced output > that's distinguishable from random numbers over a few thousand bytes > it would surely never have made it into the AES competition, let > alone win it. I tried it myself (the windows binary runs under wine), it looks OK to me, they look like normal statistical fluctuations. You need to worry of they are consistently low or high, or if you *never* get extreme values. Discarding the blocks that don't "pass" would produce less random numbers, not better.