随机数序列在密码学中有着至关重要的作用,实际应用中考虑到序列生成的时间和复杂度,通常使用的是存在某些缺陷的伪随机数序列,它们给密码系统带来了一定的风险性。因此,需要使用随机性测试来对生成的序列进行检验,NIST在一个测试包中收录了16个随机性测试,这是目前较为常用的测试包之一,它们相互间的关系及其优劣性一直是一个值得探讨的问题。
Random number sequences play an important role in cryptography. Since the time consuming and complexity in the process of sequence generation, pseudorandom numbers of some defects are usually used in practical applications. This might bring certain risk to the cryptographic system. As a result, it is necessary to apply a statistical test to judge the randomness of a generated sequence, and it would be considered non-random if it fails the test. NIST has put out a randomness test package including 16 statistical tests, which is widely used now. In order to explain the test result clearly, the relationship and effect of these tests deserves further discussing.