Get Mystery Box with random crypto!

except InvalidECPointException as e: return False | 🎩BLACK HAT🎩

except InvalidECPointException as e:
return False

ecdh_key = (ephemeral_pubkey * self.secret_scalar).get_public_key_bytes(compressed=True)
key = hashlib.sha512(ecdh_key).digest()
iv, key_e, key_m = key[0:16], key[16:32], key[32:]

if mac != hmac_oneshot(key_m, encrypted[:-32], hashlib.sha256):
return False
else:
return True