I am trying to solve RSA for 2 small numbers. I can calculate n,phi and e but I always get stuck when I have to calculate d. Please help me with the same. example.
p = 3, q = 7,
n = 3*7 = 21,
phi(21)= 2*6 = 12,
e = 5
d = (5^-1) (mod 21)
or
d * 5 = k * 12 + 1 (where k is some number)
I tried to figure out the calculation of d * 5 = 25 = 5 * 12 + 1 but this is for small number is there any other way to calculate d with simple approach