

How robust is C#'s pseudo-random number generator?  - mydpy

Anyone have a reference for a robust analysis of C#&#x27;s uniform pseudo-random number generator? I am writing something that uses the Random class and want to make sure it satisfies marsaglia &#x2F; bruce schmeiser&#x27;s criteria for RNGs. I don&#x27;t even know if it uses mersenne twister, for example; I was hoping since C# is popular enough I might save some time using the legwork of others. If nothing is out there, I might put together an analysis myself.<p>Any help is appreciated. 
Thanks, 
Myles
======
stonemetal
The standard one in System.Random uses Donald E. Knuth's subtractive random
number generator algorithm according to the documentation. Which shouldn't be
too hard to find an anlysis on. [http://msdn.microsoft.com/en-
us/library/system.random(v=vs.1...](http://msdn.microsoft.com/en-
us/library/system.random\(v=vs.110\).aspx)

Then there is the Cryptographically secure one over in
System.Security.Cryptography.RandomNumberGenerator I believe it uses
CryptGenRandom under the hood, so I believe it has been analysed.

~~~
mydpy
Thank you so much, that's enough for me to sink my teeth into for now. I
appreciate the feedback.

