-1

How can I decrypt a RSA encrypted message C given private key d and Phi(n)?

It is known that this is a TextBook RSA, so e is small supposedly.

I have gone through all the usual ways to decrypt RSA, however, it seems that there are little things I could do with only Phi(n).

Kim lim
  • 19
  • 2

1 Answers1

1

Phi(n) for an RSA-modulus (known to be of the form n = p*q, with p and q being primes), is simply:

φ(n) = (p-1) * (q-1)

Since p-1 and q-1 both are composite (no primes, since they will be even), you will need to iterate through all combinations of the factorization (assuming each factor to belong to p and subsequently q), which satisfy p and q being in the same magnitude. If the incremented product is not prime you may skip that combination.

You re-compute n from the assumed p and q and if decryption works you found it.

guidot
  • 5,095
  • 2
  • 25
  • 37