powModOdd
Computes modular exponentiation for odd modulus using sliding window binary exponentiation with regular modular reduction.
Security: NOT constant-time - see powMod. The exponent must be treated as public, or blinded, whenever it is secret.
Parameters
base | The base value |
exp | The exponent |
mod | The modulus (must be odd and positive) |
Returns
base^exp mod mod