def verify1(self, credentials, session_pub_key, encrypted):
<EOL>self._shared = self._verify_private.get_shared_key(<EOL>curve25519.Public(session_pub_key), hashfunc=lambda x: x)<EOL>session_key = hkdf_expand('<STR_LIT>',<EOL>'<STR_LIT>',<EOL>self._shared)<EOL>chacha = chacha20.Chacha20Cipher(session_key, session_key)<EOL>decrypted_tlv = tlv8.read_tlv(<EOL>chacha.decrypt(encrypted, nounce='<STR_LIT>'.encode()))<EOL>identifier = decrypted_tlv[tlv8.TLV_IDENTIFIER]<EOL>signature = decrypted_tlv[tlv8.TLV_SIGNATURE]<EOL>if identifier != credentials.atv_id:<EOL><INDENT>raise Exception('<STR_LIT>')  <EOL><DEDENT>info = session_pub_key +bytes(identifier) + self._verify_public.serialize()<EOL>ltpk = VerifyingKey(bytes(credentials.ltpk))<EOL>ltpk.verify(bytes(signature), bytes(info))  <EOL>device_info = self._verify_public.serialize() +credentials.client_id + session_pub_key<EOL>device_signature = SigningKey(credentials.ltsk).sign(device_info)<EOL>tlv = tlv8.write_tlv({tlv8.TLV_IDENTIFIER: credentials.client_id,<EOL>tlv8.TLV_SIGNATURE: device_signature})<EOL>return chacha.encrypt(tlv, nounce='<STR_LIT>'.encode())<EOL>
First verification step.