# 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$.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://crypto.stackexchange.com/questions/35136/how-to-find-e-when-p-q-d-are-given", "fetch_time": 1606800109000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2020-50/segments/1606141652107.52/warc/CC-MAIN-20201201043603-20201201073603-00611.warc.gz", "warc_record_offset": 233625086, "warc_record_length": 34214, "token_count": 257, "char_count": 755, "score": 3.765625, "int_score": 4, "crawl": "CC-MAIN-2020-50", "snapshot_type": "latest", "language": "en", "language_score": 0.7742999196052551, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00058-of-00064.parquet"}