🤖 AI Summary
This work addresses a critical limitation in existing pseudorandom number generator (PRNG) test suites, which are confined to detecting linear biases over the binary field and thus fail to identify statistical flaws arising from linear structures defined over prime fields—such as those in MIXMAX and linear congruential generators. The study presents the first extension of rank and linear complexity tests to arbitrary prime fields, leveraging finite field theory to construct a modular-domain framework for detecting such linear dependencies. An efficient implementation, modlin, written in Rust, enables rapid analysis and successfully uncovers previously undetected deviations in all MIXMAX implementations within CERN ROOT within minutes. This approach fills a significant gap in standard testing methodologies by providing rigorous evaluation capabilities for non-binary linear PRNGs.
📝 Abstract
Standard batteries of tests for pseudorandom number generators (such as dieharder, the NIST suite, and TestU01) provide two empirical tests for linearity, the binary rank and linear-complexity tests. Both operate over the field $\mathbf F_2$, and thus detect generators that are linear over $\mathbf F_2$. However, generators can be linear over a larger field, as in the case of congruential generators, single-modulus multiple-recursive recurrences, and of matrix generators such as MIXMAX. We introduce a modular version of the rank and linear-complexity tests, and provide modlin, a Rust program that implements it efficiently for fields of prime size. modlin can detect in minutes statistical bias in all current CERN's ROOT's implementations of the MIXMAX generator, for which no standard statistical test failure has been reported before.