Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase and improve random number generator tests #72825

Open
ceolin opened this issue May 15, 2024 · 0 comments
Open

Increase and improve random number generator tests #72825

ceolin opened this issue May 15, 2024 · 0 comments
Assignees
Labels
area: Random Random subsystem Enhancement Changes/Updates/Additions to existing features

Comments

@ceolin
Copy link
Member

ceolin commented May 15, 2024

Description

Random number generator (RNG) is a critical component of our system, used in various security functions, ranging from cryptographic key generation to entropy pooling. Ensuring the robustness and unpredictability of the RNG is crucial for maintaining system security and reliability.

Problem

Our current test suite for the RNG implementation does not adequately cover all edge cases and lacks checks against known RNG vulnerabilities (e.g., bias, predictability, and entropy source failures). This oversight could potentially expose the system to risks where the RNG might not meet the required cryptographic standards, especially under atypical conditions or stress.

Describe the solution you'd like

Would be nice to have something similar to diehard testsuite

The suite includes tests such as:

Birthday spacings Determines whether the differences between the sorted values of a sequence resemble the spacings between birthdays in a calendar year.
Overlapping permutations Examines the number of permutations of five consecutive integers in a sequence of random numbers.
Ranks of matrices Measures the rank of randomly generated binary matrices.
Random spheres Tests the distribution of a sequence of points randomly placed in a cube.

These tests are very thorough and are used to ensure that RNGs do not exhibit any detectable non-randomness, which is crucial for applications like cryptography, where the unpredictability of random numbers is fundamental to security.

@ceolin ceolin added the Enhancement Changes/Updates/Additions to existing features label May 15, 2024
@henrikbrixandersen henrikbrixandersen added the area: Random Random subsystem label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Random Random subsystem Enhancement Changes/Updates/Additions to existing features
Projects
Status: No status
Development

No branches or pull requests

2 participants