thiccaxe / CompanionGames

Concept: multiplayer games using iOS/iPadOS remote. Companion Protocol.
GNU Affero General Public License v3.0
0 stars 0 forks source link

ios skips pair-verify procedure after pair-setup and goes directly into encrypted communication #2

Closed thiccaxe closed 2 months ago

thiccaxe commented 5 months ago

maybe. I'm not really sure though. However, the logs make sense. the question is what keys ios decides to use for chacha!

thiccaxe commented 5 months ago

It could just be the same keys used for the chacha in pair setup

thiccaxe commented 5 months ago

Not really sure, tried a few permutations/combinations of HKDF and what not. will monkey patch it for now by forcing ios client to reconnect (and thus use the "proper" pair verify procedure)

thiccaxe commented 5 months ago

I confirmed that this is the behavior, and ios makes no attempt at pair-verify right after pair-setup (through device logs)

thiccaxe commented 5 months ago

ok, success! its just the srp shared key!

thiccaxe commented 5 months ago

Closed by https://github.com/thiccaxe/CompanionGames/commit/e14eec490e3c7847382fe580a90a2dffd24fab27

thiccaxe commented 4 months ago

This broke just now, for some reason, I do not know why.

Right after pairing, _systemInfo is sent, and decrypted properly. Then there are some issues with the next packet. Investigating.

thiccaxe commented 4 months ago

The data is definitely encrypted, unknown what keys.

thiccaxe commented 2 months ago

you just need to set the nonce_length to 12 :facepalm: