How to test a random generator

前端 未结 12 1170
滥情空心
滥情空心 2020-12-24 01:42

I need to test a random number generator which produces numbers randomly. How to make sure the numbers generated are random.

12条回答
  •  半阙折子戏
    2020-12-24 02:03

    You can only test statistical randomness anyway, and that does not prove whether the number sequence is cryptographically strong. Statistically testing a PRNG requires quite a lot (10 or even 100Gbytes) of the generated bits.

    Dieharder is a very good testing suite.

    http://www.phy.duke.edu/~rgb/General/dieharder.php

    And TestU01 is also well-known.

    http://www.iro.umontreal.ca/~simardr/testu01/tu01.html

提交回复
热议问题