Skip to main content
3 of 4
added 26 characters in body

How to compute $m$ value from RSA if $phi(n)$ is not relative prime with the $e$?

Here is some information we got :

We know the value of $n$ , with size 1043.

We know the value of $p$ (size 20) and $q$ (size 1023) as the factors.

$e$ = 65537.

$phi(n)$ = $(q-1)*(p-1)$

When i calculated GCD and modinv, i got :

GCD($e$,$phi(n)$) = 65537

$modinv(e,phi(n)) = 1 $

So we can tell that they are not relatively prime.

So, how to compute the d, and get the value of m?

I'm not that good with math, so i cant understanding well the theory.

so can anyone please make an example implementation or write the clear forumula please?

Thanks.