How to solve an RSA decryption problem using subsitution?

89 Views Asked by At

I am having a lot of trouble understanding the following RSA question,

$A$ and $B$ use RSA with the same $n=47 \cdot 71$, and $e_A= 11$, $e_B= 9$, respectively.

$A$ knows $n$, $d_A, e_A, e_B$ only. Show how $A$ can read 234 sent by $B$.

Here is my logic,

$$\varphi(n) = (47-1)(71-1) = 3220$$

Generally, we would want to find dB so we can solve $234^{d_B} \bmod (\varphi(n))$ in order to get the original message.

Here however $A$ does not know $d_B$ so we can't do that, so how could we solve such a problem?

I have only learnt the basics of RSA encryption so I am not sure how to proceed, I know we can calculate $d_A$ quite easily since $e_A.d_A = 1\bmod(\varphi)$ and so $d_A = 11^{-1} \bmod 3220$, which gives $d_A = 1171$. I just dont see how that is helpful in finding $d_B$

The problem above can only be solved using a substitute for $\phi(n)$, could someone explain how we substitute $\varphi(n)$ to solve this.

1

There are 1 best solutions below

0
On BEST ANSWER

If A knows the common $n$, his own $d_a, e_a$ and the public exponent $e_b$, then there are several routes:

  • A can factor $n$ because he knows both $e_a$ and $d_a$ (standard fact) and so knows $\phi(n)$. Weirdly enough your exercise already gives you the factorisation, which trivialises the exercise completely. $d_b$ is then trivially computable, and A can decrypt B's message. In other comments you say this is "not allowed" but it's all computable from the data that is given so I hold it is allowed (and is probably the intended solution by the proposer).

  • Because $n$ is trivially small you can compute $x^{e_b} \pmod {n}$ for all $x < n$ until we have a match for $243$. This gives $x=1550$ almost instantly ( I tried). This doesn't even need the fact that A and B have the same modulus, which strengthens my assertion that we do need the factorisation of $n$ or equivalently the knowledge of $\phi(n)$ that A has.