This method returns a polynomial in x computed modulo n @param base Integer base of the polynomial @param modulus Integer is value which is to be used to perform modulo operation over the polynomial @return Integer (((base base) - 1) % modulus)
(int base, int modulus)
| 48 | * @return Integer (((base * base) - 1) % modulus) |
| 49 | */ |
| 50 | static int g(int base, int modulus) { |
| 51 | return ((base * base) - 1) % modulus; |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * This method returns a non-trivial factor of given integer number |
no outgoing calls