# How to find $e$ when $p,q,d$ are given?

I have solved till here ..... $$n=p*q$$ $$n=5*11$$ $$\varphi(n)=(p-1)*(q-1)=4*10=40$$ Now, how to find $e$, when $d$ is given as $27$ and message for encryption is $\text{abcdefghij}$. We have to take $a=1, b=2, c=3$ and so on.

In this RSA setting, I am assuming encryption key is $e$ and decryption key is $d$. Relationship between encryption and decryption keys is that decryption key should be multiplicative inverse of encryption key in modulo $\phi(n)$ i.e. $$d=e^{-1} \mod \phi (n)$$ So that, $$de≡1 \mod \phi(n)$$ So, our goal is to find out $e$ and we can find out this as follows: $$e=d^{-1}\mod \phi(n)=27^{-1} \mod 40=3$$ You can verify this as follows: $$27\times 3 \mod 40=81 \mod 40≡1$$ So, $e=3$.