I'm trying to implement the SRP Protocol for secure authentication. My problem is that when I have to calculate a ModPow of a negative number, it also returns a negative number. I know it's maybe called the remainder not the modulus but I really have to get the positive modulus to generate the correct hash.
How could I do that?