Top Description Fields Constructors Methods
org.bouncycastle.bcpg

public Class RSASecretBCPGKey

extends BCPGObject
implements BCPGKey
Class Inheritance
All Implemented Interfaces
org.bouncycastle.bcpg.BCPGKey, org.bouncycastle.util.Encodable
Imports
java.io.IOException, java.math.BigInteger, org.bouncycastle.util.BigIntegers

base class for an RSA Secret (or Private) Key.

Field Summary

Modifier and TypeField and Description
pack-priv BigInteger
pack-priv MPInteger
d

pack-priv BigInteger
pack-priv BigInteger
pack-priv MPInteger
p

pack-priv MPInteger
q

pack-priv MPInteger
u

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
public BigInteger
getCrtCoefficient()

return the crt coefficient

public byte[]
public String
public BigInteger

Returns:

BigInteger
getModulus
()

return the modulus for this key.

public BigInteger
getPrimeExponentP()

return the prime exponent of p

public BigInteger
getPrimeExponentQ()

return the prime exponent of q

public BigInteger
getPrimeP()

return the prime P

public BigInteger
getPrimeQ()

return the prime Q

public BigInteger

Returns:

BigInteger
getPrivateExponent
()

return the private exponent for this key.

Field Detail

crtback to summary
pack-priv BigInteger crt
dback to summary
pack-priv MPInteger d
expPback to summary
pack-priv BigInteger expP
expQback to summary
pack-priv BigInteger expQ
pback to summary
pack-priv MPInteger p
qback to summary
pack-priv MPInteger q
uback to summary
pack-priv MPInteger u

Constructor Detail

RSASecretBCPGKeyback to summary
public RSASecretBCPGKey(BCPGInputStream in) throws IOException
RSASecretBCPGKeyback to summary
public RSASecretBCPGKey(BigInteger d, BigInteger p, BigInteger q)

Method Detail

encodeback to summary
public void encode(BCPGOutputStream out) throws IOException

Implements abstract org.bouncycastle.bcpg.BCPGObject.encode.

getCrtCoefficientback to summary
public BigInteger getCrtCoefficient()

return the crt coefficient

getEncodedback to summary
public byte[] getEncoded()

Overrides org.bouncycastle.bcpg.BCPGObject.getEncoded.

Implements org.bouncycastle.bcpg.BCPGKey.getEncoded, org.bouncycastle.util.Encodable.getEncoded.

return the standard PGP encoding of the key.

Returns:byte[]

Doc from org.bouncycastle.bcpg.BCPGKey.getEncoded.

byte[]

See Also
org.bouncycastle.bcpg.BCPGKey#getEncoded()
getFormatback to summary
public String getFormat()

Implements org.bouncycastle.bcpg.BCPGKey.getFormat.

return "PGP"

Returns:String

Doc from org.bouncycastle.bcpg.BCPGKey.getFormat.

"RAW" or "PGP"

See Also
org.bouncycastle.bcpg.BCPGKey#getFormat()
getModulusback to summary
public BigInteger getModulus()

return the modulus for this key.

Returns:BigInteger

BigInteger

getPrimeExponentPback to summary
public BigInteger getPrimeExponentP()

return the prime exponent of p

getPrimeExponentQback to summary
public BigInteger getPrimeExponentQ()

return the prime exponent of q

getPrimePback to summary
public BigInteger getPrimeP()

return the prime P

getPrimeQback to summary
public BigInteger getPrimeQ()

return the prime Q

getPrivateExponentback to summary
public BigInteger getPrivateExponent()

return the private exponent for this key.

Returns:BigInteger

BigInteger