com.ibm.crypto.fips.provider
Class RSAPrivateCrtKey
- java.lang.Object
com.ibm.security.pkcsutil.PKCSDerObject
com.ibm.security.pkcs8.PrivateKeyInfo
com.ibm.crypto.fips.provider.RSAPrivateCrtKey
All implemented interfaces:
java.io.Serializable, java.lang.Cloneable, java.security.interfaces.RSAKey, java.security.interfaces.RSAPrivateCrtKey, java.security.interfaces.RSAPrivateKey, java.security.Key, java.security.PrivateKey
- public final class RSAPrivateCrtKey
- extends com.ibm.security.pkcs8.PrivateKeyInfo
- implements java.security.interfaces.RSAPrivateCrtKey, java.io.Serializable
Version:
1.00, 05/11/99
Author:
Janelle Zhang
See Also:
Field Summary
Fields inherited from class com.ibm.security.pkcs8.PrivateKeyInfo |
---|
algid, attributes, key |
Fields inherited from class com.ibm.security.pkcsutil.PKCSDerObject |
---|
provider |
Constructor Summary
Constructor and Description |
---|
RSAPrivateCrtKey(java.math.BigInteger m,java.math.BigInteger privEx,java.math.BigInteger pubEx,java.math.BigInteger p,java.math.BigInteger q,java.math.BigInteger ex1,java.math.BigInteger ex2,java.math.BigInteger co)
This constructor computes missing key values and formats key values.
|
RSAPrivateCrtKey(byte[] encoded)
Make a RSA private key from its DER encoding (PKCS #8).
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
finalize()
This function zeroizes the key so that it isn't in memory when GC is done.
|
|
getCrtCoefficient()
Returns the crtCoefficient.
|
|
getModulus()
Return the modulus.
|
|
getPrimeExponentP()
Returns the primeExponentP.
|
|
getPrimeExponentQ()
Returns the primeExponentQ.
|
|
getPrimeP()
Returns the primeP.
|
|
getPrimeQ()
Returns the primeQ.
|
|
getPrivateExponent()
Return the private exponent.
|
|
getPublicExponent()
Returns the public exponent.
|
|
parseKeyBits()
|
|
toString()
|
|
zeroize()
This function zeroizes the key so that it isn't in memory
|
Methods inherited from class com.ibm.security.pkcs8.PrivateKeyInfo |
---|
addAttribute, addAttributes, clone, decode, encode, equals, getAlgorithm, getAlgorithmId, getAttribute, getAttributes, getEncoded, getFormat, getKeyBytes, hasAttribute, hasAttributes, hashCode, parseKey, parseKey |
Methods inherited from class com.ibm.security.pkcsutil.PKCSDerObject |
---|
decode, encode, getObjectIdentifier, read, readBASE64, write, write, writeBASE64 |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.security.Key |
---|
getAlgorithm, getEncoded, getFormat |
Constructor Detail
RSAPrivateCrtKey
- public RSAPrivateCrtKey(java.math.BigInteger m,
- java.math.BigInteger privEx,
- java.math.BigInteger pubEx,
- java.math.BigInteger p,
- java.math.BigInteger q,
- java.math.BigInteger ex1,
- java.math.BigInteger ex2,
- java.math.BigInteger co)
- throws java.security.InvalidKeyException
This constructor computes missing key values and formats key values.
The slots of missing values should be BigInteger.ZERO. The parametrers
required for computation are listed below.
Throws:
java.security.InvalidKeyException
RSAPrivateCrtKey
- public RSAPrivateCrtKey(byte[] encoded)
- throws java.security.InvalidKeyException
Make a RSA private key from its DER encoding (PKCS #8).
Throws:
java.security.InvalidKeyException
Method Detail
getModulus
- public java.math.BigInteger getModulus( )
Return the modulus.
Specified by:
getModulus
in interface java.security.interfaces.RSAKey
getPrivateExponent
- public java.math.BigInteger getPrivateExponent( )
Return the private exponent.
Specified by:
getPrivateExponent
in interface java.security.interfaces.RSAPrivateKey
getPublicExponent
- public java.math.BigInteger getPublicExponent( )
Returns the public exponent.
Specified by:
getPublicExponent
in interface java.security.interfaces.RSAPrivateCrtKey
getPrimeP
- public java.math.BigInteger getPrimeP( )
Returns the primeP.
Specified by:
getPrimeP
in interface java.security.interfaces.RSAPrivateCrtKey
getPrimeQ
- public java.math.BigInteger getPrimeQ( )
Returns the primeQ.
Specified by:
getPrimeQ
in interface java.security.interfaces.RSAPrivateCrtKey
getPrimeExponentP
- public java.math.BigInteger getPrimeExponentP( )
Returns the primeExponentP.
Specified by:
getPrimeExponentP
in interface java.security.interfaces.RSAPrivateCrtKey
getPrimeExponentQ
- public java.math.BigInteger getPrimeExponentQ( )
Returns the primeExponentQ.
Specified by:
getPrimeExponentQ
in interface java.security.interfaces.RSAPrivateCrtKey
getCrtCoefficient
- public java.math.BigInteger getCrtCoefficient( )
Returns the crtCoefficient.
Specified by:
getCrtCoefficient
in interface java.security.interfaces.RSAPrivateCrtKey
toString
- public java.lang.String toString( )
Overrides:
toString
in class com.ibm.security.pkcs8.PrivateKeyInfo
parseKeyBits
- protected void parseKeyBits()
- throws java.io.IOException
Overrides:
parseKeyBits
in class com.ibm.security.pkcs8.PrivateKeyInfo
Throws:
java.io.IOException
zeroize
- public void zeroize()
This function zeroizes the key so that it isn't in memory
finalize
- protected void finalize()
This function zeroizes the key so that it isn't in memory when GC is done.
Overrides:
finalize
in class com.ibm.security.pkcs8.PrivateKeyInfo