1

Say that I developed an hardware source of randomness, which I would like to use to seed a cryptographically secure random number generator.

How would I go about testing it? Are there standardized tests that one can use to check wether or not his source of entropy is reliable enough to seed cryptographic random number generation?

For example, the guys at onerng.info claim to generate the entropy any user needs to protect his privacy and blablabla. How do they substantiate their claim? How can random number generators be verified?

e-sushi
  • 17,891
  • 12
  • 83
  • 229
Matteo Monti
  • 1,407
  • 2
  • 14
  • 19

1 Answers1

5

NIST has a statistical test suite for testing (pseudo) random number generators. There are a number of other suites as well, such as Diehard, Dieharder, and TestU01.

But all these tests can do is disprove the claim that your generator is random; they cannot prove it. So you really need, in addition, an independent argument for why your generator's output really is random. A true random number generators generally comprises of:

  • A entropy source that outputs digitized samples of a random process (but whose output may be neither uniform nor independent).
  • A nondeterministic random bit generator (NRBG) that uses the entropy source's output to produce uniform and independent random bits.

So correspondingly, you need:

  • An argument that your entropy source is random and that justifies a lower bound on its entropy rate (how random it is, per unit of time);
  • An argument that your NRBG, given the noise source's output, produces full entropy outputs (uniform and independent random bits).

And there's no "bright line" test to be had here. You don't prove that your outputs "really are random"—you prove that the processes you're using to produce your outputs are sound, that your implementation of them reliable, that your hardware resists monitoring and interference, etc. You also provide health check mechanisms and fallbacks to detect and guard against failures.

You may be interested in the NIST SP 800-90 series, which details standards for random number generators:

In particular 90B deals with the entropy sources, and parts of 90C deal with nondeterministic random bit generators (NRBGs)—algorithms designed to take the output of a noise source and produce truly random outputs.

Luis Casillas
  • 14,468
  • 2
  • 31
  • 53
  • 1
    Among the hardest things to demonstrate/ensure is that an entropy source resists/detects plausible attempts to (and mishaps that) lower its entropy rate; e.g. that a ring oscillator won't synchronize on some nearby periodic signal. – fgrieu Feb 28 '17 at 08:10