1 Reply Latest reply on Apr 8, 2007 1:20 PM by 807599

    BigInteger modPow

      Hey all,

      Using the methods in the BigInteger class, http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html

      How would I calculate the value of: (a^x)^ -1 mod p

      a and x are both BigIntegers so I cant do this;
      BigInteger t = a.pow(x);
      BigInteger result = t.modInverse(p);