Implemented own ModPow for BigInteger.