3 ms·
Very true. Sadly, this is the main approach the non-cryptographic PRNG community has at the moment. On the plus side, those tests are fairly extensive and brut
by espadrine 7y ago
Very true. Sadly, this is the main approach the non-cryptographic PRNG community has at the moment.
On the plus side, those tests are fairly extensive and brutal nowadays. They detect anomalies in cryptographic algorithms that were still used a decade ago, such as arc4random().
But one thing I hint at at the end is that I hope, and anticipate, to see more accurate quality measurement tools in the future.
- samatman 7y agoA partial workaround is to reserve one or two of the tests until your PRNG passes the others. If it passes the remainder on the first try, you might be on to something. If it fails, you've got a problem: tweaking until it passes isn't going to help you.
- HAPMCEZ 7y agoI like your design, simple and elegant. One thing I did when designing random functions is run them against DieHarder and Practrand, but then also against SMHasher, you just have to use some construction to fold the key into the state. I think that's a useful somewhat orthogonal way to test. have you considered this?
- nullc 7y agoOne alternative would be to attempt to select an analyzable structure which you could show through analysis should have good randomness properties. Potentially add a limited number of tweaks or parameters with the aid of just one or two general statistical tests (and perhaps a collection of pants-on-head stupid tests just to avoid wasting time on stuff that is utterly broken). After that, you try with the complete suite and unless the result reaches a predetermined passing criteria you declare the design as flawed and go back to step 1 rather than continuing to tweak (as the result of continued tweaking will inevitably be a pass even if the design is poor). Unfortunately, high performance and even 'good random-like behavior' may be at odds with having a construct which is transparent enough to be able to justify its performance from analysis rather than running it. :(