public interface IStorageKeyUnit extends IEncryptionUnit
| Modifier and Type | Method and Description |
|---|---|
boolean |
changeAgentMN(int n,
int m,
Credential[] oldcreds,
Credential[] newcreds)
Changes M-N recovery scheme.
|
boolean |
changeAgentPassword(java.lang.String id,
java.lang.String oldpwd,
java.lang.String newpwd)
Changes agent password.
|
byte[] |
decryptInternalPrivate(byte[] wrappedPrivateData,
org.mozilla.jss.netscape.security.util.WrappingParams params)
Decrypts the internal private key (private key from the KRA's
internal storage).
|
byte[] |
encryptInternalPrivate(byte[] rawPrivate,
org.mozilla.jss.netscape.security.util.WrappingParams params)
Encrypts the internal private key (private key to the KRA's
internal storage).
|
java.util.Enumeration<java.lang.String> |
getAgentIdentifiers()
Retrieves a list of agents in this unit.
|
int |
getNoOfAgents()
Retrieves total number of recovery agents.
|
int |
getNoOfRequiredAgents()
Retrieves number of recovery agents required to
perform recovery operation.
|
org.mozilla.jss.crypto.CryptoToken |
getToken() |
org.mozilla.jss.netscape.security.util.WrappingParams |
getWrappingParams(boolean encrypt)
Get the wrapping parameters for this storage unit
|
void |
login(Credential[] ac)
Logins to this unit.
|
void |
setNoOfRequiredAgents(int number)
Sets the numer of required recovery agents
|
org.mozilla.jss.crypto.PrivateKey |
unwrap(byte[] privateKey,
java.security.PublicKey pubKey,
boolean temporary,
org.mozilla.jss.netscape.security.util.WrappingParams params)
Unwraps data.
|
org.mozilla.jss.crypto.SymmetricKey |
unwrap(byte[] wrappedKeyData,
org.mozilla.jss.crypto.SymmetricKey.Type algorithm,
int keySize,
org.mozilla.jss.netscape.security.util.WrappingParams params)
Unwraps symmetric key data.
|
byte[] |
wrap(org.mozilla.jss.crypto.PrivateKey priKey,
org.mozilla.jss.netscape.security.util.WrappingParams params)
Wraps data.
|
byte[] |
wrap(org.mozilla.jss.crypto.SymmetricKey symKey,
org.mozilla.jss.netscape.security.util.WrappingParams params)
Wraps data.
|
getOldWrappingParams, getPublicKey, unwrap_session_key, verifyint getNoOfAgents()
throws EBaseException
EBaseExceptionint getNoOfRequiredAgents()
throws EBaseException
EBaseExceptionvoid setNoOfRequiredAgents(int number)
number - number of required agentsjava.util.Enumeration<java.lang.String> getAgentIdentifiers()
boolean changeAgentPassword(java.lang.String id,
java.lang.String oldpwd,
java.lang.String newpwd)
throws EBaseException
id - agent idoldpwd - old passwordnewpwd - new passwordEBaseException - failed to change passwordboolean changeAgentMN(int n,
int m,
Credential[] oldcreds,
Credential[] newcreds)
throws EBaseException
n - total number of agentsm - required number of agents for recovery operationoldcreds - all old credentialsnewcreds - all new credentialsEBaseException - failed to change schemavoid login(Credential[] ac) throws EBaseException
ac - agent's credentialsEBaseException - failed to loginorg.mozilla.jss.crypto.CryptoToken getToken()
byte[] encryptInternalPrivate(byte[] rawPrivate,
org.mozilla.jss.netscape.security.util.WrappingParams params)
throws java.lang.Exception
rawPrivate - user's private key (key to be archived)params - wrapping parametersEBaseException - failed to encryptjava.lang.Exceptionbyte[] wrap(org.mozilla.jss.crypto.PrivateKey priKey,
org.mozilla.jss.netscape.security.util.WrappingParams params)
throws java.lang.Exception
priKey - private key to be wrappedparams - wrapping parametersEBaseException - failed to wrapjava.lang.Exceptionbyte[] wrap(org.mozilla.jss.crypto.SymmetricKey symKey,
org.mozilla.jss.netscape.security.util.WrappingParams params)
throws java.lang.Exception
symKey - symmetric key to be wrappedparams - wrapping parametersEBaseException - failed to wrapjava.lang.Exceptionbyte[] decryptInternalPrivate(byte[] wrappedPrivateData,
org.mozilla.jss.netscape.security.util.WrappingParams params)
throws java.lang.Exception
wrappedPrivateData - unwrapped private key data (key to be recovered)params - - wrapping parametersjava.lang.Exceptionorg.mozilla.jss.crypto.SymmetricKey unwrap(byte[] wrappedKeyData,
org.mozilla.jss.crypto.SymmetricKey.Type algorithm,
int keySize,
org.mozilla.jss.netscape.security.util.WrappingParams params)
throws java.lang.Exception
wrappedKeyData - symmetric key data wrapped up with session keyjava.lang.Exception - failed to unwraporg.mozilla.jss.crypto.PrivateKey unwrap(byte[] privateKey,
java.security.PublicKey pubKey,
boolean temporary,
org.mozilla.jss.netscape.security.util.WrappingParams params)
throws java.lang.Exception
privateKey - private key datapubKey - public key objecttemporary - - temporary key?params - - wrapping parametersjava.lang.Exceptionorg.mozilla.jss.netscape.security.util.WrappingParams getWrappingParams(boolean encrypt)
throws java.lang.Exception
java.lang.Exception