Interface ITransportKeyUnit

  • All Superinterfaces:
    IEncryptionUnit, IToken

    public interface ITransportKeyUnit
    extends IEncryptionUnit
    An interface represents the transport key pair. This key pair is used to protected EE's private key in transit.
    Version:
    $Revision$, $Date$
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      byte[] decryptExternalPrivate​(byte[] sessionKey, java.lang.String symmAlgOID, byte[] symmAlgParams, byte[] privateKey, org.mozilla.jss.crypto.X509Certificate transportCert)
      Decrypts the external private key (private key from the end-user).
      org.mozilla.jss.crypto.X509Certificate getCertificate()
      Retrieves public key.
      org.mozilla.jss.crypto.X509Certificate getNewCertificate()
      Retrieves new transport certificate.
      org.mozilla.jss.crypto.PrivateKey getPrivateKey​(org.mozilla.jss.crypto.X509Certificate cert)
      Retrieves private key associated with certificate
      java.lang.String getSigningAlgorithm()
      Returns this Unit's signing algorithm in String format.
      org.mozilla.jss.crypto.CryptoToken getToken()
      Returns this Unit's crypto token object.
      void setSigningAlgorithm​(java.lang.String str)
      Sets this Unit's signing algorithm.
      org.mozilla.jss.crypto.PrivateKey unwrap​(byte[] encSymmKey, java.lang.String symmAlgOID, byte[] symmAlgParams, byte[] encValue, java.security.PublicKey pubKey, org.mozilla.jss.crypto.X509Certificate transportCert)
      Unwraps data.
      org.mozilla.jss.crypto.SymmetricKey unwrap_sym​(byte[] encSymmKey, WrappingParams params)
      Unwraps symmetric key .
      org.mozilla.jss.crypto.SymmetricKey unwrap_symmetric​(byte[] sessionKey, java.lang.String symmAlgOID, byte[] symmAlgParams, byte[] symmetricKey, org.mozilla.jss.crypto.SymmetricKey.Type type, int strength)
      Unwraps symmetric key .
      org.mozilla.jss.crypto.X509Certificate verifyCertificate​(java.lang.String transportCert)
      Verifies transport certificate.
    • Method Detail

      • getCertificate

        org.mozilla.jss.crypto.X509Certificate getCertificate()
        Retrieves public key.
        Returns:
        certificate
      • getNewCertificate

        org.mozilla.jss.crypto.X509Certificate getNewCertificate()
        Retrieves new transport certificate.
        Returns:
        certificate
      • verifyCertificate

        org.mozilla.jss.crypto.X509Certificate verifyCertificate​(java.lang.String transportCert)
        Verifies transport certificate.
        Returns:
        certificate
      • getPrivateKey

        org.mozilla.jss.crypto.PrivateKey getPrivateKey​(org.mozilla.jss.crypto.X509Certificate cert)
        Retrieves private key associated with certificate
        Returns:
        certificate
      • getToken

        org.mozilla.jss.crypto.CryptoToken getToken()
        Returns this Unit's crypto token object.
        Returns:
        CryptoToken object.
      • getSigningAlgorithm

        java.lang.String getSigningAlgorithm()
                                      throws EBaseException
        Returns this Unit's signing algorithm in String format.
        Returns:
        String of signing algorithm
        Throws:
        EBaseException
      • setSigningAlgorithm

        void setSigningAlgorithm​(java.lang.String str)
                          throws EBaseException
        Sets this Unit's signing algorithm.
        Parameters:
        str - String of signing algorithm to set.
        Throws:
        EBaseException
      • decryptExternalPrivate

        byte[] decryptExternalPrivate​(byte[] sessionKey,
                                      java.lang.String symmAlgOID,
                                      byte[] symmAlgParams,
                                      byte[] privateKey,
                                      org.mozilla.jss.crypto.X509Certificate transportCert)
                               throws java.lang.Exception
        Decrypts the external private key (private key from the end-user).
        Parameters:
        sessionKey - session key that protects the user private
        symmAlgOID - symmetric algorithm
        symmAlgParams - symmetric algorithm parameters
        privateKey - private key data
        transportCert - transport certificate
        Returns:
        private key data
        Throws:
        java.lang.Exception
      • unwrap_symmetric

        org.mozilla.jss.crypto.SymmetricKey unwrap_symmetric​(byte[] sessionKey,
                                                             java.lang.String symmAlgOID,
                                                             byte[] symmAlgParams,
                                                             byte[] symmetricKey,
                                                             org.mozilla.jss.crypto.SymmetricKey.Type type,
                                                             int strength)
                                                      throws java.lang.Exception
        Unwraps symmetric key . This method unwraps the symmetric key.
        Parameters:
        sessionKey - session key that unwrap the symmetric key
        symmAlgOID - symmetric algorithm
        symmAlgParams - symmetric algorithm parameters
        symmetricKey - symmetric key data
        type - symmetric key algorithm
        strength - symmetric key strength in bytes
        Returns:
        Symmetric key object
        Throws:
        java.lang.Exception
      • unwrap

        org.mozilla.jss.crypto.PrivateKey unwrap​(byte[] encSymmKey,
                                                 java.lang.String symmAlgOID,
                                                 byte[] symmAlgParams,
                                                 byte[] encValue,
                                                 java.security.PublicKey pubKey,
                                                 org.mozilla.jss.crypto.X509Certificate transportCert)
                                          throws java.lang.Exception
        Unwraps data. This method rebuilds the private key by unwrapping the private key data.
        Parameters:
        symmAlgOID - symmetric algorithm
        symmAlgParams - symmetric algorithm parameters
        pubKey - public key
        transportCert - transport certificate
        Returns:
        private key object
        Throws:
        java.lang.Exception
      • unwrap_sym

        org.mozilla.jss.crypto.SymmetricKey unwrap_sym​(byte[] encSymmKey,
                                                       WrappingParams params)
                                                throws java.lang.Exception
        Unwraps symmetric key . This method unwraps the symmetric key.
        Parameters:
        encSymmKey - wrapped symmetric key to be unwrapped
        Returns:
        Symmetric key object
        Throws:
        java.lang.Exception