Main Page | Report this Page
 
   
Science Forum Index  »  Cryptography Forum  »  BigNums fpr Visual C++ .Net
Page 1 of 1    
Author Message
dotti
Posted: Sat Jan 03, 2004 2:39 pm
Guest
I'm trying to write a small demo program for RSA.
Bit the long integer is to short for needed exponential functions.
Does anyone know how to handle very large numbers in C++?

thx
dotti
Tom St Denis
Posted: Sat Jan 03, 2004 2:41 pm
Guest
"dotti" <frysixteen@hotmail.com> wrote in message
news:bt75oq$5rd$00$1@news.t-online.com...
Quote:
I'm trying to write a small demo program for RSA.
Bit the long integer is to short for needed exponential functions.
Does anyone know how to handle very large numbers in C++?

Not strictly C++ but it is C [should build in C++ mode]

http://math.libtomcrypt.org

;)

Tom
Tom St Denis
Posted: Sat Jan 03, 2004 2:41 pm
Guest
"dotti" <frysixteen@hotmail.com> wrote in message
news:bt75oq$5rd$00$1@news.t-online.com...
Quote:
I'm trying to write a small demo program for RSA.
Bit the long integer is to short for needed exponential functions.
Does anyone know how to handle very large numbers in C++?

Not strictly C++ but it is C [should build in C++ mode]

http://math.libtomcrypt.org

;)

Tom
Giuliano Bertoletti
Posted: Sun Jan 04, 2004 4:51 am
Guest
On Sat, 3 Jan 2004 20:39:05 +0100, "dotti" <frysixteen@hotmail.com>
wrote:

Quote:
I'm trying to write a small demo program for RSA.
Bit the long integer is to short for needed exponential functions.
Does anyone know how to handle very large numbers in C++?

thx
dotti


Victor Shoup's NTL is one of the best libraries available for doing
number theory. It's however distributed under a GNU license, which may
or may not suit your needs (in terms of a possible redistribution of
your program, I mean).

Consider also that's not directly related to cryptography, but only to
computer algebra.

http://www.shoup.net/

Giulio.
Brian Gladman
Posted: Sun Jan 04, 2004 5:13 am
Guest
"dotti" <frysixteen@hotmail.com> wrote in message
news:bt75oq$5rd$00$1@news.t-online.com...
Quote:
I'm trying to write a small demo program for RSA.
Bit the long integer is to short for needed exponential functions.
Does anyone know how to handle very large numbers in C++?

For a demonstration program you could use a C++ class that keeps the decimal
digits of your numbers in arrays of integers. You could then implement
school arithmetic for addition, subtraction, multiplication, division etc.
yourself using C++ operator overloading for the normal arithmetic operators.

This is not hard to do if efficiency is not an issue and the coding involved
would give you a feel for some of the real problems involved whilst also
forming a visible part of the demonstration. For demonstration purposes
this is likely to be better than using a pre-existing library since these
will generally require you to focus on issues that will divert you from your
main aim of demonstrating the operation of RSA.

My suspicion is that something like this probably already exists if you have
the patience to search for it on Google.

Brian Gladman
 
Page 1 of 1       All times are GMT - 5 Hours
The time now is Sun Oct 12, 2008 12:19 am