Back
Quside Blog

Level 2 RNGs: Why “Good Enough” Randomness Isn’t Good Enough


29/03/2025
2 min read
Contact

Random number generators (RNGs) are the unseen engines behind everything from secure messaging to encryption keys. But not all RNGs are built the same—and not all randomness is truly unpredictable.

While Level 1 RNGs represent a clear failure in cryptographic systems (essentially producing fake randomness), Level 2 RNGs occupy a trickier space. They appear to be better—but they’re still a major security risk if misunderstood.

What Are Level 2 RNGs?

Level 2 RNGs rely on opportunistic randomness. That means they gather entropy from sources not specifically designed to produce it—things like:

  • Keyboard typing patterns
  • Mouse movements
  • Disk drive access times
  • Network packet timing
  • System clock jitter

These methods seem unpredictable. After all, no two people type exactly the same way, and network delays fluctuate constantly. But “seems random” is not the same as “unpredictable.” And in cryptography, predictability is the enemy.

Why Are These Sources Risky?

The problem with Level 2 RNGs is that they depend on systems or human behavior that can be observed, influenced, or modeled.

For example:

  • A keyboard logger could capture your keystroke timings.
  • Network traffic patterns follow daily, weekly, and seasonal rhythms.
  • Clock jitter, while seemingly chaotic, may follow patterns depending on hardware and system load.

What looks random to a human may be statistically biased or cryptographically weak when analyzed deeply.

Behavioral Biometrics: A Double-Edged Sword

One ironic twist is that some of the same characteristics used in Level 2 RNGs—like typing cadence—are also used in behavioral biometrics to identify users. If a pattern is consistent enough to authenticate someone, it’s probably not random enough for cryptography.

When Level 2 RNGs Show Up

Level 2 randomness is common in:

  • Web browsers that generate entropy from user interactions
  • Embedded systems with limited access to hardware entropy
  • Older software libraries lacking hardware RNG integration
  • Early-stage cryptographic implementations

They’re used because they’re accessible, lightweight, and easy to implement. But convenience comes at a cost.

The Danger of False Confidence

Here’s the real issue: Level 2 RNGs give developers a false sense of security.

They pass basic randomness tests. They “look” random to the naked eye. They’re often the default in common libraries.

But without validation, they leave open the possibility of:

  • Repeating key material
  • Weak session secrets
  • Predictable cryptographic tokens

And those weaknesses can be the soft underbelly attackers exploit.

NIST and the Misuse of RNG Tests

In 2022, NIST made it crystal clear: statistical test suites like SP800-22 are not designed to validate entropy sources. Yet developers routinely use them to “test” their RNGs. The result? They end up with random-looking—but not secure—output.

Without measuring entropy directly, there’s no way to be confident in the security level of a Level 2 RNG.

So, Are Level 2 RNGs Ever OK?

They can be useful—but only as supplemental sources.

Some systems combine Level 2 entropy with other inputs as part of a hybrid seeding strategy. For example, mouse movement entropy might contribute to the initial seed in a secure RNG, which is then used by a high-quality DRBG (Deterministic Random Bit Generator).

But on their own? Level 2 RNGs shouldn’t be trusted for generating:

  • Encryption keys
  • Secure session tokens
  • Digital signatures
  • Any value tied to identity or authentication

If you’re protecting sensitive data, Level 2 just isn’t enough.

Key Takeaways

  • Level 2 RNGs use uncontrolled, everyday sources like user input or system timings.
  • They are better than Level 1 (no randomness), but still risky due to bias, predictability, and environmental influence.
  • These RNGs can pass statistical tests but lack validated entropy.
  • In secure systems, they should only be used as a supplement to stronger, purpose-built entropy sources.

What Comes Next?

The natural next step is Level 3 RNGs—dedicated hardware or quantum-based systems that generate entropy from true physical processes. These devices are designed from the ground up to produce unpredictable randomness.

If Level 2 is about making do with what you have, Level 3 is about engineering for real security.