HeadlinesBriefing favicon HeadlinesBriefing.com

Why /dev/urandom Isn't Insecure: A Crypto Engineer's Reality Check

Hacker News •
×

The myth that /dev/urandom is insecure—fueled by anecdotal Usenet claims—is a straw man. In reality, UNIX-like systems prioritize it for cryptographic needs because both /dev/urandom and /dev/random use the same CSPRNG. The confusion stems from /dev/random’s blocking behavior when entropy is low, but 256 bits of entropy (sufficient for long-term security) is rarely depleted.

No expert consensus, including cryptographers, endorses avoiding /dev/urandom: its constant re-seeding with system entropy doesn’t undermine its reliability. The core issue isn’t randomness type but computational security—algorithms like AES and RSA can’t guarantee security against unlimited adversaries, but /dev/urandom’s output is secure for those use cases. Cryptographers reject conflating “true randomness” (quantum effects) with cryptographic need; unpredictability, not philosophical purity, matters most in practice.