From owner-freebsd-arch@FreeBSD.ORG Sun Aug 18 16:53:36 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3E604A34; Sun, 18 Aug 2013 16:53:36 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E83EA2015; Sun, 18 Aug 2013 16:53:35 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id r7IGrVIT058031; Sun, 18 Aug 2013 16:53:31 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.123] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id f2u28njwyjhrebx8yrj5wqhaie; Sun, 18 Aug 2013 16:53:31 +0000 (UTC) (envelope-from tim@kientzle.com) Subject: Re: random(4) plugin infrastructure for mulitple RNG in a modular fashion Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=windows-1252 From: Tim Kientzle In-Reply-To: <86r4dr5j3p.fsf@nine.des.no> Date: Sun, 18 Aug 2013 09:53:29 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <4C1BD77C-8C6B-4044-9285-5978A3BC4B70@kientzle.com> References: <20130807183112.GA79319@dragon.NUXI.org> <86pptfnu33.fsf@nine.des.no> <20130815231713.GD76666@x96.org> <20130816002625.GE76666@x96.org> <9B274F48-0C88-4117-BEAC-1A555772A3C5@grondar.org> <86a9kf733d.fsf@nine.des.no> <0C97B866-A169-4141-8368-AA7F5B5382F4@grondar.org> <861u5r71zi.fsf@nine.des.no> <892B11BD-396D-4F82-B97C-753F72CA494D@grondar.org> <86r4dr5j3p.fsf@nine.des.no> To: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , Mark R V Murray X-Mailer: Apple Mail (2.1283) Cc: secteam@freebsd.org, FreeBSD-arch Arch X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Aug 2013 16:53:36 -0000 On Aug 18, 2013, at 4:33 AM, Dag-Erling Sm=F8rgrav wrote: > Mark R V Murray writes: >> OK - in the context of what is currently there, it makes less sense = than >> that; loading RDRAND/Ivy and Nehemiah simultaneously is silly =85 Lots of folks build static kernels that they run on diverse hardware. The hardware RNG modules should be loadable simultaneously and should probe and activate only if their hardware is present, like any other driver for real hardware. > Provided the HWRNG is of sufficient quality, the user should be = allowed > to use it directly (through /dev/random) without Yarrow / Fortuna. We could have kernel options to choose mixers (e.g., Yarrow or Fortuna) for /dev/random and loadable device modules for entropy sources. Besides Yarrow and Fortuna mixers, we could then offer a "null mixer" option that selected the single "best" entropy source and passed it directly through. Users could compile the null mixer into the kernel and load a single HW RNG driver to have precise control over /dev/random. Interrupt harvesting would be the lowest-quality source as a fall back. In particular, this has a reasonable failure mode if someone built a kernel with only a single HW entropy source and the null mixer: * On hardware with that source, they would get full-speed HW entropy. * On hardware without that source, they would get the old blocking /dev/random that we had before Yarrow, the one that used only interrupt harvesting. Tim