Test of uniformity of BN_rand_range output.
authorPauli <paul.dale@oracle.com>
Tue, 28 May 2019 23:54:29 +0000 (09:54 +1000)
committerPauli <paul.dale@oracle.com>
Tue, 28 May 2019 23:54:29 +0000 (09:54 +1000)
commit5d2f3e4a6c3e62677cdf3b33d8b9b08ff7d52dc7
tree36c697b0b6bc6552ff3471e26c8c49bcf5410d9e
parentd4e2d5db621a512eff8a0ab07d3ac44d7122428a
Test of uniformity of BN_rand_range output.

Rework the test so that it fails far less often.

A number of independent tests are executed and 5% are expected to fail.
The number of such failures follows a binomial distribution which permits
a statistical test a 0.01% expected failure rate.

There is a command line option to enable the stochastic range checking.
It is off by default.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8830)
INSTALL
test/bn_rand_range.h [new file with mode: 0644]
test/bntest.c