public interface IEncryptionUnit extends IToken
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decryptExternalPrivate(byte[] sessionKey,
java.lang.String symmAlgOID,
byte[] symmAlgParams,
byte[] privateKey)
Decrypts the external private key (private key from the end-user).
|
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).
|
byte[] |
decryptInternalPrivate(byte[] wrappedPrivateData)
Decrypts the internal private key (private key from the KRA's
internal storage).
|
byte[] |
encryptInternalPrivate(byte[] rawPrivate)
Encrypts the internal private key (private key to the KRA's
internal storage).
|
java.security.PublicKey |
getPublicKey()
Retrieves the public key in this unit.
|
org.mozilla.jss.crypto.SymmetricKey |
unwrap_sym(byte[] encSymmKey,
org.mozilla.jss.crypto.SymmetricKey.Usage usage)
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.PrivateKey |
unwrap(byte[] privateKey,
java.security.PublicKey pubKey)
Unwraps data.
|
org.mozilla.jss.crypto.PrivateKey |
unwrap(byte[] sessionKey,
java.lang.String symmAlgOID,
byte[] symmAlgParams,
byte[] privateKey,
java.security.PublicKey pubKey)
Unwraps data.
|
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(byte[] wrappedKeyData,
org.mozilla.jss.crypto.SymmetricKey.Type algorithm,
int keySize)
Unwraps symmetric key data.
|
void |
verify(java.security.PublicKey publicKey,
org.mozilla.jss.crypto.PrivateKey privateKey)
Verifies the given key pair.
|
byte[] |
wrap(org.mozilla.jss.crypto.PrivateKey priKey)
Wraps data.
|
byte[] |
wrap(org.mozilla.jss.crypto.SymmetricKey symKey)
Wraps data.
|
java.security.PublicKey getPublicKey()
byte[] wrap(org.mozilla.jss.crypto.PrivateKey priKey)
throws EBaseException
priKey - private key to be wrappedEBaseException - failed to wrapbyte[] wrap(org.mozilla.jss.crypto.SymmetricKey symKey)
throws EBaseException
symKey - symmetric key to be wrappedEBaseException - failed to wrapvoid verify(java.security.PublicKey publicKey,
org.mozilla.jss.crypto.PrivateKey privateKey)
throws EBaseException
publicKey - public keyprivateKey - private keyEBaseExceptionorg.mozilla.jss.crypto.PrivateKey unwrap(byte[] sessionKey,
java.lang.String symmAlgOID,
byte[] symmAlgParams,
byte[] privateKey,
java.security.PublicKey pubKey)
throws EBaseException
sessionKey - session key that unwrap the private keysymmAlgOID - symmetric algorithmsymmAlgParams - symmetric algorithm parametersprivateKey - private key datapubKey - public keyEBaseException - failed to unwraporg.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 EBaseException
symmAlgOID - symmetric algorithmsymmAlgParams - symmetric algorithm parameterspubKey - public keytransportCert - transport certificateEBaseException - failed to unwraporg.mozilla.jss.crypto.SymmetricKey unwrap(byte[] wrappedKeyData,
org.mozilla.jss.crypto.SymmetricKey.Type algorithm,
int keySize)
throws EBaseException
wrappedKeyData - symmetric key data wrapped up with session keyEBaseException - failed to unwraporg.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 EBaseException
sessionKey - session key that unwrap the symmetric keysymmAlgOID - symmetric algorithmsymmAlgParams - symmetric algorithm parameterssymmetricKey - symmetric key datatype - symmetric key algorithmstrength - symmetric key strength in bytesEBaseException - failed to unwraporg.mozilla.jss.crypto.SymmetricKey unwrap_sym(byte[] encSymmKey,
org.mozilla.jss.crypto.SymmetricKey.Usage usage)
encSymmKey - wrapped symmetric key to be unwrappedorg.mozilla.jss.crypto.PrivateKey unwrap(byte[] privateKey,
java.security.PublicKey pubKey)
throws EBaseException
privateKey - private key datapubKey - public key objectEBaseException - failed to unwrapbyte[] encryptInternalPrivate(byte[] rawPrivate)
throws EBaseException
rawPrivate - user's private key (key to be archived)EBaseException - failed to encryptbyte[] decryptInternalPrivate(byte[] wrappedPrivateData)
throws EBaseException
wrappedPrivateData - unwrapped private key data (key to be recovered)EBaseException - failed to decryptbyte[] decryptExternalPrivate(byte[] sessionKey,
java.lang.String symmAlgOID,
byte[] symmAlgParams,
byte[] privateKey)
throws EBaseException
sessionKey - session key that protects the user privatesymmAlgOID - symmetric algorithmsymmAlgParams - symmetric algorithm parametersprivateKey - private key dataEBaseException - failed to decryptbyte[] decryptExternalPrivate(byte[] sessionKey,
java.lang.String symmAlgOID,
byte[] symmAlgParams,
byte[] privateKey,
org.mozilla.jss.crypto.X509Certificate transportCert)
throws EBaseException
sessionKey - session key that protects the user privatesymmAlgOID - symmetric algorithmsymmAlgParams - symmetric algorithm parametersprivateKey - private key datatransportCert - transport certificateEBaseException - failed to decrypt