Class HybridRACFPrivateKey

java.lang.Object
com.ibm.crypto.ibmjcehybrid.provider.HybridRACFPrivateKey
All Implemented Interfaces:
Serializable, RSAKey, RSAPrivateCrtKey, RSAPrivateKey, Key, PrivateKey, Destroyable

public class HybridRACFPrivateKey extends Object implements RSAPrivateCrtKey, Serializable
This class represents an RSA key object that was retrieved from RACF and potentially contains both the Software JCE and IBMJCECCA representations of the key from RACF.

This key is intended to be used only by various algorithms within the IBMJCEHYBRID provider.

See Also:
  • Field Summary

    Fields inherited from interface java.security.interfaces.RSAPrivateCrtKey

    serialVersionUID
  • Constructor Summary

    Constructors
    Constructor
    Description
    HybridRACFPrivateKey(PrivateKey IBMJCECCAPrivateKey, PrivateKey softwareJCEPrivateKey)
    Constructor of this key type.
  • Method Summary

    Modifier and Type
    Method
    Description
    This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.
    This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.
    byte[]
    This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.
    This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.
    Method to get the value of the IBMJCECCA representation of this key.
    Deprecated.
    Use getSoftwareJCEPrivateKey() instead Exists for backwards compatibility since IBMJCE is not on Java 11.
    This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.
    This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.
    This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.
    This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.
    This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.
    This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.
    This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class.
    Method to get the value of the Software JCE representation of this key.
    void
    setIBMJCECCAPrivateKey(PrivateKey IBMJCECCAPrivateKey)
    Method to set the value of the IBMJCECCA representation of this key.
    void
    setIBMJCEPrivateKey(PrivateKey IBMJCEPrivateKey)
    Deprecated.
    Use setSoftwareJCEPrivateKey(PrivateKey) instead Exists for backwards compatibility since IBMJCE is not on Java 11.
    void
    setSoftwareJCEPrivateKey(PrivateKey softwareJCEPrivateKey)
    Method to set the value of the Software JCE representation of this key.
    Returns a string representation of the key in human readable format.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface javax.security.auth.Destroyable

    destroy, isDestroyed

    Methods inherited from interface java.security.interfaces.RSAKey

    getParams
  • Constructor Details

    • HybridRACFPrivateKey

      public HybridRACFPrivateKey(PrivateKey IBMJCECCAPrivateKey, PrivateKey softwareJCEPrivateKey)
      Constructor of this key type. Constructs a HybridRACFPrivateKey key given the IBMJCECCA and Software JCE representations of the key.
      Parameters:
      IBMJCECCAPrivateKey - the IBMJCECCA private key representation of this key.
      softwareJCEPrivateKey - the Software JCE private key representation of this key.
  • Method Details

    • getPublicExponent

      public BigInteger getPublicExponent()
      This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.
      Specified by:
      getPublicExponent in interface RSAPrivateCrtKey
    • getPrimeExponentQ

      public BigInteger getPrimeExponentQ()
      This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.
      Specified by:
      getPrimeExponentQ in interface RSAPrivateCrtKey
    • getPrimeExponentP

      public BigInteger getPrimeExponentP()
      This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.
      Specified by:
      getPrimeExponentP in interface RSAPrivateCrtKey
    • getPrimeQ

      public BigInteger getPrimeQ()
      This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.
      Specified by:
      getPrimeQ in interface RSAPrivateCrtKey
    • getPrimeP

      public BigInteger getPrimeP()
      This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.
      Specified by:
      getPrimeP in interface RSAPrivateCrtKey
    • getCrtCoefficient

      public BigInteger getCrtCoefficient()
      This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.
      Specified by:
      getCrtCoefficient in interface RSAPrivateCrtKey
    • getPrivateExponent

      public BigInteger getPrivateExponent()
      This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.
      Specified by:
      getPrivateExponent in interface RSAPrivateKey
    • getModulus

      public BigInteger getModulus() throws UnsupportedOperationException
      This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.
      Specified by:
      getModulus in interface RSAKey
      Throws:
      UnsupportedOperationException
    • getEncoded

      public byte[] getEncoded()
      This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.
      Specified by:
      getEncoded in interface Key
    • getFormat

      public String getFormat()
      This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.
      Specified by:
      getFormat in interface Key
    • getAlgorithm

      public String getAlgorithm()
      This function makes the equivilant underlying call to the Software JCE private key object contained within this instance of the HybridRACFPrivateKey class. This key value is set during construction or by the setSoftwareJCEPrivateKey method call. If no Software JCE private key object is available the same subsequent call will be made on the IBMJCECCA private key object. This object is also set during construction or by the set IBMJCECCAPrivateKey method.
      Specified by:
      getAlgorithm in interface Key
    • setIBMJCEPrivateKey

      @Deprecated public void setIBMJCEPrivateKey(PrivateKey IBMJCEPrivateKey) throws InvalidParameterException
      Deprecated.
      Use setSoftwareJCEPrivateKey(PrivateKey) instead Exists for backwards compatibility since IBMJCE is not on Java 11.
      Method to set the value of the Software JCE representation of this key.
      Parameters:
      softwareJCEPrivateKey - the Software JCE private key representation. This key must be either null or an instance of the ECPrivateKey or RSAPrivateKey class.
      Throws:
      InvalidParameterException
    • setSoftwareJCEPrivateKey

      public void setSoftwareJCEPrivateKey(PrivateKey softwareJCEPrivateKey) throws InvalidParameterException
      Method to set the value of the Software JCE representation of this key.
      Parameters:
      softwareJCEPrivateKey - the Software JCE private key representation. This key must be either null or an instance of the ECPrivateKey or RSAPrivateKey class.
      Throws:
      InvalidParameterException
    • getIBMJCEPrivateKey

      @Deprecated public PrivateKey getIBMJCEPrivateKey()
      Deprecated.
      Use getSoftwareJCEPrivateKey() instead Exists for backwards compatibility since IBMJCE is not on Java 11.
      Method to get the value of the Software JCE representation of this key.
      Returns:
      PrivateKey which represents the Software JCE portion of this key.
    • getSoftwareJCEPrivateKey

      public PrivateKey getSoftwareJCEPrivateKey()
      Method to get the value of the Software JCE representation of this key.
      Returns:
      PrivateKey which represents the Software JCE portion of this key.
    • setIBMJCECCAPrivateKey

      public void setIBMJCECCAPrivateKey(PrivateKey IBMJCECCAPrivateKey) throws InvalidParameterException
      Method to set the value of the IBMJCECCA representation of this key.
      Parameters:
      IBMJCECCAPrivateKey - the IBMJCECCA private key representation. This key must be either null or an instance of the com.ibm.crypto.hdwrCCA.provider.ECPrivateHWKey or com.ibm.crypto.hdwrCCA.provider.RSAPrivateHWKey class.
      Throws:
      InvalidParameterException
    • getIBMJCECCAPrivateKey

      public PrivateKey getIBMJCECCAPrivateKey()
      Method to get the value of the IBMJCECCA representation of this key.
      Returns:
      PrivateKey which represents the IBMJCECCA portion of this key.
    • toString

      public String toString()
      Returns a string representation of the key in human readable format.
      Overrides:
      toString in class Object
      Returns:
      the string that represents the key.