3 ms·
As I understand it, yes your basically correct. Imagine a function like this: def init_prng(int x): state = x def prng(): state = md5(state)
by mox1 13y ago
As I understand it, yes your basically correct.
Imagine a function like this:
def init_prng(int x):
state = x
def prng():
state = md5(state)
return state
So while this is a good, simple PRNG its very recoverable if you know the initial x (or if the space of possible x values is small, ie a 32-bit number). One of the goals of a PRNG function is to extend the usefulness of truly random data, because fully random data is hard to come by.