def _activate_outbound(self):
m = Message()<EOL>m.add_byte(chr(MSG_NEWKEYS))<EOL>self._send_message(m)<EOL>block_size = self._cipher_info[self.local_cipher]['<STR_LIT>']<EOL>if self.server_mode:<EOL><INDENT>IV_out = self._compute_key('<STR_LIT:B>', block_size)<EOL>key_out = self._compute_key('<STR_LIT:D>', self._cipher_info[self.local_cipher]['<STR_LIT>'])<EOL><DEDENT>else:<EOL><INDENT>IV_out = self._compute_key('<STR_LIT:A>', block_size)<EOL>key_out = self._compute_key('<STR_LIT:C>', self._cipher_info[self.local_cipher]['<STR_LIT>'])<EOL><DEDENT>engine = self._get_cipher(self.local_cipher, key_out, IV_out)<EOL>mac_size = self._mac_info[self.local_mac]['<STR_LIT:size>']<EOL>mac_engine = self._mac_info[self.local_mac]['<STR_LIT:class>']<EOL>if self.server_mode:<EOL><INDENT>mac_key = self._compute_key('<STR_LIT:F>', mac_engine.digest_size)<EOL><DEDENT>else:<EOL><INDENT>mac_key = self._compute_key('<STR_LIT:E>', mac_engine.digest_size)<EOL><DEDENT>self.packetizer.set_outbound_cipher(engine, block_size, mac_engine, mac_size, mac_key)<EOL>compress_out = self._compression_info[self.local_compression][<NUM_LIT:0>]<EOL>if (compress_out is not None) and ((self.local_compression != '<STR_LIT>') or self.authenticated):<EOL><INDENT>self._log(DEBUG, '<STR_LIT>')<EOL>self.packetizer.set_outbound_compressor(compress_out())<EOL><DEDENT>if not self.packetizer.need_rekey():<EOL><INDENT>self.in_kex = False<EOL><DEDENT>self._expect_packet(MSG_NEWKEYS)<EOL>
switch on newly negotiated encryption parameters for outbound traffic