3
$\begingroup$

PRNG (Wikipedia):

"The PRNG-generated sequence is not truly random, because it is completely determined by an initial value, called the PRNG's seed (which may include truly random values)."

My questions are:

  • Is a PRNG-generated sequence with a truly random seed considered a cryptographically secure PRNG?

If not:

  • How does a CSPRNG-generated sequence differ from a PRNG-generated sequence?
$\endgroup$

1 Answer 1

6
$\begingroup$

Is a PRNG-generated sequence with a truly random seed considered a cryptographically secure PRNG?

Not necessarily. If you have a PRNG algorithm that has not been designed with security in mind then just giving it a random seed doesn't make it a Cryptographically Secure PRNG (CSPRNG). If a PRNG has not been designed to be a CSPRNG then it is extremely unlikely to be one by chance.

How does a CSPRNG-generated sequence differ from a PRNG-generated sequence?

This is a bit of a weird question since a CSPRNG is of course a PRNG. Let's compare the CSPRNG against a non-secure PRNG instead.

The output of a CSPRNG should not leak any information about previous or following outputs of the PRNG. It should be impossible to recreate the state of the PRNG (at any point in time) without recovering the seed information, which all the output depends on. This isn't a generic requirement for a PRNG. For instance, the Mersenne Twister, which does otherwise pass the Diehard tests, does allow an attacker to calculate the state vector given enough output.

A CSPRNG may have additional constraints such as a very low bias on the outputs, providing a well distributed output. It is possible to argue that these would be required for any PRNG, but PRNG's could be build for speed - providing good enough output for specific applications. Cryptographic applications generally require a very high level of unbiased, well distributed output.


Note that many CSPRNG algorithms may reseed at any time, mixing in the new seed entropy into the current state. There isn't necessarily one seed. Of course there is at least one initial seed; otherwise the CSPRNG cannot generate the initial output.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.