I use the following code to test the C++
library.
Why do I get the exact same sequence for every run of the compiled executable? Is
GCC does not implement rd.entropy() correctly - it always returns 0 (at least on Mac OS X).
Unfortunately, there seems to be no way to mix additional entropy into random_device, which matters because it usually/often (look at Linux /dev/random and /dev/urandom, and at the Intel RDRAND implementation) implements a pseudo-random number generator under the hood. I'd like to be able to improve its output by injecting something I consider random to mix with whatever its entropy source produces. Again, since this device (or kernel module) internally implements a cryptographic algorithm for processing the entropy bits it obtains to generate its output, I'd like to be able to "randomize" that process more by injecting my own data to mix with whatever entropy that device picks. For example, consider Java SecureRandom(). It does not allow you to set the seed (which indeed would convert it to PRNG), but it would happily mix what you provide with whatever it is using to "randomize" its output even more.
I personally prefer RDRAND. A small assembly library with a compact C interface. Here are the references:
David Johnson from Intel explains RDRAND on Stackoverflow
Stackoverflow pointers to RDRAND library source for Windows, Linux, and Mac OS X
Intel blog on RDRAND library, and a download link