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.
Asked
Active
Viewed 130 times
0
-
how much do you know about the algo and the sample start point? – dandavis Mar 06 '20 at 20:29
-
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. – Lery Apr 05 '20 at 19:02
1 Answers
1
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.

Mike Ounsworth
- 3,627
- 1
- 18
- 28