A statistical randomness tester for testsuites
Find a file
Charlotte 🦝 Delenk f650a10e67
Some checks failed
Hydra x86_64-linux.checks.rand_testsuite Hydra build #6520 of procyos:rand_testsuite-pr8:x86_64-linux.checks.rand_testsuite
Hydra x86_64-linux.packages.rand_testsuite Hydra build #6521 of procyos:rand_testsuite-pr8:x86_64-linux.packages.rand_testsuite
Merge branch 'main' into add-runs-of-ones
2024-09-17 06:28:31 +00:00
.cargo use private registry for extra-math 2024-09-08 18:54:42 +02:00
src add runs of ones test 2024-09-10 10:28:28 +02:00
.envrc Initial commit 2024-09-05 13:45:23 +00:00
.gitignore Initial commit 2024-09-05 13:45:23 +00:00
Cargo.lock Lock file maintenance 2024-09-16 00:01:38 +00:00
Cargo.nix update cargo2nix 2024-09-17 08:18:42 +02:00
Cargo.toml add runs of ones test 2024-09-10 10:28:28 +02:00
CHANGELOG.md add runs of ones test 2024-09-10 10:28:28 +02:00
CODE-OF-CONDUCT.md Initial commit 2024-09-05 13:45:23 +00:00
CONTRIBUTING.md add monobit test 2024-09-06 10:20:10 +02:00
default.nix Initial commit 2024-09-05 13:45:23 +00:00
flake.lock update cargo2nix 2024-09-17 08:18:42 +02:00
flake.nix update cargo2nix 2024-09-17 08:18:42 +02:00
LICENSE-APACHE Initial commit 2024-09-05 13:45:23 +00:00
LICENSE-MIT Initial commit 2024-09-05 13:45:23 +00:00
README.md add monobit test 2024-09-06 10:20:10 +02:00
renovate.json fix renovate config 2024-09-09 14:39:36 +02:00
SECURITY.md add monobit test 2024-09-06 10:20:10 +02:00

rand_testsuite

A Testsuite for random number generators. It implements NIST 800-22.

It is intended to be more as a smoketest to ensure that random number generation isnt completely broken.

Crate Features

rand_testsuite defines the following features:

  • std: Uses the std librarys maths routines instead of a freestanding pure-rust implementation.
  • rand_core: Allows you to directly test RngCore trait implementations. Enables allocations.

Getting Started

This is how you may use this crate to evaluate a random number generator (requires rand_core!)

let mut rng = rand::thread_rng();
assert!(CombinedRandomTest::default().evaluate_rng(&mut rng).unwrap_or_default() > 0.01);

Installing

You can add this library to your crate with the following command:

cargo add rand_testsuite --dev

This makes the dependency available in testsuites.

Running the tests

cargo test
nix flake check .

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use Semantic Versioning for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

Licensed under either of

at your option.