-4

Possible Duplicate:
How to work with big numbers in PHP?

i am developing a web app on RSA algorithm. as to make RSA more secure u have to use large numbers so here it goes.... so first i convert the alphabets (all A to Z) into their ASCII codes, i m using ord().

but the problem is the function ciphertext=m(pow)e*[mod n] in which m (message which is a number) to the power e is to be calculated now if ascii of a is 97 , and suppose e=57 then 97 to the power 57 will be huge.... i have a 32 bit laptop.

so plz tell the right data type which i should use thanks.

Community
  • 1
  • 1
Rahul Khatri
  • 287
  • 1
  • 4
  • 14

1 Answers1

0

Don't roll your own encryption.

Take a look at the OpenSSL extension, shelling out to the openssl binary, or the phpseclib if you don't have either the OpenSSL extension or binary installed.

Community
  • 1
  • 1
Charles
  • 50,943
  • 13
  • 104
  • 142