Test Stream Generator
Generate synthetic binary test streams from 11 deterministic and stochastic sources — Sequential Ramp, Fixed Constant, LFSR, De Bruijn Cycle, LCG, Xoshiro256**, Gaussian, Poisson, NIST AES CTR_DRBG, NIST SHA-256 Hash_DRBG, and ChaCha20. Export as .bin, .txt, .hex, .bits, or .csv.
Zero-Alloc WASM: All streams are generated entirely in-browser via WebAssembly with zero server-side processing. Choose your generator type, configure parameters, preview the first 128 bytes live, then download at any target size from 1 KB to 1 GB+.
Available Generator Types
| ID | Generator | Category | Description |
|---|---|---|---|
| 0 | Sequential Ramp | Deterministic | Linear progression: (start + i × step) % 256. Worst-case known input for statistical tests. |
| 1 | Fixed Constant | Deterministic | Repeating single byte: all zeros (0x00), all ones (0xFF), or any custom byte value. |
| 2 | LFSR (Shift Register) | Deterministic | Primitive polynomial linear feedback shift register — binary maximum-length sequences. |
| 3 | De Bruijn Cycle | Deterministic | Maximal-length cycle of period $2^n$ containing every $n$-bit combination exactly once. |
| 4 | LCG (Linear Congruential) | Deterministic | Standard recurrence: ANSI C rand(), MINSTD, or Knuth LCG variants. Known biases in low bits. |
| 5 | Xoshiro256** | Pseudorandom | High-speed, all-purpose simulation PRNG with 256-bit state. Passes BigCrush and PractRand 32 TB. |
| 6 | Gaussian (Normal) | Statistical | Box-Muller normal distribution with $\mu = 127.5$, $\sigma = 40$, quantized to bytes. |
| 7 | Poisson ($\lambda=127$) | Statistical | Discrete Poisson distribution with rate parameter $\lambda = 127.0$, quantized to bytes. |
| 8 | NIST AES CTR_DRBG | Cryptographic | NIST SP 800-90A AES-128 counter-mode deterministic random bit generator. FIPS 140-3 compliant. |
| 9 | NIST SHA-256 Hash_DRBG | Cryptographic | NIST SP 800-90A SHA-256 hash-based deterministic random bit generator. FIPS 140-3 compliant. |
| 10 | ChaCha20 Keystream | Cryptographic | RFC 8439 256-bit stream cipher keystream output — cryptographically secure and high throughput. |
Export Formats
| Format | Extension | Description |
|---|---|---|
| Raw Binary | .bin | Native byte stream — direct input for all test batteries |
| ASCII Integers | .txt | Space-separated decimal integers (0–255), one per line |
| ASCII Bits | .bits | Space-separated binary strings (e.g. 10110010), one per byte |
| Hexadecimal | .hex | Lowercase hex pairs (e.g. a3 f0 1e ...), 16 bytes per line |
| Normalized Float | .csv | Values normalized to [0.0, 1.0] as CSV — ready for Monte Carlo tools |
When to Use the Generator
- Worst-Case Test Vectors: Use Sequential Ramp or Fixed Constant to generate known-bad streams. Running these through the Full Meta-Suite confirms that all 8 batteries correctly detect non-random patterns — validating the test suite itself.
- Test Battery Calibration: Generate streams from LCG or LFSR — generators with known, well-characterized statistical defects — to verify that NIST §2.3 (Runs), Dieharder DH05, and AIS 31 T3 correctly flag their specific failure modes.
- DRBG Output Sampling: Generate NIST AES CTR_DRBG or SHA-256 Hash_DRBG streams of any size to confirm that the bundled WASM DRBG implementations produce output that passes all test batteries — useful for FIPS 140-3 submission evidence generation.
- Monte Carlo Input Preparation: Export Xoshiro256** or ChaCha20 output as
.csv(normalized float) for direct use in Monte Carlo simulation frameworks (SciPy, NumPy, Julia) without an external RNG dependency.
Workflow Tip: Generate a stream here, then immediately drop the downloaded
.bin file into the Full Meta-Suite tab to run all 8 test batteries on it in a single pass. This round-trip is the fastest way to characterize any generator type.Cryptographic Use: The AES CTR_DRBG and SHA-256 Hash_DRBG generators use fixed internal seeds in this browser implementation. Streams are deterministic and suitable for testing purposes only — do not use generated files as cryptographic key material in production systems.