...
To achieve the best random numbers possible, an implementation-specific function must be used. When unpredictability matters and speed is not an issue, such as in the creation of strong cryptographic keys, a true entropy source such as /dev/random
or a hardware device capable of generating random numbers should be used. Note that the /dev/random
device may can block for a long time if there are not enough events going on to generate sufficient entropy.
...
Wiki Markup |
---|
In the compliant solution, on Windows platforms, the [{{CryptGenRandom()}}|http://msdn2.microsoft.com/en-us/library/aa379942.aspx] function maycan be used to generate cryptographically strong random numbers. It is important to note that the exact details of the implementation are unknown, and it is unknown what source of entropy the {{CryptGenRandom()}} uses. The Microsoft Developer Network {{CryptGenRandom()}} reference \[[MSDN 2010|AA. Bibliography#MSDN 10]\] says, |
Wiki Markup If an application has access to a good random source, it can fill the {{pbBuffer}} buffer with some random data before calling {{CryptGenRandom()}}. The CSP \[cryptographic service provider\] then uses this data to further randomize its internal seed. It is acceptable to omit the step of initializing the {{pbBuffer}} buffer before calling {{CryptGenRandom()}}.
...