Functions

x^(y^z) mod p fermat’s little theorem (x mod p)^(y^z mod (p - 1)) mod p