Received: from eggs.gnu.org ([2001:4830:134:3::10]:38751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arESc-0004T4-7m for qemu-devel@nongnu.org; Fri, 15 Apr 2016 20:51:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1arESY-0007vh-SJ for qemu-devel@nongnu.org; Fri, 15 Apr 2016 20:51:42 -0400 Received: from terminus.zytor.com ([2001:1868:205::10]:54406 helo=mail.zytor.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arESY-0007vG-Mf for qemu-devel@nongnu.org; Fri, 15 Apr 2016 20:51:38 -0400 In-Reply-To: <1627731.Y10g9rcVyf@pintsize.usersys.redhat.com> References: <5710C55E.3030000@redhat.com> <57110D27.6080805@redhat.com> <1627731.Y10g9rcVyf@pintsize.usersys.redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 From: "H. Peter Anvin" Date: Fri, 15 Apr 2016 17:51:36 -0700 Message-ID: Subject: Re: [Qemu-devel] RFC: virtio-rng and /dev/urandom List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hubert Kario , Eric Blake 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 On April 15, 2016 9:10:44 AM PDT, Hubert Kario wrote: >On Friday 15 April 2016 09:47:51 Eric Blake wrote: >> On 04/15/2016 04:41 AM, Cole Robinson 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 >> > 0023 >> > >> > libvirt's rejection of /dev/urandom has generated some complaints >> > from users: >> > >> > https://bugzilla.redhat.com/show_bug.cgi?id=1074464 >> > * 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? >> That I'm not sure about - and the answer may be context-dependent >(for >> example a FIPS user may care more than an ordinary user) > >/dev/urandom use is FIPS compliant, no FIPS-validated protocol or >cryptographic primitive requires the "fresh" entropy provided by >/dev/random. All primitives are designed to work with weaker entropy >guarantees than what /dev/urandom provides. So: using urandom for a seed makes sense, but "unplugging the drain" is a huge waste of resources and provides absolutely zero value. Also, I do not believe /dev/urandom is FIPS compliant. Finally, the refill policy is different, so it is not really true the algorithm is the same. All in all, other than a seed value it really doesn't make any sense. Of course, none of this matters on newer Intel hardware ;) -- Sent from my Android device with K-9 Mail. Please excuse brevity and formatting.