protected void initSessionSecurity ( byte[] mk ) { this.signKey = deriveKey(mk, C2S_SIGN_CONSTANT); this.verifyKey = deriveKey(mk, S2C_SIGN_CONSTANT); if ( log.isDebugEnabled() ) { log.debug("Sign key is " + Hexdump.toHexString(this.signKey)); log.debug("Verify key is " + Hexdump.toHexString(this.verifyKey)); } this.sealClientKey = deriveKey(mk, C2S_SEAL_CONSTANT); this.sealClientHandle = Crypto.getArcfour(this.sealClientKey); if ( log.isDebugEnabled() ) { log.debug("Seal key is " + Hexdump.toHexString(this.sealClientKey)); } this.sealServerKey = deriveKey(mk, S2C_SEAL_CONSTANT); this.sealServerHandle = Crypto.getArcfour(this.sealServerKey); if ( log.isDebugEnabled() ) { log.debug("Server seal key is " + Hexdump.toHexString(this.sealServerKey)); } }
protected void initSessionSecurity ( byte[] mk ) { this.signKey = deriveKey(mk, C2S_SIGN_CONSTANT); this.verifyKey = deriveKey(mk, S2C_SIGN_CONSTANT); if ( log.isDebugEnabled() ) { log.debug("Sign key is " + Hexdump.toHexString(this.signKey)); log.debug("Verify key is " + Hexdump.toHexString(this.verifyKey)); } this.sealClientKey = deriveKey(mk, C2S_SEAL_CONSTANT); this.sealClientHandle = Crypto.getArcfour(this.sealClientKey); if ( log.isDebugEnabled() ) { log.debug("Seal key is " + Hexdump.toHexString(this.sealClientKey)); } this.sealServerKey = deriveKey(mk, S2C_SEAL_CONSTANT); this.sealServerHandle = Crypto.getArcfour(this.sealServerKey); if ( log.isDebugEnabled() ) { log.debug("Server seal key is " + Hexdump.toHexString(this.sealServerKey)); } }
Cipher arcfour = Crypto.getArcfour(ntlm2SessionKey); arcfour.update(this.masterKey, 0, 16, exchangedKey, 0); setEncryptedSessionKey(exchangedKey); Cipher rc4 = Crypto.getArcfour(userSessionKey); rc4.update(this.masterKey, 0, 16, encryptedKey, 0); setEncryptedSessionKey(encryptedKey);
Cipher arcfour = Crypto.getArcfour(ntlm2SessionKey); arcfour.update(this.masterKey, 0, 16, exchangedKey, 0); setEncryptedSessionKey(exchangedKey); Cipher rc4 = Crypto.getArcfour(userSessionKey); rc4.update(this.masterKey, 0, 16, encryptedKey, 0); setEncryptedSessionKey(encryptedKey);