Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

/dev/urandom is useless because it spews non-random data if it hasn't been seeded yet.

Does it? Under what circumstances? Where can I read about it?



`man 4 random` states,

> When read during early boot time, /dev/urandom may return data prior to the entropy pool being initialized. If this is of concern in your application, use getrandom(2) or /dev/random instead.


it happened in my system in last boot, dmesg says dbus-daemon tried (twice!) to read urandom before its seeded, and the next message (same second, about 200ms) is about urandom has been seeded, it is a race condition!




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

Search: