org.bouncycastle.jce.provider

Class JCERSAPrivateCrtKey

Implemented Interfaces:
RSAPrivateCrtKey, RSAPrivateKey, PKCS12BagAttributeCarrier

public class JCERSAPrivateCrtKey
extends JCERSAPrivateKey
implements RSAPrivateCrtKey

A provider representation for a RSA private key, with CRT factors included.

Field Summary

Fields inherited from class org.bouncycastle.jce.provider.JCERSAPrivateKey

modulus, privateExponent

Method Summary

boolean
equals(Object o)
BigInteger
getCrtCoefficient()
return the CRT coefficient.
byte[]
getEncoded()
Return a PKCS8 representation of the key.
String
getFormat()
return the encoding format we produce in getEncoded().
BigInteger
getPrimeExponentP()
return the prime exponent for P.
BigInteger
getPrimeExponentQ()
return the prime exponent for Q.
BigInteger
getPrimeP()
return the prime P.
BigInteger
getPrimeQ()
return the prime Q.
BigInteger
getPublicExponent()
return the public exponent.
String
toString()

Methods inherited from class org.bouncycastle.jce.provider.JCERSAPrivateKey

equals, getAlgorithm, getBagAttribute, getBagAttributeKeys, getEncoded, getFormat, getModulus, getPrivateExponent, setBagAttribute

Method Details

equals

public boolean equals(Object o)
Overrides:
equals in interface JCERSAPrivateKey


getCrtCoefficient

public BigInteger getCrtCoefficient()
return the CRT coefficient.

Returns:
the CRT coefficient.


getEncoded

public byte[] getEncoded()
Return a PKCS8 representation of the key. The sequence returned represents a full PrivateKeyInfo object.
Overrides:
getEncoded in interface JCERSAPrivateKey

Returns:
a PKCS8 representation of the key.


getFormat

public String getFormat()
return the encoding format we produce in getEncoded().
Overrides:
getFormat in interface JCERSAPrivateKey

Returns:
the encoding format we produce in getEncoded().


getPrimeExponentP

public BigInteger getPrimeExponentP()
return the prime exponent for P.

Returns:
the prime exponent for P.


getPrimeExponentQ

public BigInteger getPrimeExponentQ()
return the prime exponent for Q.

Returns:
the prime exponent for Q.


getPrimeP

public BigInteger getPrimeP()
return the prime P.

Returns:
the prime P.


getPrimeQ

public BigInteger getPrimeQ()
return the prime Q.

Returns:
the prime Q.


getPublicExponent

public BigInteger getPublicExponent()
return the public exponent.

Returns:
the public exponent.


toString

public String toString()