By Julien Blanchet and Thomas Kidder
Notes:
- To run diehard test suite, we need to have a binary input.
- we do the following to convert our pi file:
- pi10m.txt contains the first 10m digits of pi, divided into 10-digit segments
- pi10m.dec contains the above file, stripped of whitespace and mapped to binary (keeping randomness, but not exact values)
- This conversion process is done by process_pi.txt
- we do the following to convert our pi file:
- pi-prng.py is an implmentation of a PRNG that uses this f le to extend the entropy of the input
- How it works:
- Keeps state that includes:
- md5 hash that is updated with magic string each iterations
- position within a "pistream" file, a source of precompputed randomy numbers
- Whenever random byte is requested, it:
- updates the hash
- advances in pistream file by a number computed from this hash, modulo a certain value (to prevent excessive skipping)
- Keeps state that includes:
- Noteworthy considerations:
- The pistream class loops to the beginning of the randomy source file when it reaches the end.
- How will this affect randomness measurements?
- How much does this depend on the size of the source file?
- Is there a ratio of loops over the file where randomness tests significantly degrade?
- Does it degrade the very first repetition?
- How does the modulo threshold affect randomness of outputs?
- How does it affect performance?
- The pistream class loops to the beginning of the randomy source file when it reaches the end.
- How it works: