Package com.netscape.certsrv.security
Interface ITransportKeyUnit
- All Superinterfaces:
IEncryptionUnit
,IToken
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
Modifier and TypeMethodDescriptionbyte[]
decryptExternalPrivate
(byte[] sessionKey, 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
Retrieves public key.org.mozilla.jss.crypto.X509Certificate
Retrieves new transport certificate.org.mozilla.jss.crypto.PrivateKey
getPrivateKey
(org.mozilla.jss.crypto.X509Certificate cert) Retrieves private key associated with certificateReturns this Unit's signing algorithm in String format.org.mozilla.jss.crypto.CryptoToken
getToken()
Returns this Unit's crypto token object.void
Sets this Unit's signing algorithm.org.mozilla.jss.crypto.PrivateKey
unwrap
(byte[] encSymmKey, String symmAlgOID, byte[] symmAlgParams, byte[] encValue, PublicKey pubKey, org.mozilla.jss.crypto.X509Certificate transportCert) Unwraps data.org.mozilla.jss.crypto.SymmetricKey
unwrap_sym
(byte[] encSymmKey, org.mozilla.jss.netscape.security.util.WrappingParams params) Unwraps symmetric key .org.mozilla.jss.crypto.SymmetricKey
unwrap_symmetric
(byte[] sessionKey, String symmAlgOID, byte[] symmAlgParams, byte[] symmetricKey, org.mozilla.jss.crypto.SymmetricKey.Type type, int strength) Unwraps symmetric key .org.mozilla.jss.crypto.X509Certificate
verifyCertificate
(String transportCert) Verifies transport certificate.Methods inherited from interface com.netscape.certsrv.security.IEncryptionUnit
getOldWrappingParams, getPublicKey, unwrap_session_key, verify
-
Method Details
-
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
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
Returns this Unit's signing algorithm in String format.- Returns:
- String of signing algorithm
- Throws:
EBaseException
-
setSigningAlgorithm
Sets this Unit's signing algorithm.- Parameters:
str
- String of signing algorithm to set.- Throws:
EBaseException
-
decryptExternalPrivate
byte[] decryptExternalPrivate(byte[] sessionKey, String symmAlgOID, byte[] symmAlgParams, byte[] privateKey, org.mozilla.jss.crypto.X509Certificate transportCert) throws Exception Decrypts 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:
Exception
-
unwrap_symmetric
org.mozilla.jss.crypto.SymmetricKey unwrap_symmetric(byte[] sessionKey, String symmAlgOID, byte[] symmAlgParams, byte[] symmetricKey, org.mozilla.jss.crypto.SymmetricKey.Type type, int strength) throws Exception Unwraps 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:
Exception
-
unwrap
org.mozilla.jss.crypto.PrivateKey unwrap(byte[] encSymmKey, String symmAlgOID, byte[] symmAlgParams, byte[] encValue, PublicKey pubKey, org.mozilla.jss.crypto.X509Certificate transportCert) throws Exception Unwraps 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:
Exception
-
unwrap_sym
org.mozilla.jss.crypto.SymmetricKey unwrap_sym(byte[] encSymmKey, org.mozilla.jss.netscape.security.util.WrappingParams params) throws Exception Unwraps symmetric key . This method unwraps the symmetric key.- Parameters:
encSymmKey
- wrapped symmetric key to be unwrapped- Returns:
- Symmetric key object
- Throws:
Exception
-