# Long long problem

Page 1 of 1

## 2 Replies - 274 Views - Last Post: 02 February 2012 - 12:39 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=265179&amp;s=6f4278f7c2704a253d5876dd3472c891&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 Sinned

Reputation: 19
• Posts: 207
• Joined: 13-October 10

# Long long problem

Posted 02 February 2012 - 12:21 PM

Hello everyone,

My current project is to make my own RSA library.
The "tutorial" for this I'm following is: http://fringe.daveso...SA/Example.html
I do understand the RSA part itself, but...

I get into trouble at the calculation part.
Because I think the following number doesn't fit into a normal long:
Spoiler

The thing is, it has to calculate integers to a very high power.
(In this example it is 855 to the power of 2753)
I don't know how to fit this in anything.

Could someone tell me how to calculate numbers - which go outside the range of 64 bits?

Sinned

Is This A Good Question/Topic? 0

## Replies To: Long long problem

### #2 Ryano121

• D.I.C Lover

Reputation: 1376
• Posts: 3,015
• Joined: 30-January 11

## Re: Long long problem

Posted 02 February 2012 - 12:26 PM

You might have to use a custom BigInteger library.

A quick Google brings up loads of possibilities you could try out.

### #3 Karel-Lodewijk

Reputation: 454
• Posts: 864
• Joined: 17-March 11

## Re: Long long problem

Posted 02 February 2012 - 12:39 PM

I can confirm that numbers of this magnitude will not fit in any native type, you will have to use a big number library. I can recommend gmp (http://gmplib.org/) it's one of the fastest if not the fastest big number library around.