RNG Test Bench
May 26, 2023 ยท View on GitHub
Brief Summary
Order of operations:
- Generate a ~700MB file of random bytes for each generator, for each iteration.
- Run
enton the file. - Run all specified
diehardertests on the file ifentpasses. - Burn 5 billion bytes from each generator, for each iteration. Record the timings and calculate throughput.
- Run one final suite of classical tests on the generator.
Prerequisites
- It needs to be run on a system that can install
entanddieharder.timeis also recommended, but not necessary. - Install
entanddieharderfrom the package manager if available. Otherwise, refer to their respective repositories: ent and dieharder. - Install
zipif you do not have it. - Optionally create a config.toml file based on the sample provided if any of the settings need to be changed.
Usage
Testing all generators
Uncomment the required generators in the enabled_generators array in
src/main.v.
It is recommended to use v -prod . to compile the program.
Then run it using time ./rng_testbench --mode runall
NOTE: If all iterations are set, each RNG takes over 10 minutes to test
(using -prod).
If the email API key is set, it will attempt to send an email after the test has concluded.
Showing the summary/summaries
Just run v run . after at least one test is run.