&gt; use &#x2F;dev&#x2F;urandom and nothing else<p>Or the getrandom() syscall, once it has trickled into all mainstream distributions&#x27; libcs. Which is basically &#x2F;dev&#x2F;random, but without the need to open() and close() the device first and after you&#x27;ve consumed your entropy.<p><a href="http:&#x2F;&#x2F;man7.org&#x2F;linux&#x2F;man-pages&#x2F;man2&#x2F;getrandom.2.html" rel="nofollow">http:&#x2F;&#x2F;man7.org&#x2F;linux&#x2F;man-pages&#x2F;man2&#x2F;getrandom.2.html</a>