From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ar6GL-0002OL-4d for qemu-devel@nongnu.org; Fri, 15 Apr 2016 12:06:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ar6GH-0002bx-SV for qemu-devel@nongnu.org; Fri, 15 Apr 2016 12:06:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41548) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ar6GH-0002bj-L0 for qemu-devel@nongnu.org; Fri, 15 Apr 2016 12:06:25 -0400 From: Hubert Kario Date: Fri, 15 Apr 2016 18:06:17 +0200 Message-ID: <2294246.DE6KzyfQFF@pintsize.usersys.redhat.com> In-Reply-To: References: <5710C55E.3030000@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart39484052.Tnk0Tpreer"; micalg="pgp-sha512"; protocol="application/pgp-signature" Subject: Re: [Qemu-devel] RFC: virtio-rng and /dev/urandom List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "H. Peter Anvin" Cc: Cole Robinson , libvirt-list@redhat.com, qemu-devel , "Richard W.M. Jones" , "Daniel P. Berrange" , Peter Krempa , Amit Shah , mik@miknet.net, jjaburek@redhat.com, sgrubb@redhat.com, Paolo Bonzini , Eric Blake --nextPart39484052.Tnk0Tpreer Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" On Friday 15 April 2016 08:56:59 H. Peter Anvin wrote: > On April 15, 2016 3:41:34 AM PDT, Cole Robinson = =20 wrote: > >Libvirt currently rejects using host /dev/urandom as an input source= > >for a > >virtio-rng device. The only accepted sources are /dev/random and > >/dev/hwrng. > >This is the result of discussions on qemu-devel around when the > >feature was > >first added (2013). Examples: > > > >http://lists.gnu.org/archive/html/qemu-devel/2012-09/msg02387.html > >https://lists.gnu.org/archive/html/qemu-devel/2013-03/threads.html#0= 0 > >023 > > > >libvirt's rejection of /dev/urandom has generated some complaints > >from users: > > > >https://bugzilla.redhat.com/show_bug.cgi?id=3D1074464 > >* cited: http://www.2uo.de/myths-about-urandom/ > >http://www.redhat.com/archives/libvir-list/2016-March/msg01062.html > >http://www.redhat.com/archives/libvir-list/2016-April/msg00186.html > > > >I think it's worth having another discussion about this, at least > >with a > >recent argument in one place so we can put it to bed. I'm CCing a > >bunch of > >people. I think the questions are: > > > >1) is the original recommendation to never use > >virtio-rng+/dev/urandom correct? > > > >2) regardless of #1, should we continue to reject that config in > >libvirt? > > > >Thanks, > >Cole >=20 > Using /dev/urandom for virtio-rng, *except* perhaps for a small seed,= > it a complete waste of cycles. There is absolutely no reason to have= > one prng feed another. /dev/random is a prng too, both /dev/random and /dev/urandom use exact=20= same algorithm and yes, there are multiple reason for feeding one prng with another,=20= all cryptographic protocols do that all the time (e.g. TLS Pseudo-Rando= m=20 Function output is fed as key to AES-GCM, both PRF and AES-GCM are=20 essentially PRNGs) =2D-=20 Regards, Hubert Kario Senior Quality Engineer, QE BaseOS Security team Web: www.cz.redhat.com Red Hat Czech s.r.o., Purky=C5=88ova 99/71, 612 45, Brno, Czech Republi= c --nextPart39484052.Tnk0Tpreer Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCgAGBQJXERF5AAoJEJKo0bgB0vX1deAQAI5Z6wjnRxqcTWAyJH3zmJaM yGKd46CAr7QM9uOutikS1SUXzlZtXEE3shJG57MdkanHZiV1t4OPlpuynKd4EMMV 1nnLbi1tiIFXWnw+NGceRu6VYPCrjTMXxEhMUFer84hue3IbSUI3d5WSObgQzvJV +Yr+M8RQDaVcRYqVI4SMA4AQvrFlrK90NXj1lg0upg31FRYWJxxdk4RIQWrrIPST z/z6kWt0Gz3GOlezolZJvjmfr4jk8QUyBXmEvsIPZzik+SelokpAPKVL+ncaIpjZ ZIy8a3U0v0JeIDrgf/8trTgBWuNoi3A1muVcC1XTgNVchdXBrVV0Kl2/AKkzgm8X lmjCsX4MzhGQdHN+EXWv2WMHxnlnc4lxY4lzFId9JvLKDthtj/5bmTpL5hcIy1T7 QuCIASbT1ZI87piVnRgawr2Ncc+zhXEcOSDTV/My8fpM8DOUkJisNCFinHtUEmZ3 uiPQGjxVKEJTiCNJlruzqeguC3AdFm+DRaZJk4b1LO0nVG07BBLhBNF1wl/KGymC Pl5tNWU+o1e+J8dDqCYxiPaSzQUVkhbpJHnVZZ4SnbB6CosUwDkvco0PicgjKTkf P3MeYjA4KIAhqM9YfV3jpsWyEwFmXCmy05n4tvVZrBySuS2fcQl1J1hgvF7CbA8y g5qvlSl0rjOL8FZ8lgVc =xgHL -----END PGP SIGNATURE----- --nextPart39484052.Tnk0Tpreer--