Skip to content

Column ZToken of the iOS app contains a 96 character token #75

Description

@syssi

The ZToken column of the iOS app is encrypted now. The token cannot be used anymore by copy&paste because it has 96 characters now. The encryption is AES-ECB with an empty key. It can be deciphered by:

from Crypto.Cipher import AES
import binascii
keystring = '00000000000000000000000000000000'
iostoken = '16a935db276e19b1c7bef0739f2deb7d3aca43c5e26a3c6445351cb2fb8495ea0143db63ee66b0cdff9f69917680151e'
key = bytes.fromhex(keystring)
cipher = AES.new(key, AES.MODE_ECB)
token = cipher.decrypt(bytes.fromhex(iostoken[:64]))
print(token)
# Output: b'4a447a41467058496746505541597033'

The support for encrypted tokens could be implemented now.

https://community.home-assistant.io/t/beta-xiaomi-gateway-integration/8213/3052
https://community.home-assistant.io/t/issue-config-xiaomi-vacuum-by-v0-51-1/24304/12
https://community.home-assistant.io/t/xiaomi-philips-light-token-problem/26701

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions