PiotrMachowski / Xiaomi-cloud-tokens-extractor

This tool/script retrieves tokens for all devices connected to Xiaomi cloud and encryption keys for BLE devices.
MIT License
3.17k stars 327 forks source link

how does rc4_hash__ calculate? #115

Closed fswen16 closed 3 months ago

fswen16 commented 3 months ago

Hello, I utilized this code to decrypt my Mi Band 7 and successfully got the data, but I've encountered an issue: I employed 'generate_enc_params' and 'generate_enc_signature' as separate functions. Then, using the same 'ssecurity', 'nonce', and 'params' from the captured packet, I attempted to generate the 'rc4_hash__'. However, I can't seem to get the same 'rc4_hash__' of the packet I captured. Could there be an error in my 'signature_string'? Your assistance would be greatly appreciated.