Re: [libvirt] [PATCH 08/10] virrandom: Make virRandomBits better

2018-06-01 Thread Daniel P . Berrangé
On Fri, Jun 01, 2018 at 02:10:56PM +0200, Martin Kletzander wrote: > On Fri, Jun 01, 2018 at 11:25:35AM +0100, Daniel P. Berrangé wrote: > > On Wed, May 30, 2018 at 03:43:31PM +0200, Martin Kletzander wrote: > > > On Wed, May 30, 2018 at 02:16:08PM +0200, Michal Privoznik wrote: > > > > On 05/29/20

Re: [libvirt] [PATCH 08/10] virrandom: Make virRandomBits better

2018-06-01 Thread Martin Kletzander
On Fri, Jun 01, 2018 at 11:25:35AM +0100, Daniel P. Berrangé wrote: On Wed, May 30, 2018 at 03:43:31PM +0200, Martin Kletzander wrote: On Wed, May 30, 2018 at 02:16:08PM +0200, Michal Privoznik wrote: > On 05/29/2018 03:44 PM, Martin Kletzander wrote: > > On Tue, May 29, 2018 at 10:24:44AM +0200

Re: [libvirt] [PATCH 08/10] virrandom: Make virRandomBits better

2018-06-01 Thread Daniel P . Berrangé
On Wed, May 30, 2018 at 03:43:31PM +0200, Martin Kletzander wrote: > On Wed, May 30, 2018 at 02:16:08PM +0200, Michal Privoznik wrote: > > On 05/29/2018 03:44 PM, Martin Kletzander wrote: > > > On Tue, May 29, 2018 at 10:24:44AM +0200, Michal Privoznik wrote: > > > > Now that we have strong PRNG ge

Re: [libvirt] [PATCH 08/10] virrandom: Make virRandomBits better

2018-05-30 Thread Martin Kletzander
On Wed, May 30, 2018 at 02:16:08PM +0200, Michal Privoznik wrote: On 05/29/2018 03:44 PM, Martin Kletzander wrote: On Tue, May 29, 2018 at 10:24:44AM +0200, Michal Privoznik wrote: Now that we have strong PRNG generator implemented in virRandomBytes() let's use that instead of gnulib's random_r

Re: [libvirt] [PATCH 08/10] virrandom: Make virRandomBits better

2018-05-30 Thread Michal Privoznik
On 05/29/2018 03:44 PM, Martin Kletzander wrote: > On Tue, May 29, 2018 at 10:24:44AM +0200, Michal Privoznik wrote: >> Now that we have strong PRNG generator implemented in >> virRandomBytes() let's use that instead of gnulib's random_r. >> >> Problem with the latter is in way we seed it: current

Re: [libvirt] [PATCH 08/10] virrandom: Make virRandomBits better

2018-05-30 Thread Michal Privoznik
On 05/29/2018 10:32 PM, Eric Blake wrote: > On 05/29/2018 03:24 AM, Michal Privoznik wrote: >> Now that we have strong PRNG generator implemented in >> virRandomBytes() let's use that instead of gnulib's random_r. >> >> Problem with the latter is in way we seed it: current UNIX time >> and libvirtd

Re: [libvirt] [PATCH 08/10] virrandom: Make virRandomBits better

2018-05-29 Thread Eric Blake
On 05/29/2018 03:24 AM, Michal Privoznik wrote: Now that we have strong PRNG generator implemented in virRandomBytes() let's use that instead of gnulib's random_r. Problem with the latter is in way we seed it: current UNIX time and libvirtd's PID are not that random as one might think. Imagine t

Re: [libvirt] [PATCH 08/10] virrandom: Make virRandomBits better

2018-05-29 Thread Martin Kletzander
On Tue, May 29, 2018 at 10:24:44AM +0200, Michal Privoznik wrote: Now that we have strong PRNG generator implemented in virRandomBytes() let's use that instead of gnulib's random_r. Problem with the latter is in way we seed it: current UNIX time and libvirtd's PID are not that random as one migh

[libvirt] [PATCH 08/10] virrandom: Make virRandomBits better

2018-05-29 Thread Michal Privoznik
Now that we have strong PRNG generator implemented in virRandomBytes() let's use that instead of gnulib's random_r. Problem with the latter is in way we seed it: current UNIX time and libvirtd's PID are not that random as one might think. Imagine two hosts booting at the same time. There's a fair