Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4818755ybe; Mon, 9 Sep 2019 15:21:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqwkdakCkIke//3fKV+m0vAbORuokMABUSvnAmdtMAlmyr2a57Ql7SmmOuAhNFINv0eLPRhZ X-Received: by 2002:a17:906:2ac3:: with SMTP id m3mr21904082eje.212.1568067662225; Mon, 09 Sep 2019 15:21:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568067662; cv=none; d=google.com; s=arc-20160816; b=dbY1QYlnDXBP7ownxyw3GHL7V2LASpEjWK/hLqkQD/NxlRctXLYucJIWSwhvaV4ID1 520DpjE0uFP4kEE44PgymvLl/aF5C8xKA6CFV3vnPWBeT/K44+jRZEk56rMqkRnyZ8jm bnq/d+3oHx8lxMeFtMlbs6hwSdj7133gnJshTjT2i61g5icvsZ2WOD61rGqBVDX4U2Ga 1CQf7/7yb2pmULP+imqOzUVs1dVieiIJd0lyM0WZBxZRhp2dKhNnY8PJRRYSIdzNyNDW p5vRbOG+04MZWZS+syhy34xvbhrHiDmEwtUle7DnVKJlK4uecazJKWGCHP7LIDPWK+rd GGjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=em5B7I2bF1ruSn7TB7ohvUm87GaW48L4Kn/o3nobh6I=; b=L8GTfYJBrPiP2qG1M/z/r3resP0uRRDDD8FPciIYvri3QvOq/SCHjx8s9e0Mwfvmra pPGp2wK0ZwuKEUlbhhxmsmUhEJzVcmCkv8AhFF/m6HOYgV7QgN6k3tZlga0GECqPYk6t AeURvehdnvVJ2UUi08BdMc6+JY6CD/2avxu5eD23rGDFH7q58HmfJ/3IllnicAfrrcdb BPRdSgN20z7ROEamAytu1WP1NvmLYOXiF1s9b/UwkT4Y4kEWhc4lRCZcaspXOzbnvAeb Hmo18XKxj8NUA8BoYXrhHPcT0KGO+e9wx8sFejMizvTaRu4P2hd8I3hkXSaHwDpCbHsh m9mw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v57si10368354edc.171.2019.09.09.15.20.38; Mon, 09 Sep 2019 15:21:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388647AbfIIJme (ORCPT + 99 others); Mon, 9 Sep 2019 05:42:34 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:33266 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725818AbfIIJme (ORCPT ); Mon, 9 Sep 2019 05:42:34 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 3BD0D807DB; Mon, 9 Sep 2019 11:42:18 +0200 (CEST) Date: Mon, 9 Sep 2019 11:42:31 +0200 From: Pavel Machek To: Andy Lutomirski Cc: Theodore Tso , LKML , Linux API , Kees Cook , "Jason A. Donenfeld" Subject: Re: [PATCH 0/7] Rework random blocking Message-ID: <20190909094230.GB27626@amd> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SkvwRMAIpAhPCcCJ" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --SkvwRMAIpAhPCcCJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu 2019-08-29 18:11:35, Andy Lutomirski wrote: > This makes two major semantic changes to Linux's random APIs: >=20 > It adds getentropy(..., GRND_INSECURE). This causes getentropy to > always return *something*. There is no guarantee whatsoever that > the result will be cryptographically random or even unique, but the > kernel will give the best quality random output it can. The name is > a big hint: the resulting output is INSECURE. >=20 > The purpose of this is to allow programs that genuinely want > best-effort entropy to get it without resorting to /dev/urandom. > Plenty of programs do this because they need to do *something* > during boot and they can't afford to wait. Calling it "INSECURE" is > probably the best we can do to discourage using this API for things > that need security. >=20 > This series also removes the blocking pool and makes /dev/random > work just like getentropy(..., 0) and makes GRND_RANDOM a no-op. I > believe that Linux's blocking pool has outlived its usefulness. > Linux's CRNG generates output that is good enough to use even for > key generation. The blocking pool is not stronger in any material > way, and keeping it around requires a lot of infrastructure of > dubious value. Could you give some more justification? If crng is good enough for you, you can use /dev/urandom... are=20 > This series should not break any existing programs. /dev/urandom is > unchanged. /dev/random will still block just after booting, but it > will block less than it used to. getentropy() with existing flags > will return output that is, for practical purposes, just as strong > as before. So what is the exact semantic of /dev/random after your change? Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --SkvwRMAIpAhPCcCJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl12HoYACgkQMOfwapXb+vKGdACfbyQrNBFgA8TPw3BNsZDnNW9L jwIAniwUsIa4ppyFvofYamZuYigUnLNJ =1fQs -----END PGP SIGNATURE----- --SkvwRMAIpAhPCcCJ--