# 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 '16 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$. – fgrieu Jan 8 '16 at 7:15