Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A hardware random number generator is an electronic device that plugs into a computer and produces genuine random numbers.

I would like to know:

  1. How to test hardware random number generators?

  2. What techniques, tools or tricks to solve the problem?

  3. Any practical difficulties, implementation complexities etc.?

  4. Are there any bounds on this problem?

share|improve this question
John D. Cook wrote a chapter "Testing a Random Number Generator". Have you read it? – dzieciou Mar 30 '14 at 9:52
hardware of random number generators? not software – user24700 Mar 30 '14 at 16:09
I am crafting a Meta post regarding this. – corsiKa Apr 2 '14 at 15:29

For actually testing an RNG look up the Diehard and Dieharder test libraries, the latter being more recent.

share|improve this answer

The test would have to be based on the requirement, since all random number generators are "pseudo-random". Here are some questions I would ask:

  • How random does it have to be? A children's game and a jury pool selection application would have different randomness requirements.

  • Once that is established, you would have to run a large enough statistical population to verify the randomness level. Does the pattern repeat every time it is started? Does it favor some starting patterns over others?

  • Knowledge of the application architecture is important. Some designs may have a fixed population of "random" patterns that it simply sequence through and just retains it's last stopping point. That may be intentional and perfectly suitable for some application. (It also simplifies the testing a lot!)

share|improve this answer
the link in dzieciou's comment has all this and more – Rsf Apr 1 '14 at 9:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.