473,466 Members | 1,378 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 3812
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: D. Alvarado | last post by:
On my Fedora Core 2 Linux dev box, I have installed mcrypt and compiled PHP with the --with-mcrypt option. I am concerned that when I move to another hosting enviornment mcrypt will not be...
1
by: Jase H | last post by:
Hello, I have a ASP.NET web application problem involving the data encryption and decryption assembly(DLL) used on the connection string value that is set in the webconfig file. The problem...
1
by: Martin | last post by:
Hi Im trying to make a Client/Server where im going to encrypt the stream but i cant get it to work. I can recieve and send as long as im not trying to send/recieve encrypted. but when i am i cant...
2
by: sushant.bhatia | last post by:
Hi All. I'm using the NCrypto dll for RSA Encryption/Decryption (http://sourceforge.net/projects/ncrypto/). My encryption code in .Net is pretty simple. The dataToEncrypt length is 1024. The...
2
by: almurph | last post by:
Hi everyone, Can you help me please? I am having a problem with the encryption/decryption of words with the Irish fada in them. The Irish fada is like this: áéíóú/ÁÉÍÓÚ. It's kind of like the...
1
by: BigLuzer | last post by:
hi i am using the following setup: - .net 1.1 - 2 load-balanced iis servers - DPAPI machine store. - C# - i encrypted the connection string separately, one on each machine. the error i get...
13
by: Tom Andrecht | last post by:
I'm trying to get some encryption/decryption routines going to take care of my data, and while the encryption is working great, I keep running into the message "Padding is invalid and cannot be...
5
by: Netwatcher | last post by:
well, i started messing around with dictionaries, yet, most of the pages i found about them always talk about getting only one word out of it and turning it vice versa, i've been playing with that...
9
by: Betikci Boris | last post by:
I get bored last night and wrote a script that uses xor for encrypt- decrypt, however it woks fine under linux 2.6.25, text and documents are ok, but fails on compressed files *.jpg, *.pdf , etc ....
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.