Generate Reproducible Streams
Set the seed, mixing rounds, zeta parameters, and domain. The browser output is deterministic for the same configuration, and the Random Seed button now initializes a fresh RGE256Safe stream immediately.
Generator Configuration
What is RGE-256?
This app generates values with the in-page RGE256Safe PRNG: a 256-bit ARX state, fixed rotations, and a 64-bit counter mixed into every 32-bit output. Browser entropy is used only when you ask the app to suggest a new seed.
Number Generation
Inspect Output Quality
These browser checks are quick diagnostics for exploration. They are not a substitute for PractRand, dieharder, TestU01 Crush, or other full statistical batteries.
Statistical Analysis
Distribution Visualization
📊 What am I seeing?
Generate numbers to see distribution analysis.
Performance & Benchmarks
RGE256Safe PRNG Guide
This tab explains what the browser generator does, what each control changes, and how to discuss the algorithm professionally without overstating it. RGE256Safe is deterministic, seedable, and intended for simulation, teaching, and research-facing experiments, not cryptography.
What A PRNG Does
A pseudorandom number generator is a deterministic state machine. It starts from a seed, repeatedly updates an internal state, and emits numbers that should look pattern-free under statistical inspection.
Active Browser Generator
The app instantiates RGE256Safe, not the older comparison prototype. It keeps eight 32-bit words as the main state and two 32-bit counter words as a 64-bit monotonic counter.
- State: 8 x 32-bit words = 256 bits.
- Counter: mixed into every emitted value.
- Output: unsigned 32-bit words, then optionally mapped to ranges.
- Purpose: reproducible non-cryptographic random streams.
How One Output Is Produced
- Initialize state from the seed, domain string, and zeta controls.
- Run the selected number of ARX rounds.
- Each round performs add, rotate, and XOR operations across state lanes.
- Cross-mix the lanes so changes spread through the state.
- Increment the 64-bit counter and fold it into the output word.
What The Controls Mean
- Seed: the reproducible starting value. Record it with every result.
- Rounds: more rounds increase diffusion and reduce speed.
- Zeta values: folded into initial state expansion for stream variation.
- Domain: separates independent streams under the same seed.
- Range: display mapping only. External batteries should use raw 32-bit output.
What The Browser Checks Mean
The app's charts and quick tests are fast sanity checks. They can reveal obvious bias or broken wiring, but they do not replace long-run statistical batteries.
- Histogram: checks rough uniformity over the selected range.
- Entropy: estimates observed information content for the sample.
- KS test: compares the sample to a uniform distribution.
- Bit views: look for imbalance in bit positions and transitions.
Claims Boundary
Professional reporting should separate observed test results from security claims. Passing statistical batteries does not make a generator cryptographically secure.
External Statistical Testing
The app does not run PractRand, dieharder, or TestU01 in the browser. Use the included stream generator and harnesses in your own environment, then copy summarized results back into this app or the README when you have completed a battery.
1. Generate A Raw Stream
Use raw little-endian 32-bit output for serious batteries. Avoid custom ranges, CSV, JSON, or formatted text unless a test explicitly asks for text.
PractRand
PractRand is stream-oriented. Pipe unbounded 32-bit output into RNG_test stdin32 and stop at the data volume you want to report.
dieharder
dieharder can read raw binary from stdin with generator 200. Run the full battery, save the output, and report pass/weak/fail counts with command details.
TestU01 Crush / BigCrush
TestU01 is a C library. Compile the included harness against TestU01 and choose SmallCrush, Crush, or BigCrush. BigCrush can take a long time.
What To Record
- Generator version or commit hash.
- Seed, rounds, zeta values, and domain string.
- Tool name, version, battery, and exact command.
- Total bytes or samples consumed.
- Pass, weak, suspicious, and fail counts.
- Full raw logs as artifacts, not only screenshots.
Interpreting Results
A clean battery result is evidence that the tested stream did not trigger that suite's detectors at that data volume. It is not proof of randomness, unpredictability, or cryptographic security.
Validation Results Ledger
Use this table for published results after the external batteries finish. Keep pending rows until a complete tool log is available.
| Battery | Configuration | Data Volume | Observed Result | Status |
|---|---|---|---|---|
| PractRand | seed 3405691, rounds 3, domain rge-demo | Pending | Awaiting external run and saved log. | Not run |
| dieharder | seed 3405691, rounds 3, domain rge-demo | Pending | Awaiting full pass / weak / fail summary. | Not run |
| TestU01 Crush | seed 3405691, rounds 3, domain rge-demo | Pending | Awaiting SmallCrush, Crush, or BigCrush report. | Not run |
Use The Stream In Simple Systems
These examples show how the generator behaves in familiar probability workflows. They are teaching demos, not validation batteries.
🎮 Interactive Demos & Games
See RGE-256 in action with classic probability applications!
🎲 Dice Roller
Roll virtual dice using RGE-256
🪙 Coin Flipper
Flip coins and track statistics
🃏 Card Drawer
Draw random playing cards from a deck
🎰 Lottery Numbers
Generate lottery-style numbers