# How to calculate d in RSA for my number with this [duplicate]

I took the p&q value as 61 & 53 and n=3233 e=17 d=? How to find it? Plz help me...

• This and the description of the Extended Euclidian algorithm might also help. Surprisingly, I fail to find a complete step by step answer performing $d=e^{-1}\bmod\operatorname{lcm}(p-1,q-1)$ on our site!
– fgrieu
Jan 8, 2016 at 10:39

We know $ed=1\bmod \phi(n)$.
$\phi(n)=\phi(61)\phi(53)=(60)(52)=3120$
So $17d=1\bmod 3120$. From the euclidean algorithm you can easily find "d".
• A more rigorous notations is writing $ed\equiv1\pmod{\phi(n)}$ or $ed\bmod\phi(n)=1$. Problem with $ed=1\bmod\phi(n)$ is that it can (and arguably should) be read $ed=(1\bmod\phi(n))$, that is $ed=1$. Also, $ed\equiv1\pmod{\phi(n)}$ is a sufficient condition, but is not necessary; the necessary and sufficient condition, used in PKCS#1, is $ed\equiv1\pmod{\lambda(n)}$. $d=413$ is a valid private exponent, but $17\times413\bmod3120\ne1$.
{"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": 0, "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}