45 / 45 tests passed Java · JDK 8+ multithreaded source-available

No seed.
No formula.
Just scheduler chaos.

BBRES-RNG turns the operating system's own thread-scheduling unpredictability into an entropy source - spawning controlled race conditions and reading the timing noise they leave behind.

entropy_scope.live sampling thread jitter
mehul@bbres:~$ cat README

Entropy from chaos, not from math

Traditional generators lean on deterministic formulas seeded from a fixed starting point. BBRES-RNG instead launches worker threads, lets the OS scheduler decide their execution order, and captures the microsecond-level unpredictability of that decision as raw entropy.

Traditional PRNGsBBRES-RNG
Seed-based - deterministic from the same seedEntropy-based - non-deterministic by design
Mathematical formulas (LCG, Mersenne Twister)Harvests timing noise from OS thread scheduling
Reproducible given the same initial statePractically unreproducible - tied to live system state
Single-threaded executionConcurrent, multi-threaded architecture
mehul@bbres:~$ cat pipeline.txt

Three stages, one random bit

Every single bit is the product of a full concurrency cycle. Producing a large integer means running this loop once per bit of its binary length.

01
Thread spawning & controlled race conditions
A batch of worker threads launches simultaneously. The OS scheduler - not the program - decides the order they actually run in, a decision shaped by CPU load, interrupts, and kernel-level state.
modRandomBitGenRNG → randomBitGenRNG.start()
02
Timing-based entropy collection
Each worker races to claim the next open slot in a shared flag array. Which thread wins, and when, encodes microsecond-scale scheduling variance as raw entropy.
AtomicIntegerArray conc · synchronized getBit(id)
03
Bitwise mixing & aggregation
The captured slot assignments are XOR-folded and run through a xorshift-style mix (shift-10 / shift-23 / shift-7) to whiten the result into a single output bit.
xor ^= xor<<10; xor ^= xor>>>23; xor ^= xor<<7;
mehul@bbres:~$ ./validate --all --compare

45-test statistical battery

10,918,505 bits and 100,000 integers, benchmarked against NIST SP 800-22 core & extended suites, uniformity, spectral analysis, adversarial ML attacks, a SHA-256 CSPRNG wrapper check, and integer-level distribution tests - significance α = 0.01.

BBRES-RNG
45 / 45
ARCHITECTURE ACCEPTED
Java SecureRandom
45 / 45
ARCHITECTURE ACCEPTED
Java Math.random()
43 / 45
Failed: Maurer's, Gap Test
SHANNON ENTROPY (8-bit)
7.999860 / 8
MIN-ENTROPY (8-bit)
7.944862 / 8
TRANSITION RATE
0.500064
BIT BALANCE (1s:0s)
49.988 : 50.012
mehul@bbres:~$ tree src/

Architecture

Bit-Based-Randomized-Entropy-System-Scheduler-Based-RNG/ ├── src/ │ ├── Main.java # entry point │ └── bbresRNG/ │ ├── RNG.java # public API │ ├── randomBitGeneratorModifiedRoot.java # orchestration │ ├── modRandomBitGenRNG.java # worker variant │ └── RandomBitGenRNG.java # base worker ├── docs/ # validation reports ├── LICENSE # custom restrictive └── README.md
RNG.javaPublic API. Accepts (min, max), concurrency n, generation technique.
randomBitGeneratorModifiedRoot.javaOrchestrates a single random bit via two interchangeable methods, G1 and G2.
modRandomBitGenRNG.javaWorker-thread variant that collects timing data in parallel and XOR-mixes it.
RandomBitGenRNG.javaBase worker thread spawned purely for entropy harvesting.
usage.java
import bbresRNG.RNG;

public class Main {
    public static void main(String[] args) {
        RNG rng = new RNG();

        // default range [0, 10], n=71, technique 1
        System.out.println(rng.bbresRNG());

        // custom range
        System.out.println(rng.bbresRNG(5, 15));

        // custom concurrency: range [1,100], n=50 threads
        System.out.println(rng.bbresRNG(1, 100, 50));

        // alternate technique: randTech=2, n=35
        System.out.println(rng.bbresRNG(0, 10000, 35, 2));
    }
}
mehul@bbres:~$ cat INSTALL.md

Build & run

Requires JDK 8+ and a terminal, or any Java IDE.

$ git clone https://github.com/singhmehul7783/Bit-Based-Randomized-Entropy-System-Scheduler-Based-RNG.git
$ cd Bit-Based-Randomized-Entropy-System-Scheduler-Based-RNG
# compile
$ javac src/Main.java
# run
$ java -cp src Main
mehul@bbres:~$ cat LICENSE --summary

Custom restrictive license

PERMITTEDAcademic research, education, personal study - with proper attribution.
PROHIBITEDCommercial use, modification, distribution, sublicensing, or derivative works without written permission.
CONTACTprojects@mehul.engineer
Download started - BBRES-RNG.zip