Appearance
BMM-Certified RNG
Certification Chain
The Math Engine uses a BMM-certified random number generator for all game-determining randomness. The certification chain is preserved through an isolated PHP microservice:
text
+---------------+ HTTP POST /rng +----------------------+
| Game Engine | -------------------------> | PHP RNG Microservice |
+---------------+ | (Certified) |
+----------+-----------+
|
v
+-----------------------+
| Certified RNG Wrapper |
+----------+------------+
|
v
+----------------------+
| PHP random_int(...) |
+----------+-----------+
|
v
+----------------------+
| OS CSPRNG |
| /dev/urandom, |
| getrandom |
+----------------------+Why This Architecture
| Concern | Solution |
|---|---|
| BMM Certification | The PHP RNG wrapper is pre-certified by BMM Testlabs |
| Audit Trail | Every random number passes through the certified class path, no shortcuts |
| Performance | The gateway calls the PHP service via HTTP; the PHP process is persistent (no cold start) |
| Isolation | The RNG service runs as a separate container, independent scaling and monitoring |
HTTP Bridge Specification
| Property | Value |
|---|---|
| Protocol | HTTP/1.1 POST |
| Endpoint | /rng |
| Content-Type | application/json |
| Request Format | {"method":"getInteger","min":10000,"max":99999} |
| Response Format | {"number":42781} |
| Retry Strategy | 3 attempts with exponential backoff (100ms, 200ms, 400ms) |
| Timeout | 5000ms |
What the RNG Is Used For
The certified RNG generates the client_seed, a single integer in the range [10000, 99999], once per game round. This seed is one of three inputs to the provably fair hash chain.
The engine never generates its own random numbers for game outcomes. The Fisher-Yates shuffle used during deterministic replay verification is seeded from known values, not from OS entropy.
Statistical Verification
The RNG was internally re-verified on June 1, 2026. A batch of 1,000,000 random numbers was generated and subjected to 29 statistical tests across 3 standard suites. The results matched the original BMM Testlabs certification values, with all tests returning a p-value ≥ 0.01 (99% confidence interval).
Empirical Tests (7)
| # | Test | What It Measures |
|---|---|---|
| 1 | Frequency (Monobit) | Proportion of 0s vs 1s in bitstream |
| 2 | Serial Correlation | Correlation between consecutive values |
| 3 | Runs (Wald-Wolfowitz) | Runs of consecutive identical bits |
| 4 | Gap | Distance between occurrences of a target digit |
| 5 | Coupon Collector | Draws until all values in a range appear |
| 6 | Subsequences | Uniformity within blocks |
| 7 | Poker | Chi-square test on k-tuple patterns |
Diehard Tests (7)
| # | Test | What It Measures |
|---|---|---|
| 1 | Binary Rank 32×32 | Rank of 32×32 binary matrices over GF(2) |
| 2 | Binary Rank 6×8 | Rank of 6×8 binary matrices |
| 3 | Birthday Spacings | Clustering detection (birthday paradox) |
| 4 | Bitstream | Overlapping 20-bit word counts |
| 5 | Count The 1's | Distribution of 1s in bytes |
| 6 | Runs (Diehard) | Ascending and descending runs |
| 7 | Squeeze | Overlapping sums uniformity |
NIST SP 800-22 Tests (15)
| # | Test | NIST Section | What It Measures |
|---|---|---|---|
| 1 | Approximate Entropy | §2.2 | Frequency of overlapping m-bit patterns |
| 2 | Block Frequency | §2.2 | Proportion of 1s within M-bit blocks |
| 3 | Cumulative Sums | §2.13 | Random walk maximum excursion |
| 4 | Discrete Fourier Transform | §2.6 | Periodic features in bit sequence |
| 5 | Frequency (Monobit) | §2.1 | NIST variant of monobit test |
| 6 | Linear Complexity | §2.10 | LFSR length needed to generate sequence |
| 7 | Longest Run of Ones | §2.4 | Longest run of 1s within M-bit blocks |
| 8 | Non-Overlapping Template | §2.7 | Occurrences of non-periodic patterns |
| 9 | Overlapping Template | §2.8 | Occurrences of patterns (allows overlap) |
| 10 | Random Excursions | §2.14 | Visits to states in cumulative sum walk |
| 11 | Random Excursions Variant | §2.15 | Variant of excursions test |
| 12 | Binary Matrix Rank | §2.5 | Rank of disjoint sub-matrices |
| 13 | Serial | §2.11 | Frequency of overlapping m-bit patterns |
| 14 | Runs | §2.3 | NIST variant of runs test |
| 15 | Universal (Maurer's) | §2.12 | Compressibility of sequence |
Threshold
All tests use p-value ≥ 0.01 as the passing criterion, per NIST SP 800-22 §1.1.2 and BMM Testlabs standards. A p-value below 0.01 indicates the sequence is non-random with 99% confidence.
Certification Documents
The official BMM Testlabs Certification Report (which includes the Certificate of Compliance and the full Statistical Analysis Report) is available upon request.