Implement a modular exponentiation method.