kormax/apple-home-key

The length of Authentication cryptogram in the response of FAST authentication

dangfan opened this issue · 3 comments

I'm using Aqara A100 pro, and according to the trace that I sniffed, the length of the cryptogram is 16 (0x10). Here is an example:

> 80 80 01 01 6b 5c 02 02 00 87 41 04 34 bc de 44 04 90 01 8d 24 02 18 2b 80 46 2a d6 25 7d 52 03 64 10 5d 9c 66 5d 20 9a 51 bc 18 df 23 4a a2 c2 2b 01 2f ec ff 3c 96 d7 82 88 a6 78 75 c2 43 b5 ad b0 00 86 2a 11 9b b6 a3 22 15 8e 4c 10 d9 5f f1 ad f9 5e 35 cd 59 6f 87 a2 aa 3c 4c 6f 4d 10 f0 9d 22 85 b6 58 b8 64 5d 49 e5 ba 7f 0d 3d e3 00

< 86 41 04 F9 54 5B 77 F5 BA 34 5D 0F 0F 20 E7 D7 7F F0 9D F7 5C 06 D6 02 4B AB 48 E5 A4 C8 C1 DC BC CB B7 0F F4 0C 2D A6 29 67 9F CC E7 5A 5A 75 8C 2A 45 D4 51 32 0F F4 D3 E0 7E 5A C8 E7 1E 8D E7 E7 33 9D 10 88 C7 A3 ED A1 7E BE DA 9C F8 74 63 30 55 32 C0 90 00

I am not sure if there are different versions of HomeKey.

kormax commented

Hello!

Going to re-check the info on my side in a couple of hours. Also have the A100 (ZigBee), should not be different.

BTW. Accepted your PR.

BTW X2. If possible, would be great if you could also add a full text trace into the resources folder, going to do the same later today when I get back.

kormax commented

Regarding the protocol version.
A HomeKey applet on device reports two versions - 1.0 and 2.0;

My global Aqara a100 requests version 2.0. I wonder if 1.0 is used at all. Seems to me that the only lock older than an Aqara one is the Schlage encode plus, it might be using the older version, although I don't have the device to confirm.

kormax commented

Hello once again.

You're right. After checking my logs again, the cryptogram in FAST AUTH response is 16 bytes long.

Updated the document accordingly in aa3999a. Going to close the issue now.