PitchHut logo
SmokeRand
Powerful tests for pseudorandom number generators.
Pitch

SmokeRand offers a suite of tests designed for pseudorandom number generators, ensuring they produce uniformly distributed unsigned integers, whether 32-bit or 64-bit. With high-speed execution and the ability to detect flaws in popular PRNGs, it supports multithreading and improves sensitivity with direct access to generator bits, distinguishing it from other solutions.

Description

SmokeRand provides a robust suite of tests for evaluating the quality of pseudorandom number generators (PRNGs). This library is designed to directly support 32-bit and 64-bit unsigned integers, enabling both comprehensive analysis and high sensitivity to flaws in popular PRNGs.

Key Features

  • Extensive Test Suite: SmokeRand includes tests that mirror SmallCrush, Crush, and BigCrush tests from TestU01 while offering significant improvements, including support for 64-bit generators directly.
  • Performance: The brief battery runs in under a minute, the default battery in under five minutes, and the full battery runs in less than an hour, ensuring efficient testing even with large sample sizes.
  • Multithreading Support: Operable with POSIX or WinAPI threads, allowing for faster test execution and better resource utilization.
  • Widely Applicable: Capable of detecting flaws in various generators, including those that pass tests from PractRand and BigCrush, through innovative tests like the birthday paradox and gap tests.

Implemented Tests

SmokeRand encompasses a wide range of tests which include but are not limited to:

  1. Monobit frequency test
  2. Birthday spacings test
  3. CollisionOver test
  4. Hamming weights frequency tests
  5. Linear complexity test
  6. Matrix rank test

These tests assess various statistical properties of PRNG outputs, indicating suitability for Monte Carlo simulations and other applications.

Supported Generators

SmokeRand features a variety of generators categorized into cryptographically secure options, obsolete generators, and various forms of linear and lagged Fibonacci generators, among others. Notable implementations include:

  • ChaCha, AES, RC4 (obsolete), Mersenne Twister, and numerous linear congruential generators.

Usage Example

To run a default test on a PRNG, utilize the command:

$ ./smokerand default generators/lcg64.so --threads

Conclusion

Overall, SmokeRand provides a unique combination of sensitivity, performance, and simplicity in testing pseudorandom number generators. Its minimalist design allows for effective testing without unnecessary complexity, making it an essential tool for developers and researchers interested in validating PRNGs.

0 comments

No comments yet.

Sign in to be the first to comment.