Solved

rsa in Visual C++

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to convert c++ code to Android App 3 109
convert char array to number in c 5 86
I could not build boost code, 10 95
VS2015 Redefinition errors 4 71
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

830 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