Skip to the log

Encryption & Data

How Random Number Generators Are Tested for Fairness in Online Casino Games

How Random Number Generators Are Tested for Fairness in Online Casino Games

RNG fairness testing is the process of proving, through statistics and independent review, that a random number generator produces outcomes with no predictable pattern and no hidden bias toward the house. You cannot verify this from your own browser or phone. What you can check is who tested the generator, what they published, and whether the operator’s claims match the documentation that tester provides.

What “RNG fairness” actually means under the hood

Before you can evaluate any claim of fairness, you need to know what the thing being tested is. A random number generator is a program that produces a stream of numbers. In casino software, that stream feeds the game’s math, mapping each result to a reels spin, a card, a dice face or a spin of Roulette.

The first thing to understand is that the stream is almost never true physical randomness. Under industrial standards such as NIST SP 800-90A, most random number generator constructions are mandated to use pseudorandom generators, or PRNGs. A PRNG is a deterministic algorithm that takes a starting value, called a seed, and expands it into a long sequence of numbers that behave statistically like random values. Given the same seed, the same algorithm produces the same sequence every time. That deterministic property makes testing possible. You can replay a stream and measure it.

The second thing to understand is a conversion step. Physical entropy sources and most PRNGs natively produce integers or bits, so an extra step is needed to reach the canonical uniform distribution between 0 and 1, which is what game math consumes. That conversion step is itself a source of subtle bias if it is done badly. A generator can pass raw bit tests and still fail here, which is why a full test battery examines the final output together with the core engine.

Fairness, then, is not a single property. The claims include an unpredictable seed, a stream that passes statistical batteries, a mapping from stream to game outcome that matches the published paytable, and code that nobody touched between the test and the day you played. Each claim is checked differently, and each can fail independently.

Illustration for the section What RNG fairness actually means under the hood
What RNG fairness actually means under the hood, shown in a realistic scene.

How a PRNG gets seeded in the first place

A PRNG is only as unpredictable as the seed it starts from. If an attacker can guess or control the seed, the entire stream becomes predictable, no matter how good the algorithm is.

Good practice seeds from a hardware entropy source, often a hardware random number generator that measures physical noise. In a server environment, seeds are typically combined from system entropy, timestamps with high precision and other environmental inputs. The point is that the seed value should not be reachable by anyone outside the operator’s infrastructure.

This is where my threat model instinct kicks in. Ask who could influence the seed. A player at a live dealer table influencing the shuffle is one story; a developer who knows the seeding routine and can read process state is a different and much harder story. The first is testable by watching the shuffle procedure; the second depends on access control and falls outside statistical testing.

What statistical test batteries actually measure

Once you have a stream, you hand it to a test suite. Two classic names are worth knowing because they come up in every serious discussion.

The Diehard tests, developed by George Marsaglia, were first published in 1995 on a CD-ROM of random numbers. In 2006 the original Diehard tests were extended into the dieharder tests. A later and more demanding library, TestU01, was introduced in 2007 by Pierre L’Ecuyer and Richard Simard. These batteries run overlapping checks on long sequences. They examine gaps between repeats, birthday spacings, overlapping permutations, and more.

These checks can be very specific. One Diehard test analyzes sequences of five consecutive random numbers, where the 120 possible orderings should occur with equal probability. If your generator produces five-number windows where, say, strict ascending order shows up more often than the math predicts, the test flags it. That kind of bias might never show up in a short manual sample, but it can matter over a large number of spins.

Monitors displaying random number sequences and a distribution histogram
Statistical batteries run millions of values through checks for gaps, orderings and distribution drift.

What a test result does and does not tell you

A passed statistical battery tells you the generator output, over the sampled sequence, was statistically indistinguishable from random within the sensitivity of the tests. It does not tell you the game’s paytable matches the published one. It does not tell you the server code running today is the code that was tested. It does not tell you the audit was done on a build identical to the one you are playing.

Whether the code that handled your session was the audited build is something you are simply being told. You can check the certificate and the tester’s name from the operator’s own page, and you can read the tester’s published report where it is public. Whether the live production environment matches the tested one is an operational control you cannot see from the outside.

This distinction matters more than any single test name. Keep the two categories separate in your head. One covers what you can check from outside. The other covers what a statement from the operator says.

The independent audit chain, and where it stops

Independent testing of casino software usually runs through accredited labs. One example of the industry bodies involved is eCOGRA, which is accredited to test and certify information security management systems against ISO/IEC 27001:2013. That certification concerns the security management around the systems, while the fairness of each game’s math is a separate piece of work.

The typical chain looks like this. The supplier builds the game and the RNG. A lab or auditor gets a build. The auditor runs statistical tests on the RNG, verifies the mapping from generator output to game outcome against the design, and sometimes runs a large simulation to compare achieved return-to-player against the design. The auditor issues a certificate and, in many programs, publishes a summary. The operator displays the certificate.

Printed audit certificate and technical reports on a table
A certificate name and date can be checked from outside; the code behind it stays on the operator's side.

Where the chain stops is at the border of the operator’s infrastructure. Whether the operator’s servers run the audited build, whether patches are re-audited, and whether the randomness in a specific live session used the audited generator are all inside claims. You can verify the tester’s existence and reputation, and you can compare reported return-to-player figures with your own session history over time. You cannot verify in real time that the generator is behaving as tested.

For the security layer around that infrastructure, the site has related background in Data Privacy in Online Gambling and What Players Should Know Before Signing Up and How Online Casinos Use Encryption to Keep Player Data Safe. Neither of those replaces an RNG audit, but together they cover the parts of the system that can fail around the generator.

A practical checklist you can actually run

You are not going to run TestU01 yourself against a casino server. What you can do is a due-diligence pass on the claims. Here is a procedure, in order.

  1. Find the published certificate name and testing body on the operator’s own pages. Note the exact name of the certifier and the standard or framework it cites.
  2. Read the tester’s public report or summary page. Check whether it covers the specific game type you play, not just the platform in general.
  3. Check whether the certificate date predates the release of the game version you are playing, and whether a newer certificate exists.
  4. Compare the reported return-to-player for the game with your own long-run session records. Small samples tell you nothing; treat any figure as an estimate over many sessions.
  5. Look at the seeding and randomness claims for the product type you play. Slots usually draw from a server PRNG; live dealer tables from a physical shuffle that uses a separate machine, so the audit chain is different.
  6. For encrypted connections and data handling, confirm the operator publishes which TLS versions and protocols it accepts, and note that the rest of the claim about internal storage is a statement.
  7. If the operator cannot tell you which lab audited which game, that is the answer to your question.
A practical checklist you can actually run
1Find the published certificate name
2Read the tester's public report or summary page
3Check whether the certificate date predates the release of the game version you are playing.
4Compare the reported return-to-player for the game with your own long-run session records.
5Look at the seeding
6For encrypted connections and data handling, confirm the operator publishes which TLS versions and protocols it accepts.
7If the operator cannot tell you which lab audited which game, that is the answer to your question.
The steps from this section at a glance.

None of these steps prove the generator is fair. Together they tell you whether the operator’s own claims are internally consistent and checkable by someone who is not the operator.

Where the check-and-claim split really hurts

The uncomfortable part of RNG fairness testing is that the testing happens in a lab on a build, and the playing happens on a server you cannot access. Every gap between those two points is a claim.

That does not make the audits worthless. A lab that specifically tests generators against a battery including Diehard-derived tests and TestU01-class checks is doing real work, and its public record is checkable. It means the operator’s evidence has a shape you can inspect. What it cannot do is reach through the screen.

The same boundary appears in other parts of online casinos. In Live Dealer Games and How a Real Croupier Ends Up on Your Screen, the randomness story is a physical shuffle procedure with a machine and a person, which is a different audit chain from a server PRNG. The questions you should ask change with the product type, while the split between checkable and claimed stays the same.

RNG fairness testing FAQ

Can I test a casino’s RNG myself?

Not against the operator’s live server. You can take any published sequence or describe the generator’s output if a lab has published samples, and run public test batteries on that data. What you cannot do is pull the stream the casino used during your session. Treat any personal test as a check of the published material, not of the live system.

Does a passed test mean the game pays what it says?

No. A statistical battery checks whether the number stream is random. The mapping from that stream to game outcomes and the published paytable is a separate verification step, done by the auditor against the game design. Those two checks together are what a game certificate usually covers.

What is the difference between PRNG and true randomness?

A PRNG is a deterministic algorithm expanded from a seed, and given the same seed it replays the same stream. True randomness comes from physical entropy sources. Casino systems typically use a PRNG seeded from hardware entropy, which combines reproducibility for testing with unpredictability for players.

How long do the statistical tests need to run?

Long enough to catch rare biases. A five-number ordering test above becomes meaningful only over a long sequence, and the larger libraries run multiple test classes over very long streams. The exact lengths are decided by the lab and the standard it uses, so ask the tester or read the report rather than assuming a number.

Who is responsible for re-testing after a game update?

That depends on the operator and the supplier’s agreement with the testing body. A responsible operator re-submits material changes for review. You can check whether a certificate’s date is older than the game version you are playing, but whether a specific patch was re-tested is a claim held on the operator’s side.

Elsewhere in the log

  1. Game Integrity

    Live Dealer Games: How a Real Croupier Ends Up on Your Screen

    There is a strange moment the first time you play a live dealer game online. You are sitting at home, and a person in a studio…

  2. Encryption & Data

    Data Privacy in Online Gambling: What Players Should Know Before Signing Up

    Online gambling platforms collect extensive personal data from users, creating significant privacy implications that require careful consideration. The global online gambling market is predicted to reach…

  3. The Role of Independent Audits in Verifying Casino Platform Security

    The global online gambling market’s trajectory toward $127.3 billion by 2027 has fundamentally transformed security verification requirements across digital casino platforms. Independent audits have evolved from…

  4. Firewalls, SSL, and DDoS Protection: A Look Inside Casino Cybersecurity

    The digital fortress protecting modern online casinos has never been more critical. With over 261 million attacks on the gambling industry in 2020, representing a staggering…

18+ only. Nothing here is a recommendation to gamble. If it stops being fun, GamCare and BeGambleAware are free and confidential.

© 2026 artweekender.com