The background is RSA encryption. Can I use some theorem to exploit this situation?
I thought about fermats theorem but I don t know how to use it here
fermats theorem (If a and p are coprime numbers such that $a^{p−1} − 1$ is divisible by p, then p need not be prime.)