From owner-cvs-src@FreeBSD.ORG Fri Aug 15 13:06:43 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E0A3237B401; Fri, 15 Aug 2003 13:06:43 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id C56F743FBD; Fri, 15 Aug 2003 13:06:42 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.9/8.12.9) with ESMTP id h7FK6YlX012623; Fri, 15 Aug 2003 22:06:34 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: Mark Murray From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 15 Aug 2003 20:59:10 +0700." <200308151959.h7FJxBOI004295@grimreaper.grondar.org> Date: Fri, 15 Aug 2003 22:06:34 +0200 Message-ID: <12622.1060977994@critter.freebsd.dk> cc: Sam Leffler cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: cvs-src@FreeBSD.org Subject: Re: cvs commit: src/sys/libkern arc4random.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2003 20:06:44 -0000 In message <200308151959.h7FJxBOI004295@grimreaper.grondar.org>, Mark Murray wr ites: >Sam Leffler writes: >> > For the paranoids, this is cheap (almost free), and is solid from a >> > arcfour-neurotic perspective. >> >> I am not arguing for Mike to remove his change. I am noting that making >> changes to critical system components w/o review and/or testing is >> dangerous. Going forward we should have some tools for validating changes >> like this. If the output of arc4random is available through a sysctl or >> similar then it could be a tool that sits in /usr/src/tools/tools. >> Otherwise it would be good to create a test module or similar to shunt >> arc4random data through rndtest. > >Tools can't test what we need tested here. Tools can test for varying >degrees od statistical randomness, but _cryptographic_ randomness >(which equates to "unpredictable by an observer") is harder. The >best we can really do is attack it using cryptographic methodology, >which at its lowest level is code review. While that is true, it has also been shown that the errors most likely to be missed by code reviews often make themselves obvious in the distorted functioning of the code (ie: extra ';' after "if" and similar). So having a randomness regression test sounds like a good complement to reviews to me. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.