com.ibm.crypto.fips.provider

Class RSAPrivateCrtKey

  1. java.lang.Object
  2. extended bycom.ibm.security.pkcsutil.PKCSDerObject
  3. extended bycom.ibm.security.pkcs8.PrivateKeyInfo
  4. extended bycom.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

  1. public final class RSAPrivateCrtKey
  2. extends com.ibm.security.pkcs8.PrivateKeyInfo
  3. implements java.security.interfaces.RSAPrivateCrtKey, java.io.Serializable
An X.509 private crt key for the RSA Algorithm.
Version:
1.00, 05/11/99
Author:
Janelle Zhang
See Also:
Serialized Form

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
  1. protected
  2. void
finalize()
This function zeroizes the key so that it isn't in memory when GC is done.
  1. java.math.BigInteger
getCrtCoefficient()
Returns the crtCoefficient.
  1. java.math.BigInteger
getModulus()
Return the modulus.
  1. java.math.BigInteger
getPrimeExponentP()
Returns the primeExponentP.
  1. java.math.BigInteger
getPrimeExponentQ()
Returns the primeExponentQ.
  1. java.math.BigInteger
getPrimeP()
Returns the primeP.
  1. java.math.BigInteger
getPrimeQ()
Returns the primeQ.
  1. java.math.BigInteger
getPrivateExponent()
Return the private exponent.
  1. java.math.BigInteger
getPublicExponent()
Returns the public exponent.
  1. protected
  2. void
parseKeyBits()
  1. java.lang.String
toString()
  1. void
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

  1. public RSAPrivateCrtKey(java.math.BigInteger m,
  2. java.math.BigInteger privEx,
  3. java.math.BigInteger pubEx,
  4. java.math.BigInteger p,
  5. java.math.BigInteger q,
  6. java.math.BigInteger ex1,
  7. java.math.BigInteger ex2,
  8. java.math.BigInteger co)
  9. 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

  1. public RSAPrivateCrtKey(byte[] encoded)
  2. throws java.security.InvalidKeyException
Make a RSA private key from its DER encoding (PKCS #8).
Throws:
java.security.InvalidKeyException

Method Detail

getModulus

  1. public java.math.BigInteger getModulus( )
Return the modulus.
Specified by:
getModulus in interface java.security.interfaces.RSAKey

getPrivateExponent

  1. public java.math.BigInteger getPrivateExponent( )
Return the private exponent.
Specified by:
getPrivateExponent in interface java.security.interfaces.RSAPrivateKey

getPublicExponent

  1. public java.math.BigInteger getPublicExponent( )
Returns the public exponent.
Specified by:
getPublicExponent in interface java.security.interfaces.RSAPrivateCrtKey

getPrimeP

  1. public java.math.BigInteger getPrimeP( )
Returns the primeP.
Specified by:
getPrimeP in interface java.security.interfaces.RSAPrivateCrtKey

getPrimeQ

  1. public java.math.BigInteger getPrimeQ( )
Returns the primeQ.
Specified by:
getPrimeQ in interface java.security.interfaces.RSAPrivateCrtKey

getPrimeExponentP

  1. public java.math.BigInteger getPrimeExponentP( )
Returns the primeExponentP.
Specified by:
getPrimeExponentP in interface java.security.interfaces.RSAPrivateCrtKey

getPrimeExponentQ

  1. public java.math.BigInteger getPrimeExponentQ( )
Returns the primeExponentQ.
Specified by:
getPrimeExponentQ in interface java.security.interfaces.RSAPrivateCrtKey

getCrtCoefficient

  1. public java.math.BigInteger getCrtCoefficient( )
Returns the crtCoefficient.
Specified by:
getCrtCoefficient in interface java.security.interfaces.RSAPrivateCrtKey

toString

  1. public java.lang.String toString( )
Overrides:
toString in class com.ibm.security.pkcs8.PrivateKeyInfo

parseKeyBits

  1. protected void parseKeyBits()
  2. throws java.io.IOException
Overrides:
parseKeyBits in class com.ibm.security.pkcs8.PrivateKeyInfo
Throws:
java.io.IOException

zeroize

  1. public void zeroize()
This function zeroizes the key so that it isn't in memory

finalize

  1. 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