g be two functions with integer range
0..m-1. They may keep state and interact with the world (for example setting a seed or reading the current time), calling them multiple times may produce different results.
g can see each other's state, but cannot modify the other's state.
Assume at least one of
g is a cryptographically secure pseudorandom number generator, but it is unknown which one. Is it possible to create a function
h that uses
g and behaves as a CSPRNG?
h is not allowed to set or read external state directly, the only way it can modify or read state is by calling
g and observing their results.
h should work for any given
h is not allowed to use any "true" source of randomness, and ideally the construction should not involve passing randomness tests.
As a related problem, I believe that if
g were perfectly random, then
f + g (mod m) would also be perfectly random. But I think in this deterministic case, it's always possible to create a
g such that it "cancels out"
h. Not sure how to prove this.