# How distinct are the meanings of the terms “CSPRNG,” “DRBG” and “stream cipher”?

Are there universal, consensus definitions for the following terms?

1. Cryptographically secure pseudo-random number generator ("CSPRNG")
2. Deterministic random bit generator ("DRBG")
3. Stream cipher

This is primarily a question about the terminology rather than the concepts (although I do not master the concepts by any means either). My confusion arises because:

• I recall seeing some reference (that I can't find again now) which equated CSPRNGs and stream ciphers, due to the fact that expanding a finite key to a long, secure keystream is basically the same problem as generating a long cryptographically-secure pseudo-random sequence from a short seed. So correspondingly, stream ciphers are sometimes used as PRNGs, as in for example Rust's ChaChaRng.
• The term "DRBG" appears to be mostly used by NIST in connection with their SP 800-90A algorithms, and which stresses safety against adversaries who can observe the state at one point in time. The key concepts here, as I understand them, are forward secrecy and periodic reseeding from external entropy sources.
• The term "CSPRNG" apparently gets used in both senses (see for example the answers to this question).
• +1. Actually, coming from the theory side I have absolutely no idea what exactly a PRNG (CS or otherwise) is, I know only pseudorandom generators. – fkraiem May 2 '16 at 1:34
• – D.W. May 2 '16 at 11:09

The definitions are not all universal and there is quite some overlap.

• The clearest definition is for PRG, which is the (synchronous) stream cipher model. A PRG maps a secret value to a long, random-looking keystream, so that an attacker cannot predict any part of the keystream from knowing other parts of it. For a precise definition, you can see the definition in Katz and Lindell (3.15 in my copy) or find the equivalent in some other textbooks.

Of course, there is the catch that most modern stream ciphers do not really fit just the PRG model (even if they are synchronous). They use an IV/nonce, allowing for multiple uses of the same key.

• NIST defines DRBG as:

• generating a sequence of bits that appear statistically random and independent
• in a deterministic manner
• from a seed (and possibly other inputs).

This sounds very much like a PRG, except for the other inputs, but they also mention access to an entropy source. It is quite vague and they also say that:

A DRBG is often called a Pseudorandom Number (or Bit) Generator.

Clearly there is overlap.

• CSPRNG is basically a catch-all term for random number generation that is cryptographically secure in some sense. I don't know that you will find a consensus on what it should mean. (Personally I would require things like reseeding and forward-secrecy, while perhaps also defining a way to map the bit sequence into random numbers, but those are not universally assumed.)

There are also ways of turning one of these into another, like the stream cipher -> RNG you mention, because these are after all requiring similar properties, if not exactly the same.