RSA dekrypterings eksponent d - c++
Hej eksperten :)I am working on a small RSA encryption/decryption program in a school
project (using c++) and I'm kind of stuck because i can't figure out
how to calculate the decryption exponent d.
Keep in mind that my program doesn't use very large primes - it's sort
of a bit simplified in this respect.
My main problem revolves around how to implement a calculation of d in
my program. I can't figure out how to code this. According to various
sources i've used, d is calculated like this:
d = e^-1 (mod phi(n))
As far as I have been able to find out this means that
d mod phi(n) = e^-1 mod phi(n)
But as im not that experienced in advanced mathematics i don't really
know if this is true.
Anyway can anyone explain to me how i calculate d using c++ code or
just in plain easy-to-understand mathematics?
I have used the following numbers:
p = 37
q = 89
n = p*q = 37*89 = 3293
phi(n) = (p-1)(q-1) =3168
e = 25
thx in advance :)
quote fra http://groups.google.com/group/sci.crypt/browse_thread/thread/882e816f76e2b919/9af00b698ea2b2f2#9af00b698ea2b2f2
i må gerne svare på dansk :)
TJakobsen