1 Reply Latest reply: Apr 8, 2007 8:20 AM by 807599 RSS

    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);