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.
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 PRNGs | BBRES-RNG |
|---|---|
| Seed-based - deterministic from the same seed | Entropy-based - non-deterministic by design |
| Mathematical formulas (LCG, Mersenne Twister) | Harvests timing noise from OS thread scheduling |
| Reproducible given the same initial state | Practically unreproducible - tied to live system state |
| Single-threaded execution | Concurrent, multi-threaded architecture |
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.
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.
| RNG.java | Public API. Accepts (min, max), concurrency n, generation technique. |
| randomBitGeneratorModifiedRoot.java | Orchestrates a single random bit via two interchangeable methods, G1 and G2. |
| modRandomBitGenRNG.java | Worker-thread variant that collects timing data in parallel and XOR-mixes it. |
| RandomBitGenRNG.java | Base worker thread spawned purely for entropy harvesting. |
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)); } }
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
| PERMITTED | Academic research, education, personal study - with proper attribution. |
| PROHIBITED | Commercial use, modification, distribution, sublicensing, or derivative works without written permission. |
| CONTACT | projects@mehul.engineer |