From owner-svn-src-head@FreeBSD.ORG Tue Nov 4 23:38:13 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5203ACA2; Tue, 4 Nov 2014 23:38:13 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23AA321F; Tue, 4 Nov 2014 23:38:12 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Xlnfv-000FHo-8e; Tue, 04 Nov 2014 23:38:11 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id sA4NcA6t003147; Tue, 4 Nov 2014 16:38:10 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/WNdVOX/sSAp8qm92L4fyj X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: svn commit: r274103 - head/sys/dev/random From: Ian Lepore To: Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= In-Reply-To: <201411042302.sA4N2K4X063860@svn.freebsd.org> References: <201411042302.sA4N2K4X063860@svn.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" Date: Tue, 04 Nov 2014 16:38:09 -0700 Message-ID: <1415144289.1200.125.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by ilsoft.org id sA4NcA6t003147 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Nov 2014 23:38:13 -0000 On Tue, 2014-11-04 at 23:02 +0000, Dag-Erling Sm=F8rgrav wrote: > Author: des > Date: Tue Nov 4 23:02:19 2014 > New Revision: 274103 > URL: https://svnweb.freebsd.org/changeset/base/274103 >=20 > Log: > When reseeding the DPRNG, we're supposed to hash the current key and > some accumulated entropy twice and use that as the new key. Due to a > typo, we were using the output of the first hash round instead of the > second. Correct this, but eliminate temp[] since we can reuse hash[]. > Also add comments explaining what is going on and why. > =20 > Noticed by: Sami Farin > Reviewed by: markm@ > Approved by: so (des) >=20 > Modified: > head/sys/dev/random/fortuna.c >=20 > Modified: head/sys/dev/random/fortuna.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/random/fortuna.c Tue Nov 4 23:02:16 2014 (r274102) > +++ head/sys/dev/random/fortuna.c Tue Nov 4 23:02:19 2014 (r274103) > @@ -25,6 +25,17 @@ > * > */ > =20 > +/* This implementation of Fortuna is based on the descriptions found i= n > + * ISBN 0-471-22357-3 "Practical Cryptography" by Ferguson and Schneie= r > + * ("K&S"). I'm guessing s/b F&S. -- Ian