Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jul 2015 18:14:59 -0700
From:      Tim Kientzle <tim@kientzle.com>
To:        Yuri <yuri@rawbw.com>
Cc:        Freebsd hackers list <freebsd-hackers@freebsd.org>
Subject:   Re: Does /dev/random in virtual guests provide good random data?
Message-ID:  <CCCC361E-70E1-4BA4-9765-65653F40DBC7@kientzle.com>
In-Reply-To: <55A2FB68.3070006@rawbw.com>
References:  <55A2FB68.3070006@rawbw.com>

index | next in thread | previous in thread | raw e-mail


> On Jul 12, 2015, at 4:42 PM, Yuri <yuri@rawbw.com> wrote:
> 
> 'cat /dev/random' in Linux VM (tried Ubuntu and Arch) is extremely slow, supposedly because VM runs out of entropy. This cat sometimes stops for minutes, and usually produces very few bytes per minute. Randomly clicking on the window helps speed it up a bit.
> 
> Same in FreeBSD VM produces steady ~28MB/s stream.
> 
> Does FreeBSD VM do something special for entropy, or the resulting stream actually lacks entropy, or maybe Linux does something wrong?

Here’s a good discussion of the difference between /dev/random and /dev/urandom on Linux:

   http://www.2uo.de/myths-about-urandom/

In particular, it has this interesting comment:

     FreeBSD does the right thing: they don't have the distinction
     between /dev/random and /dev/urandom, both are the same
     device. At startup /dev/random blocks once until enough starting
     entropy has been gathered. Then it won't block ever again.



help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CCCC361E-70E1-4BA4-9765-65653F40DBC7>