kormax / apple-home-key-reader

Apple Home Key Reader Implementation
Apache License 2.0
470 stars 32 forks source link

Can't share key #20

Closed Kinqdos closed 4 months ago

Kinqdos commented 4 months ago

Hey first of all, your project works great! Thank you for doing research. I noticed, that I can't share the key with others. Is it, cause its not Apple certifified? Or can I scan the QR-Code on multiple devices or just once?

kormax commented 4 months ago

Apple has not enabled sharing for Home Keys, and I assume that they are not planning on adding it, even though the UAC protocol has full support for it.

We can only speculate on why that is so, but in my opinion, there could be 2 reasons for this: 1) In terms of UX: Apple didn't want to mix up "automatic" sharing which happens if you add someone to your Apple Home together with manual one. 2) Business reasons: Apple were afraid that someone could reverse engineer the protocol and build a royalty free reader. In this case, one would have been able to use sharing functionality as a means of issuing virtual access credentials, which would have enabled the use of Home Key in shared space settings (housing/offices/gyms). For such use cases Apple has an "Apple Access Program", and it's seemingly very expensive, requires recurring licensing payments to have access to, and thus very profitable for them. They could have disabled Home Key sharing artificially to make that paid-for solution seem more sound for businesses in comparison.

By the way, the business solution, apart from Mifare and Seos, offers UAC (same protocol as Home and Car Key) as a protocol option. And in that case the sharing is there.

Kinqdos commented 4 months ago

Thanks for the explanation, thought there were a sharing option, like shown in this article https://support.shopyalehome.com/how-do-i-share-a-home-key-to-my-assure-lock-2-plus-HkwulJET2

By the way is the knowledge used for this project part of the open hap specifications, that apple released 2017? Or do you had to reverse engineer things from the commercial part of the specifications

kormax commented 4 months ago

What you're referring to isn't actually sharing, as most people think about that as being able to share from a Wallet pass screen.

In that FAQ, they're just showing how to add other people to your home, which adds the key to their devices.

You won't see that screen if you've upgraded HomeKit architecture and don't have an active home hub. I think that's the reason you can't invite people.

As for your second question, it's answered directly in the repo's "Credits" and "Links" sections, and you can learn more by following the links. TLDR: that info isn't in the open HAP spec, it was acquired through reverse engineering (sniffing the protocol, analyzing binaries, brute forcing data, making guesses, etc).

Kinqdos commented 4 months ago

Well then nothing left to say, except thank you for your replies and the effort you put into this project. Its absolutely awesome to create your own home keys!