The Modular Exponentiation can be carried out efficiently through
repeated squaring.
The Java applet below makes use of the BigInteger class
and thus should handle arbitrarily large integers.
If you find a case in which the applet fails to function or gives
erroneous results, please send me the values of the Base,
Exponent, and Modulus
which you entered and the contents of your Java console.
My modest goal is to have this applet run reliably and accurately.