Docs / Compliance / PractRand 0.96

PractRand 0.96 Validation

TrueEntropy hybrid output was tested against PractRand 0.96 - a rigorous statistical battery widely regarded as the gold standard for PRNG quality testing. The output passed all 157 tests across 32 GB with zero anomalies detected at any checkpoint. Everything needed to regenerate the exact same 32 GB stream is published below.

32 GB Clean - 157/157 Tests Passed
PractRand 0.96 - test set: core, folding: standard (8-bit) - zero anomalies

What is PractRand?

PractRand (Practically Random) is an open-source C++ statistical testing suite for random number generators. It is considered more demanding than NIST SP800-22 because it scales continuously - running more tests at each power-of-two data boundary and detecting weaknesses that only emerge at large volumes. A weak PRNG will typically fail between 1 MB and 16 MB. Cryptographic-grade generators are expected to pass well beyond 32 GB.

Test Methodology

Entropy source

10,485,760 bytes (10 MB) of true quantum random numbers generated via IBM Quantum hardware (ibm_fez, 156-qubit system) using 8-qubit Hadamard circuits, verified 7/7 by NIST SP800-22. This seed file is published below.

Hybrid expansion

The quantum dataset seeds a ChaCha20 stream cipher, mirroring the production hybrid architecture. The quantum bytes are prepended to the keystream to produce the full test stream. Exact parameters:

ParameterValue
CipherChaCha20 as specified in RFC 8439 (20 rounds, 32-bit block counter, 96-bit nonce)
Keyseed[0:32] - the first 32 bytes of the seed
16-byte IVseed[32:44] || 00 00 00 00 - the next 12 bytes of the seed followed by four zero bytes, in the OpenSSL / Python cryptography layout (counter first, then nonce)
Initial block counterseed[32:36] as a little-endian uint32 (0xa5f39506). It doesn't wrap within 32 GiB
RFC 8439 nonceseed[36:44] || 00 00 00 00
Streamseed || keystream: all 10,485,760 seed bytes, followed by the raw keystream (ChaCha20 applied to zero bytes)
Total length235 bytes (34,359,738,368 bytes, 32 GiB)
Stream SHA-25655dea154e726f1ba91c5f21355375db211e7b90617971947e0da059db8e8f38a

Reproduce the Results

The stream is deterministic, so anyone can regenerate it byte for byte from the published seed. The generator streams to stdout, so no 32 GB file needs to be stored. You need Python 3 with the cryptography package and a PractRand 0.96 build.

Downloads

FileDescription
raw_full.bin10 MB quantum seed (IBM ibm_fez). SHA-256 b0940f079dc5236b287033df4aed6d32f1ba306e34c6a60531f055f33b42b31b
gen_hybrid_stream.pyStream generator. It checks the seed's SHA-256, then writes the 32 GiB stream to stdout
SHA256SUMSChecksums for the two files above
stream_32GiB.sha256SHA-256 of the full 32 GiB stream, in sha256sum -c format

Commands

bash
# 1. Download and verify the seed and generator for f in raw_full.bin gen_hybrid_stream.py SHA256SUMS stream_32GiB.sha256; do curl -O https://www.trueentropy.net/downloads/practrand/$f done sha256sum -c SHA256SUMS # 2. Install the ChaCha20 dependency python3 -m pip install cryptography # 3. Build PractRand 0.96 (https://sourceforge.net/projects/pracrand/) # These are the build steps from PractRand's doc/installation.txt unzip PractRand_0.96.zip && cd PractRand g++ -c src/*.cpp src/RNGs/*.cpp src/RNGs/other/*.cpp -O3 -Iinclude ar rcs PractRand.a *.o g++ -o RNG_test tools/RNG_test.cpp PractRand.a -O3 -Iinclude -Itools -pthread cd .. # 4. Run PractRand on the 32 GiB stream (8-bit input, 32 GB limit) python3 gen_hybrid_stream.py | ./PractRand/RNG_test stdin8 -tlmax 32G # Optional: confirm you generated exactly the stream we tested python3 gen_hybrid_stream.py | sha256sum -c stream_32GiB.sha256

The ChaCha20 keystream can also be checked independently with OpenSSL, which takes the same 16-byte IV (4-byte little-endian counter followed by the 12-byte nonce). The output should match the generator's stream starting at byte 10,485,760:

bash
KEY=$(head -c 32 raw_full.bin | od -An -tx1 -v | tr -d ' \n') IV=$(head -c 44 raw_full.bin | tail -c 12 | od -An -tx1 -v | tr -d ' \n')00000000 head -c 4194304 /dev/zero | openssl enc -chacha20 -K $KEY -iv $IV | sha256sum python3 gen_hybrid_stream.py --bytes 14680064 | tail -c 4194304 | sha256sum

Results

Original run: 2026-04-24. On 2026-11-04 the run was repeated on the regenerated stream with the commands above, and every checkpoint reported the same test counts with no anomalies. Only the timings differ, because the hardware was faster. The 128 MB and 256 MB reports in the 2026-11-04 repeat came from separate runs with -tlmax 128M and -tlmax 256M. PractRand doesn't print those early checkpoints when it processes them in under a second.

Stream LengthTests RunAnomaliesStatus
128 MB1020Pass
256 MB1100Pass
512 MB1180Pass
1 GB1250Pass
2 GB1320Pass
4 GB1390Pass
8 GB1450Pass
16 GB1510Pass
32 GB1570Pass

Full output (2026-04-24)

PractRand output
RNG_test using PractRand version 0.96 RNG = RNG_stdin8, seed = unknown test set = core, folding = standard (8 bit) rng=RNG_stdin8, seed=unknown length= 128 megabytes (2^27 bytes), time= 2.0 seconds no anomalies in 102 test result(s) rng=RNG_stdin8, seed=unknown length= 256 megabytes (2^28 bytes), time= 4.0 seconds no anomalies in 110 test result(s) rng=RNG_stdin8, seed=unknown length= 512 megabytes (2^29 bytes), time= 7.5 seconds no anomalies in 118 test result(s) rng=RNG_stdin8, seed=unknown length= 1 gigabyte (2^30 bytes), time= 14.6 seconds no anomalies in 125 test result(s) rng=RNG_stdin8, seed=unknown length= 2 gigabytes (2^31 bytes), time= 29.8 seconds no anomalies in 132 test result(s) rng=RNG_stdin8, seed=unknown length= 4 gigabytes (2^32 bytes), time= 59.8 seconds no anomalies in 139 test result(s) rng=RNG_stdin8, seed=unknown length= 8 gigabytes (2^33 bytes), time= 119 seconds no anomalies in 145 test result(s) rng=RNG_stdin8, seed=unknown length= 16 gigabytes (2^34 bytes), time= 246 seconds no anomalies in 151 test result(s) rng=RNG_stdin8, seed=unknown length= 32 gigabytes (2^35 bytes), time= 471 seconds no anomalies in 157 test result(s)

How the stream was regenerated (2026-11-04)

The 32 GB input file from the April run wasn't kept, and this page originally gave only the PractRand command. After a reader asked how to reproduce the result, we rebuilt the stream from the same quantum seed using the ChaCha20 call recorded in our April test notes. We also corrected the parameter description: it previously said "counter 0, nonce = bytes 33-44", but the April code passed those 12 bytes plus four zero bytes as the 16-byte IV shown in the table above. April's run didn't record a hash of its input, so we can't prove the rebuilt stream is byte-for-byte identical. It comes from the recorded code, and it reproduces the April output exactly at all nine checkpoints. Before rebuilding the April stream, we also ran a version with counter 0 and nonce = bytes 33-44, matching the old description. It also passed 157/157 at 32 GB with no failures, with two "unusual" flags (PractRand's lowest level) at 1 GB and 16 GB.

Context & Comparison

Test SuiteTestsScaleTrueEntropy Result
NIST SP800-2215 tests~1 MB15/15 Pass
PractRand 0.96157 tests32 GB157/157 Pass
Typical commercial CSPRNGvaries1–4 GBindustry baseline

Caveats

These results are statistical evidence, not a cryptographic proof. PractRand tests detect structural patterns and biases; they do not evaluate key security or resistance to cryptanalysis. The quantum seed (IBM Fez hardware) is the irreducible entropy source - the ChaCha20 expansion is computationally secure, not information-theoretically secure. The quantum seed published here is a dedicated test dataset and is not used to key any production stream.