Question: Why do I come across a numeric overflow in (m^e) mod n

Hello,

I'm experimenting the RSA encryption algorithm and in one example, I need to calculate (m^e) mod n where :

n=4142074788597595058238933087635402958555715420375128103710780511

m=65108105099101044032

e=3467995563410655813589059428902496618444213189544232426283402949

and I receive : Error, numeric exception: overflow

Even though these are large numbers, modular arithmetic algorithms should be able to deal with that.

Why is it not the case ?

NB : One of the mathApps in the category Computer Science is "RSA Encryption" and proves to be fairly comfortable with such large numbers, no overflow!

 
Please Wait...