Random number generator security: BCryptGenRandom vs RNGCryptoServiceProvider
问题 For those in a hurry, this is NOT related to the controversial Dual_EC_DRBG planted inside NIST's SP800-90A. About the two RNGs: The Microsoft BCRYPT layer based one is over their C API. BCryptGenRandom is following NIST SP800-90A's CTR_DRBG (i.e. uses an approved block cipher, AES, to create random bits). However it is unclear if it uses a hardware random source as seed (or part of the seed)... The Microsoft .NET RNGCryptoServiceProvider is C# based. Looking at the .NET source code (or here)