I've made an implementation of a linear RNG. It has two constants: b and p. Every time new value of a is generated. Every time a value of x is also generated secretly.
The generator computes the number c as following:
(a * x + b) mod p == c
All values of a b x p are 256-bit numbers and additionaly p is prime. I assume the attacker knows the value of p and knows a bunch of (eg. 10) values of ai and ci computed on the generator as following:
(a1 * x1 + b) mod p == c1
(a2 * x2 + b) mod p == c2
and so on. Values of x remain unknown to the attacker and are rather cryptographically random.
My question is: when the attacker has these pairs of known values is it possible for him to calculate the value of b? If yes, how?