Solved

rsa in Visual C++

Posted on 2000-04-19
4
338 Views
Last Modified: 2008-03-06
I want to make a program wich encrypts a string with the rsa algorithm. Now I have the problem that long int is to short. Is there a longer type for that? I can´t use double because mod doesn´t work with that.
0
Comment
Question by:Folko
  • 2
4 Comments
 

Expert Comment

by:mathought
ID: 2732378
if __int64 does not do the work for you you must create a class that can handle really big integer numbers.
0
 

Author Comment

by:Folko
ID: 2738279
and how do i do this? can you give me an example?
0
 

Accepted Solution

by:
ewie2k earned 100 total points
ID: 2739857
Folko,

Creating such a class to handle big nums is not an easy task, especially to make it fast. SSLeay provides a good solution to that, it includes both bn.h (which is bignum library, non rsa specific) and rsa.h which is the simplest way to use rsa.

http://maga.di.unito.it/security/resources/mirrors/SSLeay/SSLeay090/index.html
0
 

Expert Comment

by:mathought
ID: 2740401
>> Creating such a class to handle big nums is not an easy task.

I couldn't agree more. But if it is that important then you have to make the effort.
I assume from your comment that __int64 is not good enough. This figures, 64 bit is strong but not the stronger there is.

Folko, I assume you don't need help with the RSA it self...
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question