[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: random doesn't feel very random

From: Nix
Subject: Re: random doesn't feel very random
Date: Tue, 04 Sep 2012 20:19:13 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

On 1 Sep 2012, Paul Eggert told this:

> On 09/01/2012 12:19 AM, Achim Gratz wrote:
>> On systems having a better source of entropy (like
>> /dev/urandom), the init value should be taken from that source rather
>> than the "mix PID with current time" hack.
> This is on my list of things to do, as a gnulib project.
> Among other things, I plan to use the RDRAND instruction
> available on current Intel processors, as that's much
> faster and better than /dev/urandom.

... except if your /dev/urandom is seeded from some other hardware
source. This is fairly often true, as such sources are available very
cheaply nowadays. Since /dev/urandom is Linux-specific, and since the
Linux kernel already has patches upstream to use RDRAND to supply
randomness (but *not* entropy-estimate) to /dev/urandom, I'd recommend
using /dev/urandom unconditionally, certainly for rare seeding
operations like this where the cost of a kernel ring transition is

Let the OS do this stuff, it's what it's for.

NULL && (void)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]