Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hello

Is there a way to detect the quality of random generated numbers?

I have a machine called Hardware Security module that generates random numbers. I want to check to check if the generated numbers are subject to a specific pattern or are predictable in any way.

is there any algorithm that might help me in doing so?

Thank you.
Posted
Comments
Sandeep Mewara 26-Oct-10 10:45am    
Well, define quality. I guess, you can understand that quality is something which would be vary from person to person.
deadwood88 26-Oct-10 10:47am    
I want to see if the generated numbers are predictable in any way, or if they are subject to any pattern.

there are basically two measures of "good" when it comes to RNG's...

you can just do a histogram to 1 billion... and check the output over some interval.

you can look at what wikipedia[^] says

Or use: P. L'Ecuyer and R. Simard, TestU01: "A C Library for Empirical Testing of Random Number Generators", ACM Transactions on Mathematical Software, 33, 4, Article 22, August 2007.

Never used it myself.
 
Share this answer
 
Comments
deadwood88 28-Oct-10 3:26am    
thank you
See this if it has any useful information.
 
Share this answer
 
Comments
Nish Nishant 26-Oct-10 11:43am    
More links:

http://www-ece.rice.edu/~bs/rng/test.html

http://www.random.org/analysis/
deadwood88 28-Oct-10 3:25am    
thank you
Thank you everyone for your input

I have found an algorithm called Wald-Wolfowitz Test which is satisfactory for me.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900