Hacker News new | past | comments | ask | show | jobs | submit login

Here's the blog post that always gets linked when this comes up: http://sockpuppet.org/blog/2014/02/25/safely-generate-random...



Thanks, I never read it before.

Anyhow, its conclusions seem to be mistaken to me:

> It’s also a bug in the Linux kernel. But it’s also easily fixed in userland: at boot, seed urandom explicitly. Most Linux distributions have done this for a long time.

If you're an application developer (of something that runs very early in the boot process) but you're not making your own distro, and you can't trust your distro (I guess that since a lot of factorable keys existed, "Most Linux distributions have done this" might not actually hold true or count to a good enough percentage) you don't really have anything else that you can rely on to seed /dev/urandom explicitly

I'd think that the correct approach is to use urandom on everything but linux (after all, as long as your application isn't a blocker for the boot of the system, it doesn't seem terrible to wait for /dev/random)

Also, reading and blocking from /dev/random seems akin to failing early and explicitly (in the case where blocking on read is actually a problem), while reading urandom when not initialized seem to be a silent failure.

But I'm not going to write software that has to read from either device anytime soon, so don't panic if I'm mistaken :)


Seed it from /dev/random.


Has anyone attempted to get any of these man pages (on any of the OSs) updated? I can't find any threads offhand of someone proposing a patch and having it rejected, but I haven't searched too diligently either.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: