[kata-dev] /dev/urandom or /dev/random

Marco Vedovati mvedovati at suse.com
Tue Sep 25 10:12:56 UTC 2018


On Mon, 2018-09-24 at 22:20 +0000, Boeuf, Sebastien wrote:
> The long term solution seems to rely on /dev/urandom device as this
> one will not block if no entropy is ready yet. But from what we can
> read online, it seems that some people have some security concerns
> about it. I'd like to understand if those worries are valid or not,
> and if we should keep thinking about another way to fix this issue.


Hi, here's an extract of `man 7 random`:

 Choice of random source
       Unless  you  are  doing  long-term  key generation (and most likely not even then), you probably shouldn't be  
       reading from the /dev/random device or employing getrandom(2) with the  GRND_RANDOM  flag.   Instead,  either  
       read  from  the  /dev/urandom  device or employ getrandom(2) without the GRND_RANDOM flag.  The cryptographic  
       algorithms used for the urandom source are quite conservative, and so should be sufficient for all purposes.   
                    

In my view, given the ephemeral aspect of containers, /dev/urandom
should be fine most of the time. As an option, user should be left the
possibility to select /dev/random if that is needed for his specific
application. 

BTW, it may be worth investigating on what is the state of the art
solution chosen in virtualization systems with a high VM count.

Marco

> Thanks,
> Sebastien
> _______________________________________________
> kata-dev mailing list
> kata-dev at lists.katacontainers.io
> http://lists.katacontainers.io/cgi-bin/mailman/listinfo/kata-dev




More information about the kata-dev mailing list