The Body in My Library › Forums › Harry’s Meeting Place › Super-fun and often extra-hard ciphers from the crowd › Reply To: Super-fun and often extra-hard ciphers from the crowd
The characters of the following text have been re-ordered using a sequence of pseudorandom numbers generated by a simple linear congruential generator. Can you recover the original text?
The form of the linear congruential generator is:
Xi = (aXi-1 + c) mod m with 0 <= xi <= m;
where the i values are sub-scripts.
a is the called the “multiplier”, c is called the “increment, and m is called the “modulus” of the generator. If c is set to zero, and, in this case, the generator is called a multiplicative generator.
In this case m is is the first prime number larger than the length of the text, c = 0. a and m are relatively prime. The linear congruential generator produces a repeating sequence of numbers. The period of a multiplicative congruential generator with multiplier a and modulus m depends on the smallest positive value of k for which
a^k = 1 mod m
In this case the period is 66.
[You told me “I think this could be a bit of a challenge” and I think that might be an understatement! I will be fascinated to see what people do with it! Harry]