Package com.netscape.certsrv.security
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.X509CertificategetCertificate()Retrieves public key.org.mozilla.jss.crypto.X509CertificategetNewCertificate()Retrieves new transport certificate.org.mozilla.jss.crypto.PrivateKeygetPrivateKey(org.mozilla.jss.crypto.X509Certificate cert)Retrieves private key associated with certificatejava.lang.StringgetSigningAlgorithm()Returns this Unit's signing algorithm in String format.org.mozilla.jss.crypto.CryptoTokengetToken()Returns this Unit's crypto token object.voidsetSigningAlgorithm(java.lang.String str)Sets this Unit's signing algorithm.org.mozilla.jss.crypto.PrivateKeyunwrap(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.SymmetricKeyunwrap_sym(byte[] encSymmKey, org.mozilla.jss.netscape.security.util.WrappingParams params)Unwraps symmetric key .org.mozilla.jss.crypto.SymmetricKeyunwrap_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.X509CertificateverifyCertificate(java.lang.String transportCert)Verifies transport certificate.-
Methods inherited from interface com.netscape.certsrv.security.IEncryptionUnit
getOldWrappingParams, getPublicKey, unwrap_session_key, verify
-
-
-
-
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 EBaseExceptionReturns this Unit's signing algorithm in String format.- Returns:
- String of signing algorithm
- Throws:
EBaseException
-
setSigningAlgorithm
void setSigningAlgorithm(java.lang.String str) throws EBaseExceptionSets 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.ExceptionDecrypts the external private key (private key from the end-user).- Parameters:
sessionKey- session key that protects the user privatesymmAlgOID- symmetric algorithmsymmAlgParams- symmetric algorithm parametersprivateKey- private key datatransportCert- 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.ExceptionUnwraps symmetric key . This method unwraps the symmetric key.- Parameters:
sessionKey- session key that unwrap the symmetric keysymmAlgOID- symmetric algorithmsymmAlgParams- symmetric algorithm parameterssymmetricKey- symmetric key datatype- symmetric key algorithmstrength- 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.ExceptionUnwraps data. This method rebuilds the private key by unwrapping the private key data.- Parameters:
symmAlgOID- symmetric algorithmsymmAlgParams- symmetric algorithm parameterspubKey- public keytransportCert- transport certificate- Returns:
- private key object
- Throws:
java.lang.Exception
-
unwrap_sym
org.mozilla.jss.crypto.SymmetricKey unwrap_sym(byte[] encSymmKey, org.mozilla.jss.netscape.security.util.WrappingParams params) throws java.lang.ExceptionUnwraps symmetric key . This method unwraps the symmetric key.- Parameters:
encSymmKey- wrapped symmetric key to be unwrapped- Returns:
- Symmetric key object
- Throws:
java.lang.Exception
-
-