Fast exponent mod