From: Hubert Kario <hkario@redhat.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Eric Blake <eblake@redhat.com>,
Cole Robinson <crobinso@redhat.com>,
libvirt-list@redhat.com, qemu-devel <qemu-devel@nongnu.org>,
"Richard W.M. Jones" <rjones@redhat.com>,
"Daniel P. Berrange" <berrange@redhat.com>,
Peter Krempa <pkrempa@redhat.com>,
Amit Shah <amit.shah@redhat.com>,
mik@miknet.net, jjaburek@redhat.com, sgrubb@redhat.com,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] RFC: virtio-rng and /dev/urandom
Date: Mon, 18 Apr 2016 13:00:22 +0200 [thread overview]
Message-ID: <2205200.8eQElsYyJ7@pintsize.usersys.redhat.com> (raw)
In-Reply-To: <FDF7A12D-B152-4641-B146-4AE83EF094D0@zytor.com>
[-- Attachment #1: Type: text/plain, Size: 3565 bytes --]
On Friday 15 April 2016 17:51:36 H. Peter Anvin wrote:
> On April 15, 2016 9:10:44 AM PDT, Hubert Kario <hkario@redhat.com>
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.htm
> >> > l
> >
> >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.ht
> >> > ml
> >> > http://www.redhat.com/archives/libvir-list/2016-April/msg00186.ht
> >> > ml
> >> >
> >> > 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.
Since when "wasting resources" is worse than performing Denial of
Service on your own infrastructure?
Besides, what's the difference between spinning a CSPRNG in host rather
that guest? If anything, spinning CSPRNG in host is less of a waste as
the virtualisation overhead (however small) isn't there. If you need X
number of random bytes, you need to provide X number of random bytes.
The software simply won't work otherwise.
> 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.
We did discuss it with NIST, have you?
The refill policy doesn't matter, after the pool is seeded, it will
continue generating unpredictable random numbers for years (if not
decades or centuries) without any additional entropy. And you certainly
will gather enough entropy to reseed /dev/urandom multiple times an
hour, even if the host does not do anything but generate random numbers.
> 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 ;)
Not everybody is running on newer Intel, not everybody is even running
on x86_64 architecture. Not everybody trusts the RNG in Intel hardware
(e.g. rdrand is a not-Approved algorithm for FIPS certified software).
--
Regards,
Hubert Kario
Senior Quality Engineer, QE BaseOS Security team
Web: www.cz.redhat.com
Red Hat Czech s.r.o., Purkyňova 99/71, 612 45, Brno, Czech Republic
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-04-18 11:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-15 10:41 [Qemu-devel] RFC: virtio-rng and /dev/urandom Cole Robinson
2016-04-15 11:46 ` Richard W.M. Jones
2016-04-15 11:54 ` [Qemu-devel] [libvirt] " Richard W.M. Jones
2016-04-20 22:48 ` [Qemu-devel] " Steve Grubb
2016-04-15 15:47 ` Eric Blake
2016-04-15 16:10 ` Hubert Kario
2016-04-16 0:46 ` H. Peter Anvin
2016-04-16 0:51 ` H. Peter Anvin
2016-04-16 8:31 ` Paolo Bonzini
2016-04-18 0:20 ` H. Peter Anvin
2016-04-18 0:27 ` H. Peter Anvin
2016-04-18 11:21 ` Hubert Kario
2016-04-18 11:00 ` Hubert Kario [this message]
2016-04-19 11:30 ` [Qemu-devel] [libvirt] " Yaniv Kaul
2016-04-15 15:56 ` [Qemu-devel] " H. Peter Anvin
2016-04-15 16:06 ` Hubert Kario
2016-04-18 9:28 ` Daniel P. Berrange
2016-04-18 9:46 ` H. Peter Anvin
2016-04-18 11:07 ` Hubert Kario
2016-04-18 11:26 ` Daniel P. Berrange
2016-04-18 21:45 ` H. Peter Anvin
2016-04-20 22:21 ` Cole Robinson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2205200.8eQElsYyJ7@pintsize.usersys.redhat.com \
--to=hkario@redhat.com \
--cc=amit.shah@redhat.com \
--cc=berrange@redhat.com \
--cc=crobinso@redhat.com \
--cc=eblake@redhat.com \
--cc=hpa@zytor.com \
--cc=jjaburek@redhat.com \
--cc=libvirt-list@redhat.com \
--cc=mik@miknet.net \
--cc=pbonzini@redhat.com \
--cc=pkrempa@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.com \
--cc=sgrubb@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).