Commit b88bcc6
committed
Fix non-transient pairing
Hitherto, a subtle bug existed in the HAP module. During various rounds
of verification, signing was done by a temporally generated key, instead
of the 'accessory' long term (LT) key. Accessory is the ap2-receiver.
We now generate an Ed25519 key at startup and put it into the "pk" TXT
record which makes the LTK available to other devices via the
out-of-band channel, for long term access.
More info: https://developer.apple.com/homekit/specification/
This means that non-transient pairing now works :)
To test, add -ftxor 48 (disable Ft48TransientPairing), e.g.:
python3 ap2-receiver.py -m myap2 -n en0 -ftxor 481 parent 57e4a3b commit b88bcc6
3 files changed
+43
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
156 | 183 | | |
157 | 184 | | |
158 | 185 | | |
| |||
163 | 190 | | |
164 | 191 | | |
165 | 192 | | |
| 193 | + | |
166 | 194 | | |
167 | 195 | | |
168 | 196 | | |
| |||
263 | 291 | | |
264 | 292 | | |
265 | 293 | | |
266 | | - | |
| 294 | + | |
267 | 295 | | |
268 | 296 | | |
269 | 297 | | |
| |||
703 | 731 | | |
704 | 732 | | |
705 | 733 | | |
706 | | - | |
| 734 | + | |
707 | 735 | | |
708 | 736 | | |
709 | 737 | | |
| |||
724 | 752 | | |
725 | 753 | | |
726 | 754 | | |
727 | | - | |
| 755 | + | |
728 | 756 | | |
729 | 757 | | |
730 | 758 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
107 | | - | |
| 109 | + | |
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
113 | | - | |
114 | | - | |
| 115 | + | |
| 116 | + | |
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| |||
216 | 218 | | |
217 | 219 | | |
218 | 220 | | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
| 221 | + | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
250 | | - | |
| 249 | + | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
| 254 | + | |
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| |||
0 commit comments