# How to decrypt plain text x using man in the middle attack

Suppose Alice want to share a plain text $$x = 5$$ to Bob; using RSA, DHKE, and El-Gamal.

My question is if Man-in-the-middle attack is applied then weather oscar can compute/decrypt plain text in all of the algorithms if yes then let me how Oscar will decrypt the plain text using the following information

• In RSA: $$p= 3, q=11, d=7, e=3$$
• In Elgamal: $$\alpha= 2. p=29$$, Alice key $$A=3$$, Bob Key $$B=7$$
• In DHKE: $$\alpha= 2, p=29$$, Alice key $$A=3$$, Bob Key $$B=7$$

Please let me how Oscar will get the plain text $$x = 5$$

• Welcome to Cryptography. Is this homework? What have you tried so far? – kelalaka Jan 23 '19 at 20:52
• Thanks its an assignment and research problem, I have tried using RSA but can't get the plain text at Oscar end – Hafiz Siddiq Jan 23 '19 at 20:54
• You can use $\LaTeX$ here with Mathjax. Edit your question to show your work, so we can help you. – kelalaka Jan 23 '19 at 20:55