https://github.com/hungrybluedev/rng_testbench
RNG Test Bench in V for evaluating internal and external PRNGs.
https://github.com/hungrybluedev/rng_testbench
Last synced: 2 months ago
JSON representation
RNG Test Bench in V for evaluating internal and external PRNGs.
- Host: GitHub
- URL: https://github.com/hungrybluedev/rng_testbench
- Owner: hungrybluedev
- Created: 2022-04-14T10:35:29.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-26T18:54:02.000Z (about 2 years ago)
- Last Synced: 2025-02-14T18:36:26.323Z (4 months ago)
- Language: V
- Homepage:
- Size: 133 KB
- Stars: 2
- Watchers: 11
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RNG Test Bench
## Brief Summary
Order of operations:
1. Generate a ~700MB file of random bytes for each generator, for each
iteration.
2. Run `ent` on the file.
3. Run all specified `dieharder` tests on the file if `ent` passes.
4. Burn 5 billion bytes from each generator, for each iteration. Record the
timings and calculate throughput.
5. Run one final suite of classical tests on the generator.## Prerequisites
1. It needs to be run on a system that can install `ent` and `dieharder`.
`time` is also recommended, but not necessary.
2. Install `ent` and `dieharder` from the package manager if available.
Otherwise, refer to their respective repositories:
[ent](https://github.com/jj1bdx/ent) and
[dieharder](https://github.com/seehuhn/dieharder).
3. Install `zip` if you do not have it.
4. 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.