Code example for BigInteger

Methods: compareTo, modInverse, subtract

0
            p = q;
            q = tmp;
        } 
 
        this.d = new MPInteger(d);
        this.p = new MPInteger(p);
        this.q = new MPInteger(q);
        this.u = new MPInteger(p.modInverse(q));
 
        expP = d.remainder(p.subtract(BigInteger.valueOf(1)));
        expQ = d.remainder(q.subtract(BigInteger.valueOf(1)));
        crt = q.modInverse(p);
    } 
     
    /** 
     * return the modulus for this key. 
     *  
     * @return BigInteger 
     */ 
    public BigInteger getModulus()
    {