From owner-cvs-all@FreeBSD.ORG Sat Aug 23 09:57:07 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 77D8916A4C0 for ; Sat, 23 Aug 2003 09:57:07 -0700 (PDT) Received: from relay.pair.com (relay.pair.com [209.68.1.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 53ED243FE0 for ; Sat, 23 Aug 2003 09:57:05 -0700 (PDT) (envelope-from silby@silby.com) Received: (qmail 24910 invoked from network); 23 Aug 2003 16:57:04 -0000 Received: from niwun.pair.com (HELO localhost) (209.68.2.70) by relay.pair.com with SMTP; 23 Aug 2003 16:57:04 -0000 X-pair-Authenticated: 209.68.2.70 Date: Sat, 23 Aug 2003 11:55:58 -0500 (CDT) From: Mike Silbersack To: David Schultz In-Reply-To: <20030823091918.GA8236@HAL9000.homeunix.com> Message-ID: <20030823115345.N7877@odysseus.silby.com> References: <200308151911.h7FJBkOI003844@grimreaper.grondar.org> <20030823091918.GA8236@HAL9000.homeunix.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Poul-Henning Kamp cc: src-committers@FreeBSD.ORG cc: Mark Murray cc: cvs-src@FreeBSD.ORG cc: Sam Leffler cc: cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/libkern arc4random.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2003 16:57:07 -0000 On Sat, 23 Aug 2003, David Schultz wrote: > Another test suite, which seems to be highly regarded, is > Marsaglia's DIEHARD package. The sources themselves are probably > on the web somewhere, and there's some sample output from the last > time the subject of randomness came up on the lists at > http://www.csua.berkeley.edu/~das/marsaglia/ . > I can run it again if there's interest. Can you turn it into a port? :) > I'm not a cryptographer, but FWIW, I'm told that there are > statistical tests that can differentiate an ARC4 sequence from a > truly random sequence. However, it takes something like 2^31 bits > of data to detect the statistical bias. According to the paper referenced in the comment, the pattern is *especially* apparent in the first 256 words of output, which is why they should be thrown out. (From my original reading of the paper, I was unable to determine if by his terminology he meant the first 256 bytes, words, dwords, quadwords, or what. So I throw away the first 256 dwords, just to be safe.) Mike "Silby" Silbersack