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?


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


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!)

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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