• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Massive numbers

7orqu3

New Member
Can anyone tell me how to use large numbers in excel ?

I am playing around with RSA encryption and keep getting the #NUM! error when decryption information

equations such as getting the modulus of the (29^283) by 33 can be done by the PC calculator but not by excel

anyone got any ideas ?

is there a long integer function in excel vba ?
 
Check out the XL help file "Excel specifications and limits". Under Calculation specifications and limits, you'll see a few key points (copied from XL 2007):
Feature - Maximum limit
Number precision: 15 digits
Smallest allowed negative number: -2.2251E-308
Smallest allowed positive number: 2.2251E-308
Largest allowed positive number: 9.99999999999999E+307
Largest allowed negative number: -9.99999999999999E+307
Largest allowed positive number via formula: 1.7976931348623158e+308
Largest allowed negative number via formula: -1.7976931348623158e+308

So, in dealing with RSA encryption, you typically are concerned with prime numbers. For a nice read, check out this challenge thread.
http://chandoo.org/forum/threads/fo...gest-number-you-can-confirm-is-a-prime.11019/
(note: some posted formulas got a little messed up during forum transition :( )

Specifically, this post:
http://chandoo.org/forum/threads/fo...-you-can-confirm-is-a-prime.11019/#post-65447
where I was able to confirm the largest prime number capable in XL,
999,999,999,999,989
 
Hi, 7orqu3!

Interesting issue and not easily solvable.

Maybe if you give a look at this...
http://chandoo.org/forum/threads/fo...an-confirm-is-a-prime.11019/page-2#post-65593
... you might have a glimmer of hope. But don't expect me finding that workbook in the next days, just in case.

Besides you can find this link useful, I only read them superficially and didn't test it:
http://www.excel-ticker.com/calculation-of-very-large-numbers-in-excel-part-4-exponentiation/

Excel handles long integer up in the range -2^31 to 2^31-1 but not as long as you require to perform cryptographic operations, far away from that indeed. However the highest number that Excel can handle is 10^307 so your example is too far greater than it. I.e, you won't be able to use a simple and direct function to do the job.

Regards!
 
@Luke M
Hi, my friend!
This is one of my give_a_little_help_to_my_friends day, so I'm fully doomed to good deeds... should I add "as usual"? :rolleyes:
Regards!
 
Hi, 7orqu3!
In the meanwhile if you want to play a little with VBA or table formulas you can give a look to modular arithmetic, finite fields maths and Galois Fields operations. Here you have a couple of links:
https://en.wikipedia.org/wiki/Modular_exponentiation
https://en.wikipedia.org/wiki/Finite_field_arithmetic
https://engineering.purdue.edu/kak/compsec/NewLectures/Lecture7.pdf
I used the last one to implement some processes in the project referenced here:
http://chandoo.org/forum/threads/qr-codes-iso-18004.9684/
Regards!
 
Back
Top