2 Replies - 214 Views - Last Post: 02 February 2012 - 12:39 PM Rate Topic: -----

#1 Sinned  Icon User is offline

  • D.I.C Head

Reputation: 19
  • View blog
  • 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?

Thanks in advance,

Sinned

Is This A Good Question/Topic? 0
  • +

Replies To: Long long problem

#2 Ryano121  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1362
  • View blog
  • Posts: 3,002
  • 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.
Was This Post Helpful? 1
  • +
  • -

#3 Karel-Lodewijk  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 449
  • View blog
  • Posts: 849
  • 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.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1