<p>The problem is not about randomness itself (we have rand), but in cryptographically secure PRNG. What can be used on Linux, or ideally POSIX? Does NSS have something useful?</p>

<p><strong>Clarification</strong>: I know about /dev/random, but it may run out of entropy pool. And I'm not sure whether /dev/urandom is guaranteed to be cryptographically secure.</p>

The
```
/dev/random
```
device is intended to be a source of cryptographically secure bits.