Fast integer exponentiation is very important in cryptography. I have used Python built-in function pow() for RSA implementation, but it’s good to know what’s hidden inside.
pow()