468,491 Members | 2,079 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,491 developers. It's quick & easy.

Calculating RSA Decryption Key

How would I write a function to calculate RSA Decryption key. I'm
trying to write an RSA encryption program, and I'm stuck on calculating
the decryption key. How do you check for coprimality? Thanks!!!!! I'm
using C++.

Aug 2 '06 #1
9 3548
DarkProtoman wrote:
How would I write a function to calculate RSA Decryption key. I'm
trying to write an RSA encryption program, and I'm stuck on
calculating the decryption key. How do you check for coprimality?
Please don't cross-post this to comp.lang.c++. Your problem has
nothing to do with the topic of c.l.c++. Thanks!
Aug 2 '06 #2
DarkProtoman wrote:
How would I write a function to calculate RSA Decryption key. I'm
trying to write an RSA encryption program, and I'm stuck on calculating
the decryption key. How do you check for coprimality?
Google for Euclidean algorithm.
Best

Kai-Uwe Bux
Aug 2 '06 #3

Kai-Uwe Bux wrote:
DarkProtoman wrote:
How would I write a function to calculate RSA Decryption key. I'm
trying to write an RSA encryption program, and I'm stuck on calculating
the decryption key. How do you check for coprimality?

Google for Euclidean algorithm.
Best

Kai-Uwe Bux
I have. But I can only find psuedocode for the Euclidean algorithm, not
the EXTENDED Euclidean algorithm which I need. Can any one here produce
the Extended Euclidean algorithm in psuedocode? Thanks!!!!!

Aug 2 '06 #4
"DarkProtoman" <Pr**********@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
>
Kai-Uwe Bux wrote:
>DarkProtoman wrote:
How would I write a function to calculate RSA Decryption key. I'm
trying to write an RSA encryption program, and I'm stuck on calculating
the decryption key. How do you check for coprimality?
Looking back a few days, reading the thread "Finding 'd' for RSA, why bother
with Extended Euclidian GCD ?" will probably be all you need.
Joe
Aug 2 '06 #5

Kai-Uwe Bux wrote:
DarkProtoman wrote:

Kai-Uwe Bux wrote:
DarkProtoman wrote:

How would I write a function to calculate RSA Decryption key. I'm
trying to write an RSA encryption program, and I'm stuck on calculating
the decryption key. How do you check for coprimality?

Google for Euclidean algorithm.
Best

Kai-Uwe Bux
I have. But I can only find psuedocode for the Euclidean algorithm, not
the EXTENDED Euclidean algorithm which I need. Can any one here produce
the Extended Euclidean algorithm in psuedocode? Thanks!!!!!

Well, if you need the extended version, google for that. First hit looks
good:

http://en.wikipedia.org/wiki/Extende...dean_algorithm

It has pseudo code.
Best

Kai-Uwe bux
I can't translate that into C++? Could you make it a little clearer?

Aug 2 '06 #6
DarkProtoman wrote:
> http://en.wikipedia.org/wiki/Extende...dean_algorithm

It has pseudo code.
Best

Kai-Uwe bux

I can't translate that into C++?
Then you should freshen up your knowledge.
Could you make it a little clearer?
I guess he could, and I guess he won't. You should try doing your
homework on your own rather than asking for pre-chewed code pieces.
And please stop your fucking cross-posting.
Aug 2 '06 #7

DarkProtoman wrote:
How would I write a function to calculate RSA Decryption key. I'm
trying to write an RSA encryption program, and I'm stuck on calculating
the decryption key. How do you check for coprimality? Thanks!!!!! I'm
using C++.
Anyone who wants to implement algorithms should have a copy of
Knuth, TAOCP. The answer to your question can be found in volume 2.

The meaning of your question about co-primality isn't clear.
Co-primality
of what? The primes are always generated so that (p-1, e) = (q-1, e)
= 1.

Aug 2 '06 #8
DarkProtoman wrote:
I can't translate that into C++? Could you make it a little clearer?
Just use a crypto library.

Mon dieu, c'est pour cette raison les projets existes!

I mean... um...

Seriously, if you can't sort out the math on your own you shouldn't be
implementing the math in something you plan on using beyond your own
lab.

That said, there are books on bignum math [hint hint] that cover the
requisit algorithms...

Tom

Aug 2 '06 #9

Sebastian Gottschalk wrote:
And please stop your fucking cross-posting.
Why?!! I'm trying to cast a wider net. Anything wrong with looking in
more than one place?!

Aug 2 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by D. Alvarado | last post: by
1 post views Thread by Jase H | last post: by
1 post views Thread by Martin | last post: by
2 posts views Thread by sushant.bhatia | last post: by
13 posts views Thread by Tom Andrecht | last post: by
9 posts views Thread by Betikci Boris | last post: by
reply views Thread by NPC403 | last post: by
3 posts views Thread by gieforce | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.