My teacher challenged us to find out which seed was used to generate some random numbers. I would like to know if it is possible to decipher the seed using the generated numbers (break the linear congruence algorithm). If possible, I ask you to explain how to do it.
-
$\begingroup$ how much do you know about the algo and the sample start point? $\endgroup$ – dandavis Mar 6 '20 at 20:29
-
$\begingroup$ If you know it is a linear congruence algorithm, then yes. Look for example this question and my answer to it for a how-to. $\endgroup$ – Lery Apr 5 '20 at 19:02
If the RNG is cryptographically strong, then you should not be able to do any better than the naive brute force: try each seed until you get matching random numbers.
If this is a homework question, then I would guess that either they used a very small seed (like "3" or "15"), or the RNG is not cryptographic strength and with some time analyzing the linear congruence algorithm, you might see how to invert it.