?
Solved

Long integers (preferably with source)

Posted on 1998-07-01
7
Medium Priority
?
184 Views
Last Modified: 2010-04-01
Hello,

I was just wondering if anyone could supply me the source code for a class or struct that allows you to implement long integers (say upwards of 20 digits).  A link to an internet site would be fine also.

I was wondering because I have an encryption program that I would like to make more secure by using long integers.  It currently uses 64 bit integers (__int64) but I would like it to be more secure than that.

Thank you very much.
0
Comment
Question by:thresher_shark
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 1167029
How about the GNU MP library?

By the way, what kind of encryption are you doing that uses 64 bit integers?
0
 
LVL 10

Accepted Solution

by:
rbr earned 150 total points
ID: 1167030
I can send you a program for integer of any size written in C. Send an email to rbr@physik.kfunigraz.ac.at
0
 
LVL 5

Expert Comment

by:yonat
ID: 1167031
There are long integer classes in many cryptographic libraries - see http://www.cs.hut.fi/crypto/software.html for pointers. My personal favorite (with a very good big integer class) is crypto++ from http://www.eskimo.com/~weidai/cryptlib.html .
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 2

Expert Comment

by:VEngineer
ID: 1167032
There are many long integer classes out there.  I guess C is cool but of course a C++ class is better than a C library because you can overload the operators which gives you more intuitive code.  If you want to write your own BigNum class (whole numbers with no definite limit), refer to Chapter 13 (Dynamic Data Types) of "C++ Program Design" by Cohoon and Davidson.  The code is all there in the text and it explains how it works and how to implement it too so you can customize it to your own needs.
0
 
LVL 2

Expert Comment

by:VEngineer
ID: 1167033
If you want a more advanced deal, definitely go with anything developed by GNU.  The source code is always provided too.
0
 
LVL 6

Author Comment

by:thresher_shark
ID: 1167034
rbr - I've sent you an email requesting the program.  It includes source code right?  The points will be awarded only if the program has the source code, otherwise, I'll have to reject it since yonat provided me with a great file.  Thanks.

ozo - Where do I get the GNU library?  Several people have mentioned it, but where do I get it?  Thanks.
      Also, I was just fiddling around with an algorithm I made.  I've never bothered getting any books on it, so I was just making one up as I went along.  It's not very secure, but I think it could be more so if I have larger integers.  It really doesn't matter that much since I'll probably never distribute it anywhere :-)

yonat - I downloaded the file you suggested.  It appears to be very comprehensive.  I haven't had time to look at it thouroughly, but I think it will be of great help.  Thank you very much.

VEngineer - Well, I guess the same goes for you as it does to ozo: Where do I get anything by GNU?  I haven't ever pursued it, so I don't know.  Thanks.
0
 
LVL 5

Expert Comment

by:yonat
ID: 1167035
For GNU stuff, see www.cygnus.com .
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

800 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