/** * @param in * @throws IOException */ public RSASecretBCPGKey(BCPGInputStream in) throws IOException { this.d = new MPInteger(in); this.p = new MPInteger(in); this.q = new MPInteger(in); this.u = new MPInteger(in); expP = d.getValue().remainder(p.getValue().subtract(BigInteger.valueOf(1))); expQ = d.getValue().remainder(q.getValue().subtract(BigInteger.valueOf(1))); crt = q.getValue().modInverse(p.getValue()); }
/** return the prime Q */ public BigInteger getPrimeQ() { return q.getValue(); }
/** return the prime P */ public BigInteger getPrimeP() { return p.getValue(); }
/** * return the private exponent for this key. * * @return BigInteger */ public BigInteger getPrivateExponent() { return d.getValue(); }
/** * return the modulus for this key. * * @return BigInteger */ public BigInteger getModulus() { return p.getValue().multiply(q.getValue()); }
public BigInteger getModulus() { return n.getValue(); }
public BigInteger getPublicExponent() { return e.getValue(); }