# Math Help - Math question.

1. ## Math question.

Hello,

I hope someone can help me with this.

X=M^e mod N

from this how do we derive N if we know X, M, and e?

I am sure it is simple to do but my head is in a fog after numerous hours in all of this math.

2. Whoa, I have no idea what some of these letters are coming from? Are they all integers or what? e is usually reserved for the exponential x is usually for real numbers and m and n are usually for integers, but I am hoping you have just run out of good numbers to use and all of these are just arbitrary integers.

$a \equiv b$ mod n iff $n|(b-a)$
so if you know a,b,m all fixed integers.
you just need to choose n to be a divisor of $b^m-a$
Then you will get the desired congruence mod n
$a\equiv b^m$ (mod n)

3. Originally Posted by DarkPrognosis
Hello,

I hope someone can help me with this.

X=M^e mod N

from this how do we derive N if we know X, M, and e?

I am sure it is simple to do but my head is in a fog after numerous hours in all of this math.
Hi DarkPrognosis.

Suppose $X\ne M^e.$ If you know $X,$ $M$ and $e,$ then $N$ must be a divisor of $X-M^e.$

For example, if $X=26,\ M=2,\ e=3,$ then $X-M^e=18$ so $N$ can be 1, 2, 3, 6, 9, 18. That is, 26 is congruent to 8 modulo 1, 2, 3, 6, 9 and 18.

Unfortunately if $X=M^e$ then $N$ can be any integer, and there is no way to find out what it is without further information.

4. oh brother.

All are integers but if there is no way to reverse the formula I guess it doesn't matter.

Thanks to everyone for helping with this.