Solved

rsa in Visual C++

Posted on 2000-04-19
4
333 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now