Improve crypto rand unit-test
Created by: anonimal
By submitting this issue, I confirm the following:
- I have read and understood the contributor guide.
- I have checked that the issue I am reporting can be replicated or that the feature I am suggesting is not present.
- I have checked opened or recently closed pull requests for existing solutions/implementations to my issue/suggestion.
Place an X inside the bracket to confirm
-
I confirm.
Recent builds here and here are a friendly reminder than the rand unit-test needs work.
Currently, any time a random generated value of type T
is repeated in under 100 iterations, the unit-test will fail. This not an ideal test for entropy but it was a hack to ensure a reasonable implementation (e.g., not stuck repeating the same value 100 times, etc.).
We can either hack the hack or visit some more hardcore options. Currently, cryptopp has a wealth of tests so the issue here is merely implementation and not if we're actually producing CSPRNG values.
Edit: references #315 and #316