views:

54

answers:

2

Do we need to seed a CSPRNG with a truly random number? Examples and documentation use truly random numbers, but no justification is given (that I can find).

If we were to seed one with a pseudorandom number, I don't see what the difference would be compared to with a truly random seed. If someone finds either of the seeds, then the encryption fails anyway.

A: 

You are correct, but the idea is that it's easier to find a successive pseudorandom seed than it is to find a truly random seed. This is especially true if a lot of numbers are generated in succession really quickly (and if the seed ever changes, which it usually does).

David Titarenco
Thanks. As you say "especially true", I assume even if the PRNG takes, say, 10s to produce the number, a truly random number is still more secure.
Cromwell
A: 

Essentially, determining the seed is sufficient to determine the entire output of a pseudorandom generator.

As a result, you want a seed that isn't predictable or determinable.

Pseudorandom output is (under some circumstances as described two paragraphs ago) determinable or predictable.

Beyond that, it is a trade-off. You've already decided to use pseudorandom numbers instead of real randomness, so it is probably an acceptable trade-off in your mind.

Slartibartfast