Skip to content

What is a CSPRNG, and where the DRBG fits

A CSPRNG is a deterministic algorithm that expands a seed into a long stream, built so that observing part of the output does not let an attacker compute the rest. In the NIST vocabulary the mechanism is a DRBG, and it sits downstream of an entropy source that seeds and reseeds it.

The construction, in order

A complete random bit generator has three parts. An entropy source produces raw bits from a physical process. A conditioning step compresses them into a full-entropy seed. A DRBG expands that seed into output, and is periodically reseeded. SP 800-90A specifies the mechanisms, SP 800-90B the entropy source, and SP 800-90C how they fit together.

None of this is a criticism of deterministic generation. A DRBG built on AES or a hash function is fast, well-analysed and entirely appropriate. The point is that its security is inherited: it is a very efficient way of turning a small amount of genuine unpredictability into a large amount of usable output, and it cannot create unpredictability that was not in the seed.

Where the interesting failures are

  • Seeding at first boot. A device that generates a key before its entropy source has produced enough output is the classic embedded failure, and it has produced duplicate keys across whole product lines.
  • Reseeding under load. A DRBG has a limit on output between reseeds. Under heavy session volume that limit arrives faster than people expect, which is where throughput stops being a vanity number.
  • State compromise. If the DRBG state leaks, everything until the next reseed is exposed. Reseeding from a live physical source is what bounds that window.
  • Forked processes and restored snapshots. Two systems continuing from the same state produce the same stream, which virtual machine images and container templates make easy to do by accident.

Why this page exists

A vendor arguing that hardware entropy matters has an obligation to describe the software half accurately rather than dismiss it. The SP 800-90 series is a coherent piece of engineering and the DRBG mechanisms in it are not the weak point. The weak point is what seeds them, how often, and whether anyone is watching. That is the entropy source question.