— Function: void **mpz_powm** (`mpz_t rop, const mpz_t base, const mpz_t exp, const mpz_t mod`)

— Function: void**mpz_powm_ui** (`mpz_t rop, const mpz_t base, unsigned long int exp, const mpz_t mod`)

— Function: void

Set

ropto (baseraised toexp) modulomod.Negative

expis supported if an inversebase^-1 modmodexists (see`mpz_invert`

in Number Theoretic Functions). If an inverse doesn't exist then a divide by zero is raised.

— Function: void **mpz_powm_sec** (`mpz_t rop, const mpz_t base, const mpz_t exp, const mpz_t mod`)

Set

ropto (baseraised toexp) modulomod.It is required that

exp> 0 and thatmodis odd.This function is designed to take the same time and have the same cache access patterns for any two same-size arguments, assuming that function arguments are placed at the same position and that the machine state is identical upon function entry. This function is intended for cryptographic purposes, where resilience to side-channel attacks is desired.