What is the best way to detect repeating sequences of random numbers?
For example, say I got two random number generators (RNG). One of them has been tampered with and is repeating the sequence of random numbers after every N iterations. The other RNG has not been tampered with and is producing random numbers like it should.
However, one of them is repeating its output every N bytes. N can be small or very large. How to detect this in a reliable and economic way?
Is using rolling hashes (like rsync does) a viable approach?