| java.lang.Object org.apache.derby.client.am.EncryptionManager
EncryptionManager | public class EncryptionManager (Code) | | |
Method Summary | |
public byte[] | decryptData(byte[] cipherText, int securityMechanism, byte[] initVector, byte[] targetPublicKey) | public byte[] | encryptData(byte[] plainText, int securityMechanism, byte[] initVector, byte[] targetPublicKey) | public byte[] | generateSeed() This method generates an 8-Byte random seed for the client (source). | public byte[] | obtainPublicKey() | public void | resetSecurityKeys() | public void | setInitVector(byte[] initVector) | public void | setSecKey(byte[] secKey) | public byte[] | substitutePassword(String userName, String password, byte[] sourceSeed_, byte[] targetSeed_) Strong Password Substitution (USRSSBPWD). |
SHA_1_DIGEST_ALGORITHM | final public static String SHA_1_DIGEST_ALGORITHM(Code) | | |
decryptData | public byte[] decryptData(byte[] cipherText, int securityMechanism, byte[] initVector, byte[] targetPublicKey) throws SqlException(Code) | | |
encryptData | public byte[] encryptData(byte[] plainText, int securityMechanism, byte[] initVector, byte[] targetPublicKey) throws SqlException(Code) | | |
generateSeed | public byte[] generateSeed()(Code) | | This method generates an 8-Byte random seed for the client (source).
a random 8-Byte seed. |
obtainPublicKey | public byte[] obtainPublicKey()(Code) | | |
resetSecurityKeys | public void resetSecurityKeys()(Code) | | |
setInitVector | public void setInitVector(byte[] initVector)(Code) | | |
setSecKey | public void setSecKey(byte[] secKey)(Code) | | |
substitutePassword | public byte[] substitutePassword(String userName, String password, byte[] sourceSeed_, byte[] targetSeed_) throws SqlException(Code) | | Strong Password Substitution (USRSSBPWD).
This method generate a password subtitute to send to the target
server.
Substitution algorithm works as follow:
PW_TOKEN = SHA-1(PW, ID)
The password (PW) and user name (ID) can be of any length greater
than or equal to 1 byte.
The client generates a 20-byte password substitute (PW_SUB) as follows:
PW_SUB = SHA-1(PW_TOKEN, RDr, RDs, ID, PWSEQs)
w/ (RDs) as the random client seed and (RDr) as the server one.
See PWDSSB - Strong Password Substitution Security Mechanism
(DRDA Vol.3 - P.650)
Parameters: userName - The user's name Parameters: password - The user's password Parameters: sourceSeed_ - random client seed (RDs) Parameters: targetSeed_ - random server seed (RDr) a password substitute. |
|
|