java Inverse BigInteger?
<p>I know : p,b,g,</p>

<pre><code>(g^(a*b)) mod p = X
</code></pre>

<p>b,p,g is BigInteger</p>

<p>Now I want compute : <code>g^a mod p</code></p>

<pre><code>{X^(b^-1)} mod p = g^(a*b*(b^-1))) mod p = g^a mod p
</code></pre>

<p>In java <code>BigInteger</code> have only  <code>modInverse(BigInteger m)</code>
 Returns a <code>BigInteger</code> whose value is <code>(this^-1 mod m).</code></p>

<p>How to compute <code>b^-1</code> in java <code>BigInteger</code>?</p>
