From owner-freebsd-arch@FreeBSD.ORG Mon Aug 19 07:09:28 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 BF0EBC05 for ; Mon, 19 Aug 2013 07:09:28 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ob0-f177.google.com (mail-ob0-f177.google.com [209.85.214.177]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 828062730 for ; Mon, 19 Aug 2013 07:09:28 +0000 (UTC) Received: by mail-ob0-f177.google.com with SMTP id f8so4767234obp.36 for ; Mon, 19 Aug 2013 00:09:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=KS/6ttd1DyQJlMTNh4s6nDU56omRkjW1FzRg34L+x5E=; b=D8h72WmaibT+sp6eGejpaGKvJHgLJcqV8gEH9kyVCTTUu5jHgUKdYF13bCzLymQrwL 7GEGCrqnvEz66FrkxD3aCfY+mwZ4ndtBNx2Pf+NaZAGFfQ1iZ9trwxFmJ2EaZ+Apxh/y 5n4KKDV9Gnf+V8Fc0JQcrcMETxtnL2YJaoGnTXEENet+dF/SDjsqmbqGGTHl1mysElQ/ 7Jiilp/gV0kKBACVaCGrjBLYCDiKjhn8nqfkc77z0mb2UcII3ZhFYI2jMTUzXmqCNi4J ewLN3WwK6v6loIDMK7eUoUXlgOycS0ZDMRynRB5EHJO24aUDqt2Bmm2iwpUekdmecpUP ayiQ== X-Gm-Message-State: ALoCoQm3x0qPQaOZ1d9hjeFs1KBbFLxPG3KRlwUJeGeJev4kfMuwPehUWm8uABAkaoJ2frim9OzH X-Received: by 10.182.101.198 with SMTP id fi6mr232533obb.79.1376896167410; Mon, 19 Aug 2013 00:09:27 -0700 (PDT) Received: from 53.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id ps5sm14922567oeb.8.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 19 Aug 2013 00:09:26 -0700 (PDT) Sender: Warner Losh Subject: Re: random(4) plugin infrastructure for mulitple RNG in a modular fashion Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=windows-1252 From: Warner Losh In-Reply-To: <4C1BD77C-8C6B-4044-9285-5978A3BC4B70@kientzle.com> Date: Mon, 19 Aug 2013 01:09:24 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <12B58C72-CFE3-4AD4-AD03-462A10E431D9@bsdimp.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> <4C1BD77C-8C6B-4044-9285-5978A3BC4B70@kientzle.com> To: Tim Kientzle X-Mailer: Apple Mail (2.1085) Cc: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , secteam@freebsd.org, Mark R V Murray , 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: Mon, 19 Aug 2013 07:09:28 -0000 On Aug 18, 2013, at 10:53 AM, Tim Kientzle wrote: > On Aug 18, 2013, at 4:33 AM, Dag-Erling Sm=F8rgrav wrote: >=20 >> 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 >=20 > Lots of folks build static kernels that they run on diverse > hardware. >=20 > 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. Agreed, I made that point earlier in this thread... >> Provided the HWRNG is of sufficient quality, the user should be = allowed >> to use it directly (through /dev/random) without Yarrow / Fortuna. >=20 > We could have kernel options to choose mixers > (e.g., Yarrow or Fortuna) for /dev/random and > loadable device modules for entropy sources. >=20 > 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. I'm still wondering why timecounters aren't the right model to follow = here, where you can have several compiled into the kernel and the one = with the best score wins. > 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. >=20 > 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. Assuming there was enough interrupt entropy to generate bits... Warner