# Question: i just need the formula to get a and b...

###### Question details

I just need the formula to get a and b from two equations of the form:

R1 = (a R0 + b) mod m

R2 = (a R1 + b) mod m

if I know **R0, R1, R2** and **m**

How can I find **a and b** ?

I just need the formula to get a and b from two equations of the form:

R1 = (a R0 + b) mod m

R2 = (a R1 + b) mod m

if I know **R0, R1, R2** and **m**

How can I find **a and b** ?