Hello folks,
I m trying to simulate the RSA algorithm.
This is some of my code:
System.out.println((int)Math.pow(6, 5) % 119);
System.out.println((int)Math.pow(41, 77) % 119);
The first results in 41 while the second results in -9 when the expected shud be 6.
Whats wrong?