def METHOD_NAME(self, response_data):
    # Interpret SessionResp0 response packet
    setup_resp = proto.session_pb2.SessionData()
    setup_resp.ParseFromString(str_to_bytes(response_data))
    self._print_verbose('Security version:\t' + str(setup_resp.sec_ver))
    if setup_resp.sec_ver != proto.session_pb2.SecScheme1:
        raise RuntimeError('Incorrect security scheme')
    self.device_public_key = setup_resp.sec1.sr0.device_pubkey
    # Device random is the initialization vector
    device_random = setup_resp.sec1.sr0.device_random
    self._print_verbose(f'Device Public Key:\t0x{self.device_public_key.hex()}')
    self._print_verbose(f'Device Random:\t0x{device_random.hex()}')
    # Calculate Curve25519 shared key using Client private key and Device public key
    sharedK = self.client_private_key.exchange(X25519PublicKey.from_public_bytes(self.device_public_key))
    self._print_verbose(f'Shared Key:\t0x{sharedK.hex()}')
    # If PoP is provided, XOR SHA256 of PoP with the previously
    # calculated Shared Key to form the actual Shared Key
    if len(self.pop) > 0:
        # Calculate SHA256 of PoP
        h = hashes.Hash(hashes.SHA256(), backend=default_backend())
        h.update(self.pop)
        digest = h.finalize()
        # XOR with and update Shared Key
        sharedK = a_xor_b(sharedK, digest)
        self._print_verbose(f'Updated Shared Key (Shared key XORed with PoP):\t0x{sharedK.hex()}')
    # Initialize the encryption engine with Shared Key and initialization vector
    cipher = Cipher(algorithms.AES(sharedK), modes.CTR(device_random), backend=default_backend())
    self.cipher = cipher.encryptor()