Randomness tests.
bitsig’s output was run through the NIST SP 800-22 statistical test suite and a chi-square check of how picks are made. Every result is below, including the two sub-tests that fell just short, with what was tested and how to reproduce it. Tested and published on 22 November 2026.
What these tests are for
bitsig doesn’t generate its own randomness. Every result starts from drand, a public randomness beacon run by the League of Entropy, and bitsig turns each drand value into a byte stream with a published method: block(i) = SHA-256(R ‖ seed ‖ uint32_be(i)). It then turns those bytes into a die roll, a pick, a shuffle or groups. These tests check bitsig’s part of that chain: that the byte stream shows no statistical pattern, and that picks land evenly across every option.
Statistical tests can find defects. They can’t prove a value was unpredictable. That rests on drand’s threshold signatures and on SHA-256, and anyone can check any individual result from public data.
NIST SP 800-22
NIST SP 800-22 is the US National Institute of Standards and Technology’s statistical test suite for random number generators. It’s the suite random number certification schemes most often rely on. We used NIST’s own reference code, STS 2.1.2, unmodified.
- Sample: 100 sequences of 1,000,000 bits each, the suite’s recommended size. That’s 12.5 MB in total, with SHA-256
45667c30cbbc4726c0b034d59cbb29a1d17018d76b85780c8a23d1f69ff9d8d8. - Source: sequence k (0 to 99) is the first 125,000 bytes of bitsig’s stream for drand quicknet round 1,000,000 + 300,000k with seed
nist-sample-k. Every round was fetched from drand and its signature checked before use. - Settings: all 15 tests with the suite’s default parameters, 188 sub-tests in all.
| Test | Sub-tests | Lowest pass rate | Lowest uniformity p-value |
|---|---|---|---|
| Frequency | 1 | 99/100 | 0.983 |
| Block frequency | 1 | 98/100 | 0.596 |
| Cumulative sums | 2 | 99/100 | 0.304 |
| Runs | 1 | 100/100 | 0.237 |
| Longest run of ones | 1 | 99/100 | 0.760 |
| Binary matrix rank | 1 | 98/100 | 0.637 |
| Discrete Fourier transform | 1 | 99/100 | 0.494 |
| Non-overlapping template | 148 | 95/100 | 0.002 |
| Overlapping template | 1 | 100/100 | 0.350 |
| Maurer’s universal | 1 | 100/100 | 0.883 |
| Approximate entropy | 1 | 98/100 | 0.262 |
| Random excursions | 8 | 60/62 | 0.009 |
| Random excursions variant | 18 | 61/62 | 0.163 |
| Serial | 2 | 97/100 | 0.834 |
| Linear complexity | 1 | 99/100 | 0.225 |
Result: 186 of 188 sub-tests met NIST’s pass rate, and all 188 met its uniformity threshold.
- Pass rate: NIST’s minimum is about 96 of 100 sequences, or 59 of 62 for the random excursion tests, which only use the sequences that qualify.
- Uniformity: every p-value was above 0.0001.
- The two exceptions: two of the 148 non-overlapping template sub-tests passed 95 of 100 sequences, one short of the threshold.
- Why that’s expected: each of those sub-tests misses the line by chance 0.34% of the time even for perfectly random data. Across 188 sub-tests, two or more such misses happen about one time in seven. With this many sub-tests, a few misses are expected even from a perfect generator.
The full NIST output is published unedited: nist-report.txt.
How picks are made
A pick among k options takes a 32-bit number from the stream and uses rejection sampling, so every option is exactly equally likely. We made 200,000 picks for each of seven values of k, over 20 checked drand rounds, and compared the counts with a chi-square test.
| Options (k) | Picks | Chi-square | Degrees of freedom | p-value |
|---|---|---|---|---|
| 2 | 200,000 | 5.62 | 1 | 0.018 |
| 6 | 200,000 | 3.03 | 5 | 0.70 |
| 10 | 200,000 | 8.27 | 9 | 0.51 |
| 20 | 200,000 | 21.62 | 19 | 0.30 |
| 37 | 200,000 | 35.26 | 36 | 0.50 |
| 100 | 200,000 | 97.67 | 99 | 0.52 |
| 1000 | 200,000 | 1,015.96 | 999 | 0.35 |
All seven are consistent with even picks.
- The two-option run gave p = 0.018. With seven tests, at least one result that low turns up about one time in eight by chance.
- We reran two options with fresh seeds and 2,000,000 picks: 1,000,404 against 999,596, chi-square 0.33, p = 0.57.
drand’s own audits
- Sigma Prime, 2020: an end-to-end security audit of the drand implementation, published with drand 1.0.
- Kudelski Security, 2023: an audit of drand’s timelock encryption code. It found one high, five medium and three low issues, all reported fixed.
- The League of Entropy’s members include Cloudflare, the Ethereum Foundation, Protocol Labs, EPFL and University College London (member list).
Reproduce it
Everything here can be rerun from public material:
- the stream code at /random.js;
- drand’s public API;
- NIST’s STS 2.1.2.
Build each sequence from the round and seed above and the sample’s SHA-256 should match.
These are bitsig’s own tests, not a certification. The method is in the specification, with test vectors, and any single result can be checked on the verify page.