def verify2(self, atv_public_key, data):
self._check_initialized()<EOL>log_binary(_LOGGER, '<STR_LIT>', PublicSecret=atv_public_key, Data=data)<EOL>public = curve25519.Public(atv_public_key)<EOL>shared = self._verify_private.get_shared_key(<EOL>public, hashfunc=lambda x: x)  <EOL>log_binary(_LOGGER, '<STR_LIT>', Secret=shared)<EOL>aes_key = hash_sha512('<STR_LIT>', shared)[<NUM_LIT:0>:<NUM_LIT:16>]<EOL>aes_iv = hash_sha512('<STR_LIT>', shared)[<NUM_LIT:0>:<NUM_LIT:16>]<EOL>log_binary(_LOGGER, '<STR_LIT>', Key=aes_key, IV=aes_iv)<EOL>signer = SigningKey(self._auth_private)<EOL>signed = signer.sign(self._verify_public.serialize() + atv_public_key)<EOL>signature, _ = aes_encrypt(modes.CTR, aes_key, aes_iv, data, signed)<EOL>log_binary(_LOGGER, '<STR_LIT>', Signature=signature)<EOL>return b'<STR_LIT>' + signature<EOL>
Last device verification step.