...
On Windows platforms, the CryptGenRandom()
function can be used to generate cryptographically strong random numbers. Note that the exact details of the implementation are unknown, including, for example, what source of entropy CryptGenRandom()
uses. From the Microsoft Developer Network CryptGenRandom()
reference [MSDN]:
If an application has access to a good random source, it can fill the
pbBuffer
buffer with some random data before callingCryptGenRandom()
. The CSP [cryptographic service provider] then uses this data to further randomize its internal seed. It is acceptable to omit the step of initializing thepbBuffer
buffer before callingCryptGenRandom()
.
...
Tool | Version | Checker | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
|
|
| |||||||
V. 5.0 |
|
| |||||||
Compass/ROSE |
|
|
| ||||||
| stlibuse | Fully implemented. | |||||||
PRQA QA-C |
| Warncall -wc rand | Fully implemented |
Related Vulnerabilities
...
MITRE CWE: CWE-330, "Use of insufficiently random values"
Sources
[MSDN] "CryptGenRandom Function"
...