org.bouncycastle.bcpg

Class RSASecretBCPGKey

public class RSASecretBCPGKey extends BCPGObject implements BCPGKey

base class for an RSA Secret (or Private) Key.
Constructor Summary
RSASecretBCPGKey(BCPGInputStream in)
RSASecretBCPGKey(BigInteger d, BigInteger p, BigInteger q)
Method Summary
voidencode(BCPGOutputStream out)
BigIntegergetCrtCoefficient()
return the crt coefficient
byte[]getEncoded()
return the standard PGP encoding of the key.
StringgetFormat()
return "PGP"
BigIntegergetModulus()
return the modulus for this key.
BigIntegergetPrimeExponentP()
return the prime exponent of p
BigIntegergetPrimeExponentQ()
return the prime exponent of q
BigIntegergetPrimeP()
return the prime P
BigIntegergetPrimeQ()
return the prime Q
BigIntegergetPrivateExponent()
return the private exponent for this key.

Constructor Detail

RSASecretBCPGKey

public RSASecretBCPGKey(BCPGInputStream in)

Parameters: in

Throws: IOException

RSASecretBCPGKey

public RSASecretBCPGKey(BigInteger d, BigInteger p, BigInteger q)

Parameters: d p q

Method Detail

encode

public void encode(BCPGOutputStream out)

getCrtCoefficient

public BigInteger getCrtCoefficient()
return the crt coefficient

getEncoded

public byte[] getEncoded()
return the standard PGP encoding of the key.

See Also: getEncoded

getFormat

public String getFormat()
return "PGP"

See Also: getFormat

getModulus

public BigInteger getModulus()
return the modulus for this key.

Returns: BigInteger

getPrimeExponentP

public BigInteger getPrimeExponentP()
return the prime exponent of p

getPrimeExponentQ

public BigInteger getPrimeExponentQ()
return the prime exponent of q

getPrimeP

public BigInteger getPrimeP()
return the prime P

getPrimeQ

public BigInteger getPrimeQ()
return the prime Q

getPrivateExponent

public BigInteger getPrivateExponent()
return the private exponent for this key.

Returns: BigInteger