| Welcome to Crypto. We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| TESTU01 source for PRNG test reading from STDIN | |
|---|---|
| Tweet Topic Started: May 1 2017, 06:47 PM (124 Views) | |
| Karl-Uwe Frank | May 1 2017, 06:47 PM Post #1 |
|
NSA worthy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I have uploaded a short ANSI-C source code that can test the output of any PRNG using the TESTU01 test battery by reading in 32bit values from STDIN. This way it's not necessary to implement your PRNG algorithm into TESTU01 because you can simply pipe the output of any PRNG written in the programming language you favour to the test battery. Perhaps someone might find it useful. Comments are welcome. At http://www.freecx.co.uk/crypto/cryptanalysis/TestTools/TestU01/ you find all needed sources as well as some example PRNG source codes. The original source code and explanation of TestU01 used in my implementation is located here http://simul.iro.umontreal.ca/testu01/tu01.html Running the given example PRNGs mentioned above against TESTU01_stdin we get the following results. As expected a very basic LCG PRNG fails badly just the SmallCrush test
Not that terribly bad as the above LCG does the systems Rand PRNG on the SmallCrush test
While a good PRNG however clearly pass the SmallCrush test
|
|
cHNiMUBACG0HAAAAAAAAAAAAAABIZVbDdKVM0w1kM9vxQHw+bkLxsY/Z0czY0uv8/Ks6WULxJVua zjvpoYvtEwDVhP7RGTCBVlzZ+VBWPHg5rqmKWvtzsuVmMSDxAIS6Db6YhtzT+RStzoG9ForBcG8k G97Q3Jml/aBun8Kyf+XOBHpl5gNW4YqhiM0= | |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Utilities · Next Topic » |





![]](http://z2.ifrm.com/static/1/pip_r.png)




12:32 AM Jul 11