com.ibm.crypto.fips.provider

Class RSAPrivateKey

  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.RSAPrivateKey
All implemented interfaces:
java.io.Serializable, java.lang.Cloneable, java.security.interfaces.RSAKey, java.security.interfaces.RSAPrivateKey, java.security.Key, java.security.PrivateKey

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

Field Summary

Fields inherited from class com.ibm.security.pkcs8.PrivateKeyInfo
algid, attributes, key, version
Fields inherited from class com.ibm.security.pkcsutil.PKCSDerObject
provider

Constructor Summary

Constructor and Description
RSAPrivateKey(java.math.BigInteger m,java.math.BigInteger p)
Make a RSA private key.
RSAPrivateKey(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
getModulus()
Return the modulus.
  1. java.math.BigInteger
getPrivateExponent()
Return the private 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

RSAPrivateKey

  1. public RSAPrivateKey(java.math.BigInteger m,
  2. java.math.BigInteger p)
  3. throws java.security.InvalidKeyException
Make a RSA private key.
Throws:
java.security.InvalidKeyException

RSAPrivateKey

  1. public RSAPrivateKey(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

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