I want to make use of Intel's RDRAND feature on Windows and generate true random numbers (since Python's random module isn't so random). Is there any API in Python which can access this feature?
I've tried installing the rdrand module mentioned in the comment below, but I keep getting an error. Log: http://pastebin.com/A2Vqsqec
The error seems to be thrown by these lines in rdrand.c:
#ifdef __GNUC__
#define USING_GCC 1
#elif __clang__
#define USING_CLANG 1
#else
#error Only support for gcc or clang currently
#error if you port to another compiler, please
#error send back the patch to https://github.com/stillson/rdrand
#endif
Why is this happening?
UPDATE: I've checked and made sure that __GNUC__ is defined
You don't necessarily need RDRAND for quality randomness. The documentation for the random module states:
The documentation for
os.urandom(n)
says:SystemRandom
is based onurandom
.