RSA decryption exponent d (c++)
- From: "TJakobsen" <TJakobsenDK@xxxxxxxxx>
- Date: 30 Mar 2006 23:37:07 -0800
Hello all...
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 :)
TJakobsen
.
- Follow-Ups:
- Re: RSA decryption exponent d (c++)
- From: Timo Johansson
- Re: RSA decryption exponent d (c++)
- From: Ray
- Re: RSA decryption exponent d (c++)
- From: Kristian Gjøsteen
- Re: RSA decryption exponent d (c++)
- Prev by Date: Re: Explaining One-time pads?
- Next by Date: Re: RSA decryption exponent d (c++)
- Previous by thread: Factoring large composite numbers
- Next by thread: Re: RSA decryption exponent d (c++)
- Index(es):
Relevant Pages
|