1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20 #include <stddef.h>
21 #include <string.h>
22 #include <errno.h>
23 #include "testutil/testutil.h"
24 #include "nimble/hci_common.h"
25 #include "nimble/nimble_opt.h"
26 #include "host/ble_sm.h"
27 #include "host/ble_hs_test.h"
28 #include "ble_hs_test_util.h"
29 #include "ble_sm_test_util.h"
30
31 #if NIMBLE_BLE_SM
32
33 /**
34 * Secure connections pairing
35 * Master: peer
36 * Pair algorithm: just works
37 * Initiator IO capabilities: 3
38 * Responder IO capabilities: 3
39 * Bonding: true
40 * Initiator address type: 0
41 * Responder address type: 0
42 * Initiator key distribution: 5
43 * Responder key distribution: 7
44 */
TEST_CASE(ble_sm_sc_peer_jw_iio3_rio3_b1_iat0_rat0_ik5_rk7)45 TEST_CASE(ble_sm_sc_peer_jw_iio3_rio3_b1_iat0_rat0_ik5_rk7)
46 {
47 struct ble_sm_test_params params;
48
49 params = (struct ble_sm_test_params) {
50 .init_id_addr = {
51 0xca, 0x61, 0xa0, 0x67, 0x94, 0xe0,
52 },
53 .resp_id_addr = {
54 0x33, 0x22, 0x11, 0x00, 0x45, 0x0a,
55 },
56 .pair_req = {
57 .io_cap = 0x03,
58 .oob_data_flag = 0x00,
59 .authreq = 0x09,
60 .max_enc_key_size = 0x10,
61 .init_key_dist = 0x0d,
62 .resp_key_dist = 0x0f,
63 },
64 .pair_rsp = {
65 .io_cap = 0x03,
66 .oob_data_flag = 0x00,
67 .authreq = 0x09,
68 .max_enc_key_size = 0x10,
69 .init_key_dist = 0x05,
70 .resp_key_dist = 0x07,
71 },
72 .our_priv_key = {
73 0x54, 0x8d, 0x20, 0xb8, 0x97, 0x0b, 0xbc, 0x43,
74 0x9a, 0xad, 0x10, 0x6f, 0x60, 0x74, 0xd4, 0x6a,
75 0x55, 0xc1, 0x7a, 0x17, 0x8b, 0x60, 0xe0, 0xb4,
76 0x5a, 0xe6, 0x58, 0xf1, 0xea, 0x12, 0xd9, 0xfb,
77 },
78 .public_key_req = {
79 .x = {
80 0xbc, 0xf2, 0xd8, 0xa5, 0xdb, 0xa3, 0x95, 0x6c,
81 0x99, 0xf9, 0x11, 0x0d, 0x4d, 0x2e, 0xf0, 0xbd,
82 0xee, 0x9b, 0x69, 0xb6, 0xcd, 0x88, 0x74, 0xbe,
83 0x40, 0xe8, 0xe5, 0xcc, 0xdc, 0x88, 0x44, 0x53,
84 },
85 .y = {
86 0xbf, 0xa9, 0x82, 0x0e, 0x18, 0x7a, 0x14, 0xf8,
87 0x77, 0xfd, 0x8e, 0x92, 0x2a, 0xf8, 0x5d, 0x39,
88 0xd1, 0x6d, 0x92, 0x1f, 0x38, 0x74, 0x99, 0xdc,
89 0x6c, 0x2c, 0x94, 0x23, 0xf9, 0x72, 0x56, 0xab,
90 },
91 },
92 .public_key_rsp = {
93 .x = {
94 0x72, 0x8c, 0xd1, 0x88, 0xd7, 0xbe, 0x49, 0xb2,
95 0xc5, 0x5c, 0x95, 0xb3, 0x64, 0xe0, 0x12, 0x32,
96 0xb6, 0xc9, 0x47, 0x63, 0x37, 0x38, 0x5b, 0x9c,
97 0x1e, 0x1b, 0x1a, 0x06, 0x09, 0xe2, 0x31, 0x85,
98 },
99 .y = {
100 0x19, 0x3a, 0x29, 0x69, 0x62, 0xd6, 0x30, 0xe7,
101 0xe8, 0x48, 0x63, 0xdc, 0x00, 0x73, 0x0a, 0x70,
102 0x7d, 0x2e, 0x29, 0xcc, 0x91, 0x77, 0x71, 0xb1,
103 0x75, 0xb8, 0xf7, 0xdc, 0xb0, 0xe2, 0x91, 0x10,
104 },
105 },
106 .confirm_rsp[0] = {
107 .value = {
108 0x82, 0xed, 0xd0, 0x62, 0x91, 0x3d, 0x96, 0x7f,
109 0x13, 0xc5, 0x0d, 0x02, 0x2b, 0x5e, 0x43, 0x16,
110 },
111 },
112 .random_req[0] = {
113 .value = {
114 0xa4, 0x34, 0x5f, 0xb3, 0xaf, 0x73, 0x43, 0x64,
115 0xcd, 0x19, 0x1b, 0x5b, 0x87, 0x58, 0x31, 0x66,
116 },
117 },
118 .random_rsp[0] = {
119 .value = {
120 0xc0, 0x91, 0xfb, 0xb3, 0x77, 0xa2, 0x02, 0x0b,
121 0xc6, 0xcd, 0x6c, 0x04, 0x51, 0x45, 0x45, 0x39,
122 },
123 },
124 .dhkey_check_req = {
125 .value = {
126 0x82, 0x65, 0x1d, 0x02, 0xed, 0x89, 0x13, 0x44,
127 0x04, 0x1a, 0x14, 0x7c, 0x32, 0x9a, 0x1e, 0x7d,
128 },
129 },
130 .dhkey_check_rsp = {
131 .value = {
132 0x06, 0x3c, 0x28, 0x4a, 0xe5, 0x48, 0x4b, 0x51,
133 0x65, 0x4e, 0x14, 0x5e, 0x2f, 0xdd, 0xfa, 0x22,
134 },
135 },
136 .id_info_req = {
137 .irk = {
138 0xef, 0x8d, 0xe2, 0x16, 0x4f, 0xec, 0x43, 0x0d,
139 0xbf, 0x5b, 0xdd, 0x34, 0xc0, 0x53, 0x1e, 0xb8,
140 },
141 },
142 .id_addr_info_req = {
143 .addr_type = 0,
144 .bd_addr = {
145 0x33, 0x22, 0x11, 0x00, 0x45, 0x0a,
146 },
147 },
148 .sign_info_req = {
149 .sig_key = {
150 0x40, 0x53, 0xeb, 0x7a, 0x4d, 0x8e, 0xa2, 0xb5,
151 0xca, 0xa1, 0xb6, 0xae, 0x7e, 0x6a, 0x4d, 0xd9,
152 },
153 },
154 .sign_info_rsp = {
155 .sig_key = {
156 0xbc, 0x13, 0x4b, 0x45, 0xda, 0x76, 0x5b, 0xcd,
157 0xc2, 0x43, 0x81, 0xb8, 0xc3, 0x68, 0x12, 0xbb,
158 },
159 },
160 .ltk = {
161 0x63, 0x59, 0x8a, 0x14, 0x09, 0x4b, 0x94, 0x6e,
162 0xff, 0xae, 0x5e, 0x53, 0x86, 0x02, 0xa3, 0x6c,
163 },
164 .pair_alg = BLE_SM_PAIR_ALG_JW,
165 .authenticated = 0,
166 .passkey_info = {
167 .passkey = {
168 .action = BLE_SM_IOACT_NONE,
169 },
170 },
171 };
172 ble_sm_test_util_peer_sc_good(¶ms);
173 }
174
175 /**
176 * Secure connections pairing
177 * Master: peer
178 * Pair algorithm: passkey entry
179 * Initiator IO capabilities: 0
180 * Responder IO capabilities: 2
181 * Bonding: true
182 * Initiator address type: 0
183 * Responder address type: 0
184 * Initiator key distribution: 5
185 * Responder key distribution: 7
186 */
TEST_CASE(ble_sm_sc_peer_pk_iio0_rio2_b1_iat0_rat0_ik5_rk7)187 TEST_CASE(ble_sm_sc_peer_pk_iio0_rio2_b1_iat0_rat0_ik5_rk7)
188 {
189 struct ble_sm_test_params params;
190
191 params = (struct ble_sm_test_params) {
192 .init_id_addr = {
193 0xca, 0x61, 0xa0, 0x67, 0x94, 0xe0,
194 },
195 .resp_id_addr = {
196 0x33, 0x22, 0x11, 0x00, 0x45, 0x0a,
197 },
198 .pair_req = {
199 .io_cap = 0x00,
200 .oob_data_flag = 0x00,
201 .authreq = 0x0d,
202 .max_enc_key_size = 0x10,
203 .init_key_dist = 0x0d,
204 .resp_key_dist = 0x0f,
205 },
206 .pair_rsp = {
207 .io_cap = 0x02,
208 .oob_data_flag = 0x00,
209 .authreq = 0x0d,
210 .max_enc_key_size = 0x10,
211 .init_key_dist = 0x05,
212 .resp_key_dist = 0x07,
213 },
214 .our_priv_key = {
215 0x54, 0x8d, 0x20, 0xb8, 0x97, 0x0b, 0xbc, 0x43,
216 0x9a, 0xad, 0x10, 0x6f, 0x60, 0x74, 0xd4, 0x6a,
217 0x55, 0xc1, 0x7a, 0x17, 0x8b, 0x60, 0xe0, 0xb4,
218 0x5a, 0xe6, 0x58, 0xf1, 0xea, 0x12, 0xd9, 0xfb,
219 },
220 .public_key_req = {
221 .x = {
222 0x22, 0x26, 0xcc, 0x64, 0x4d, 0xc1, 0x01, 0xd1,
223 0xb9, 0x8d, 0xe2, 0xd4, 0xbc, 0x55, 0x37, 0x4c,
224 0x12, 0x81, 0x14, 0x83, 0x81, 0xe8, 0x36, 0x1b,
225 0x78, 0xff, 0x49, 0xfc, 0xe9, 0x2e, 0x56, 0xc0,
226 },
227 .y = {
228 0xd9, 0x31, 0xa5, 0x8d, 0x02, 0xf1, 0x94, 0xb6,
229 0x83, 0x97, 0xd1, 0xfb, 0x01, 0x97, 0x4d, 0x06,
230 0xec, 0x18, 0x8d, 0x4a, 0xd2, 0x14, 0x12, 0x95,
231 0x2d, 0x4d, 0x18, 0xde, 0x4d, 0xaa, 0x91, 0x25,
232 },
233 },
234 .public_key_rsp = {
235 .x = {
236 0x72, 0x8c, 0xd1, 0x88, 0xd7, 0xbe, 0x49, 0xb2,
237 0xc5, 0x5c, 0x95, 0xb3, 0x64, 0xe0, 0x12, 0x32,
238 0xb6, 0xc9, 0x47, 0x63, 0x37, 0x38, 0x5b, 0x9c,
239 0x1e, 0x1b, 0x1a, 0x06, 0x09, 0xe2, 0x31, 0x85,
240 },
241 .y = {
242 0x19, 0x3a, 0x29, 0x69, 0x62, 0xd6, 0x30, 0xe7,
243 0xe8, 0x48, 0x63, 0xdc, 0x00, 0x73, 0x0a, 0x70,
244 0x7d, 0x2e, 0x29, 0xcc, 0x91, 0x77, 0x71, 0xb1,
245 0x75, 0xb8, 0xf7, 0xdc, 0xb0, 0xe2, 0x91, 0x10,
246 },
247 },
248 .confirm_req[0] = {
249 .value = {
250 0x2c, 0x16, 0x15, 0x0d, 0xe8, 0x18, 0x50, 0xd8,
251 0xae, 0x04, 0x6c, 0xa8, 0x50, 0xb8, 0xe5, 0x85,
252 },
253 },
254 .confirm_rsp[0] = {
255 .value = {
256 0x62, 0x53, 0xfb, 0x69, 0x94, 0x33, 0x11, 0xd3,
257 0x8e, 0x03, 0xd5, 0x05, 0xd7, 0x68, 0x33, 0x16,
258 },
259 },
260 .random_req[0] = {
261 .value = {
262 0xd5, 0x0e, 0x27, 0xcf, 0xa4, 0xc1, 0x52, 0x1b,
263 0xf1, 0x9d, 0x5f, 0xbe, 0xe2, 0xc0, 0x48, 0x38,
264 },
265 },
266 .random_rsp[0] = {
267 .value = {
268 0x94, 0x31, 0x95, 0x44, 0x6c, 0xc5, 0x73, 0xc8,
269 0x8d, 0x72, 0x06, 0xe7, 0xfd, 0x16, 0x70, 0x5d,
270 },
271 },
272 .confirm_req[1] = {
273 .value = {
274 0x80, 0xae, 0x74, 0xaa, 0x9a, 0xfc, 0x09, 0x97,
275 0x10, 0x01, 0x4e, 0xbb, 0x16, 0x36, 0x6b, 0xc7,
276 },
277 },
278 .confirm_rsp[1] = {
279 .value = {
280 0x5a, 0xb1, 0xe5, 0x81, 0x5a, 0x1b, 0xef, 0xf4,
281 0xa8, 0x3d, 0xaa, 0x3f, 0x02, 0x1f, 0x78, 0x55,
282 },
283 },
284 .random_req[1] = {
285 .value = {
286 0x04, 0x4a, 0xf4, 0xd5, 0x4b, 0x4f, 0x77, 0x37,
287 0x2a, 0x3c, 0xfe, 0x83, 0x34, 0x6b, 0x38, 0x1a,
288 },
289 },
290 .random_rsp[1] = {
291 .value = {
292 0x24, 0xb3, 0x47, 0xc8, 0xb0, 0xa2, 0xa3, 0xd8,
293 0x78, 0x3d, 0x09, 0x8d, 0xea, 0x49, 0xf6, 0x22,
294 },
295 },
296 .confirm_req[2] = {
297 .value = {
298 0x56, 0x5f, 0x07, 0x30, 0x3a, 0xc1, 0x44, 0xf9,
299 0x00, 0x03, 0xb3, 0x93, 0x58, 0xb4, 0x2c, 0x85,
300 },
301 },
302 .confirm_rsp[2] = {
303 .value = {
304 0x50, 0x8a, 0xb3, 0x0b, 0xe4, 0x2e, 0xd3, 0x49,
305 0x59, 0x40, 0xb2, 0x71, 0xc9, 0x49, 0x29, 0x19,
306 },
307 },
308 .random_req[2] = {
309 .value = {
310 0x32, 0x37, 0x8e, 0x63, 0x6d, 0xbd, 0xd6, 0x18,
311 0xee, 0xa7, 0x0e, 0xe5, 0x7e, 0x5f, 0xe1, 0x80,
312 },
313 },
314 .random_rsp[2] = {
315 .value = {
316 0xa2, 0x1a, 0x92, 0xcd, 0xc0, 0x8f, 0x92, 0xb0,
317 0xe6, 0xbe, 0x43, 0x55, 0xc8, 0x47, 0x56, 0x4b,
318 },
319 },
320 .confirm_req[3] = {
321 .value = {
322 0x1b, 0xa0, 0x82, 0xda, 0xfc, 0xaf, 0x3f, 0x9c,
323 0xdf, 0xff, 0xa2, 0x18, 0xba, 0xbd, 0x9b, 0x48,
324 },
325 },
326 .confirm_rsp[3] = {
327 .value = {
328 0x6a, 0x90, 0xb7, 0x1c, 0x93, 0x4e, 0x4a, 0x8b,
329 0xda, 0xe8, 0x13, 0x6e, 0x01, 0x91, 0x74, 0xb1,
330 },
331 },
332 .random_req[3] = {
333 .value = {
334 0x41, 0xbf, 0x60, 0x64, 0x1d, 0xfc, 0xe2, 0xee,
335 0x00, 0xa3, 0x2a, 0xb1, 0xf8, 0x34, 0x6b, 0xeb,
336 },
337 },
338 .random_rsp[3] = {
339 .value = {
340 0xeb, 0x9c, 0xaf, 0x20, 0x14, 0x0f, 0xf2, 0x3e,
341 0xee, 0x45, 0xca, 0xe8, 0xdc, 0x17, 0xab, 0x22,
342 },
343 },
344 .confirm_req[4] = {
345 .value = {
346 0x75, 0x8f, 0x97, 0xbb, 0x87, 0xa8, 0x70, 0xda,
347 0x94, 0x5a, 0xd6, 0x09, 0x78, 0xe3, 0xdd, 0x43,
348 },
349 },
350 .confirm_rsp[4] = {
351 .value = {
352 0x8c, 0x2d, 0xa7, 0x44, 0xd9, 0x15, 0xa8, 0x9e,
353 0xdf, 0x3a, 0x59, 0xa5, 0xee, 0x92, 0x24, 0x3c,
354 },
355 },
356 .random_req[4] = {
357 .value = {
358 0xb9, 0xe0, 0xf3, 0xf6, 0x6f, 0xbd, 0xa0, 0x7a,
359 0x82, 0x20, 0x61, 0xbe, 0xf3, 0xe6, 0x4e, 0xac,
360 },
361 },
362 .random_rsp[4] = {
363 .value = {
364 0xdd, 0x9b, 0xd3, 0x10, 0xed, 0x12, 0xe8, 0xb5,
365 0xa2, 0x59, 0xe1, 0xdc, 0x5c, 0xd8, 0x6e, 0x96,
366 },
367 },
368 .confirm_req[5] = {
369 .value = {
370 0x9d, 0xc7, 0x97, 0x67, 0x8d, 0xd0, 0xd6, 0x1a,
371 0x4d, 0x52, 0xc0, 0x8d, 0x87, 0xa9, 0x75, 0xf5,
372 },
373 },
374 .confirm_rsp[5] = {
375 .value = {
376 0xd4, 0x5d, 0x61, 0x76, 0x38, 0xe3, 0x81, 0x85,
377 0x18, 0x5f, 0xac, 0xde, 0x49, 0x57, 0xf6, 0x9b,
378 },
379 },
380 .random_req[5] = {
381 .value = {
382 0xfe, 0x83, 0xe9, 0xc6, 0xe9, 0xa4, 0x83, 0x0d,
383 0xaf, 0x27, 0x6f, 0x79, 0x7a, 0x2b, 0x2d, 0x1f,
384 },
385 },
386 .random_rsp[5] = {
387 .value = {
388 0xf2, 0x0c, 0x9e, 0x75, 0x5b, 0xb1, 0x8c, 0xf1,
389 0x46, 0x4f, 0x68, 0xe8, 0x0a, 0x65, 0xd5, 0x81,
390 },
391 },
392 .confirm_req[6] = {
393 .value = {
394 0x15, 0x2b, 0x2e, 0x14, 0xf7, 0x31, 0xa2, 0xff,
395 0x93, 0xa7, 0x28, 0x65, 0xb1, 0x68, 0x96, 0xc6,
396 },
397 },
398 .confirm_rsp[6] = {
399 .value = {
400 0x6f, 0x01, 0x22, 0x14, 0x78, 0xfb, 0x93, 0xf4,
401 0xfa, 0xf1, 0x6d, 0x33, 0x49, 0x0e, 0x7d, 0x56,
402 },
403 },
404 .random_req[6] = {
405 .value = {
406 0x05, 0xe5, 0xed, 0x99, 0x63, 0x05, 0x29, 0xb1,
407 0xbd, 0xf7, 0x2b, 0xa6, 0x94, 0xfe, 0x45, 0xb2,
408 },
409 },
410 .random_rsp[6] = {
411 .value = {
412 0x51, 0xf1, 0x2a, 0xa6, 0x7b, 0xe0, 0xb3, 0x20,
413 0x7d, 0x7e, 0xd3, 0x47, 0xfb, 0x83, 0xe1, 0xc6,
414 },
415 },
416 .confirm_req[7] = {
417 .value = {
418 0x9e, 0x7a, 0x3d, 0x12, 0x3b, 0x30, 0x81, 0x23,
419 0x1c, 0x94, 0x42, 0x73, 0x41, 0x68, 0xc6, 0x17,
420 },
421 },
422 .confirm_rsp[7] = {
423 .value = {
424 0x55, 0x31, 0x41, 0xe8, 0x1f, 0x11, 0xa6, 0x06,
425 0x7a, 0x7c, 0x84, 0x10, 0xad, 0xd3, 0x73, 0xcf,
426 },
427 },
428 .random_req[7] = {
429 .value = {
430 0xcb, 0x92, 0x18, 0xf6, 0x59, 0x6a, 0x1b, 0x18,
431 0x63, 0x72, 0x54, 0xc2, 0x1a, 0x3d, 0x09, 0x67,
432 },
433 },
434 .random_rsp[7] = {
435 .value = {
436 0xae, 0xf2, 0x96, 0xfd, 0xff, 0xd7, 0x18, 0xac,
437 0x5d, 0xb2, 0x9d, 0x89, 0x56, 0x2a, 0x19, 0xae,
438 },
439 },
440 .confirm_req[8] = {
441 .value = {
442 0x06, 0x8d, 0x5d, 0x19, 0xb3, 0x27, 0xc9, 0x6a,
443 0xe8, 0x58, 0xe7, 0x17, 0x10, 0x6a, 0xf9, 0xf7,
444 },
445 },
446 .confirm_rsp[8] = {
447 .value = {
448 0xf0, 0xbc, 0x2a, 0x03, 0x1f, 0x9b, 0x7b, 0x58,
449 0x43, 0x0f, 0xf5, 0x17, 0xc4, 0xbd, 0xec, 0x23,
450 },
451 },
452 .random_req[8] = {
453 .value = {
454 0xbe, 0x78, 0xcd, 0x84, 0x91, 0x4a, 0x1b, 0xdd,
455 0x6a, 0x0d, 0x88, 0x72, 0x9e, 0xc2, 0x4f, 0x5a,
456 },
457 },
458 .random_rsp[8] = {
459 .value = {
460 0xff, 0xac, 0xfe, 0x71, 0x2f, 0x6a, 0x13, 0xdc,
461 0xd3, 0x02, 0x81, 0x88, 0xbf, 0xc9, 0x9c, 0xd6,
462 },
463 },
464 .confirm_req[9] = {
465 .value = {
466 0xb0, 0x8d, 0x47, 0x23, 0x7e, 0xdb, 0xf5, 0x64,
467 0x5e, 0x83, 0x52, 0x9f, 0x06, 0x65, 0x84, 0x10,
468 },
469 },
470 .confirm_rsp[9] = {
471 .value = {
472 0x4d, 0x3f, 0xd4, 0x5a, 0x45, 0x57, 0xe9, 0xd7,
473 0x1e, 0x65, 0x7a, 0xa0, 0xd8, 0x5a, 0xa8, 0x29,
474 },
475 },
476 .random_req[9] = {
477 .value = {
478 0xb0, 0xcd, 0xfa, 0x39, 0x0d, 0x2e, 0x07, 0xfe,
479 0x36, 0x47, 0x8d, 0x8e, 0x1a, 0x47, 0x67, 0xf2,
480 },
481 },
482 .random_rsp[9] = {
483 .value = {
484 0xb4, 0xf5, 0x12, 0x64, 0xf4, 0xf6, 0xd7, 0x6e,
485 0xeb, 0x1e, 0x9a, 0x3f, 0x18, 0xba, 0xfb, 0x99,
486 },
487 },
488 .confirm_req[10] = {
489 .value = {
490 0xc9, 0x76, 0xb3, 0x3f, 0x80, 0xd9, 0x0c, 0xfb,
491 0xe3, 0x90, 0x1b, 0x7a, 0xbc, 0xe1, 0x7c, 0xde,
492 },
493 },
494 .confirm_rsp[10] = {
495 .value = {
496 0x21, 0x6a, 0x45, 0x6e, 0x6a, 0xac, 0xba, 0x9e,
497 0x66, 0x39, 0x5b, 0xb6, 0x74, 0xfe, 0x2b, 0x28,
498 },
499 },
500 .random_req[10] = {
501 .value = {
502 0xc0, 0xd4, 0xdf, 0x7b, 0x0f, 0x2f, 0xaa, 0x68,
503 0x4e, 0x3d, 0xa4, 0x59, 0x6f, 0x24, 0xe6, 0x7e,
504 },
505 },
506 .random_rsp[10] = {
507 .value = {
508 0xdf, 0x89, 0x49, 0xe7, 0x9f, 0x60, 0xdd, 0xf6,
509 0x44, 0x97, 0xe3, 0x15, 0x52, 0x65, 0x67, 0x3e,
510 },
511 },
512 .confirm_req[11] = {
513 .value = {
514 0xb0, 0x3f, 0x34, 0xce, 0x7d, 0x2e, 0xf1, 0xab,
515 0x23, 0xd5, 0x89, 0xf5, 0xaa, 0xa8, 0x59, 0x9f,
516 },
517 },
518 .confirm_rsp[11] = {
519 .value = {
520 0xb1, 0x33, 0x6a, 0x64, 0xd8, 0xeb, 0x8b, 0xa0,
521 0xf4, 0x1a, 0x15, 0x28, 0xb9, 0xe4, 0xa1, 0x31,
522 },
523 },
524 .random_req[11] = {
525 .value = {
526 0xd2, 0x88, 0x24, 0xfe, 0x95, 0x11, 0xc5, 0x0a,
527 0x21, 0xfb, 0x96, 0xea, 0x61, 0xb9, 0x8b, 0x26,
528 },
529 },
530 .random_rsp[11] = {
531 .value = {
532 0x8f, 0x22, 0x66, 0x8e, 0x7e, 0x62, 0x34, 0x37,
533 0xfc, 0x4a, 0x48, 0x1f, 0xf7, 0x38, 0x3b, 0x4e,
534 },
535 },
536 .confirm_req[12] = {
537 .value = {
538 0xc4, 0x50, 0xc8, 0x53, 0x58, 0xfb, 0xea, 0x9a,
539 0xdc, 0x35, 0xc7, 0xf3, 0x5b, 0x7c, 0xfb, 0xe4,
540 },
541 },
542 .confirm_rsp[12] = {
543 .value = {
544 0x27, 0xd9, 0x32, 0xd6, 0x43, 0xbf, 0x57, 0x3f,
545 0x35, 0x73, 0x3c, 0x3e, 0xbe, 0x53, 0x19, 0xff,
546 },
547 },
548 .random_req[12] = {
549 .value = {
550 0x99, 0xa1, 0x7a, 0x5f, 0xe0, 0x48, 0x1c, 0x6c,
551 0x84, 0xac, 0xab, 0xed, 0x69, 0x55, 0x1e, 0x66,
552 },
553 },
554 .random_rsp[12] = {
555 .value = {
556 0x37, 0x50, 0x90, 0x35, 0xef, 0x84, 0x06, 0x18,
557 0xfd, 0x3b, 0xc1, 0x8a, 0x46, 0x91, 0xb8, 0x21,
558 },
559 },
560 .confirm_req[13] = {
561 .value = {
562 0x2f, 0xcb, 0x3e, 0xc3, 0xce, 0x82, 0x0b, 0x5c,
563 0xdc, 0x9c, 0xbd, 0x44, 0xf9, 0x04, 0x22, 0x8c,
564 },
565 },
566 .confirm_rsp[13] = {
567 .value = {
568 0xab, 0xf2, 0x2e, 0x40, 0xd0, 0x74, 0x4f, 0xd4,
569 0x26, 0x9c, 0x89, 0x9e, 0x38, 0x77, 0xac, 0x9d,
570 },
571 },
572 .random_req[13] = {
573 .value = {
574 0xbc, 0xda, 0x58, 0xa2, 0x98, 0x88, 0xfe, 0x9f,
575 0x95, 0x0e, 0x3a, 0x91, 0xba, 0xe9, 0xbf, 0x02,
576 },
577 },
578 .random_rsp[13] = {
579 .value = {
580 0x04, 0xb9, 0x4c, 0x26, 0xce, 0x87, 0x8f, 0x17,
581 0xdc, 0xbc, 0x36, 0x94, 0x47, 0x67, 0x9f, 0xde,
582 },
583 },
584 .confirm_req[14] = {
585 .value = {
586 0xbd, 0xb6, 0x54, 0xc8, 0x1f, 0x51, 0x23, 0x98,
587 0x48, 0x3d, 0x47, 0x9d, 0xa3, 0xb8, 0xe7, 0x55,
588 },
589 },
590 .confirm_rsp[14] = {
591 .value = {
592 0x06, 0xc2, 0x7b, 0x80, 0x76, 0x9c, 0x37, 0x78,
593 0x46, 0xc5, 0x45, 0x43, 0x5d, 0x8d, 0x5b, 0x3e,
594 },
595 },
596 .random_req[14] = {
597 .value = {
598 0xef, 0x9e, 0x8a, 0x3a, 0xb7, 0xde, 0xa8, 0x07,
599 0x58, 0x73, 0xe0, 0x07, 0xfc, 0x62, 0xdb, 0x62,
600 },
601 },
602 .random_rsp[14] = {
603 .value = {
604 0xfa, 0xd5, 0xb2, 0x4e, 0x20, 0x01, 0x93, 0xc0,
605 0xb3, 0x76, 0xa5, 0x7a, 0x92, 0x8f, 0xb9, 0x6d,
606 },
607 },
608 .confirm_req[15] = {
609 .value = {
610 0x76, 0x2e, 0xc6, 0x64, 0x6c, 0x13, 0x01, 0x7e,
611 0x34, 0x78, 0x12, 0xb8, 0x1a, 0xb7, 0xf7, 0x39,
612 },
613 },
614 .confirm_rsp[15] = {
615 .value = {
616 0xbd, 0xae, 0x10, 0x32, 0xdb, 0x63, 0x30, 0x6f,
617 0x68, 0x19, 0x49, 0x5e, 0x34, 0x4f, 0x13, 0xc6,
618 },
619 },
620 .random_req[15] = {
621 .value = {
622 0x95, 0x2e, 0xe4, 0xe3, 0xb2, 0xdc, 0x79, 0xad,
623 0x5f, 0x0c, 0x19, 0x9c, 0x47, 0x9c, 0x79, 0x17,
624 },
625 },
626 .random_rsp[15] = {
627 .value = {
628 0x9e, 0x3d, 0x7f, 0xcd, 0x18, 0x40, 0xd7, 0xac,
629 0xa1, 0x45, 0x5f, 0xcb, 0x29, 0x57, 0x2b, 0x63,
630 },
631 },
632 .confirm_req[16] = {
633 .value = {
634 0x10, 0x18, 0x9d, 0xf2, 0xed, 0x76, 0x5c, 0x5f,
635 0x32, 0xa6, 0x29, 0x61, 0x12, 0xb2, 0xb8, 0xa2,
636 },
637 },
638 .confirm_rsp[16] = {
639 .value = {
640 0x3c, 0xd4, 0xbd, 0xe9, 0xd3, 0x29, 0xac, 0xf7,
641 0xfc, 0x04, 0xd3, 0xe4, 0x46, 0x14, 0x28, 0x2c,
642 },
643 },
644 .random_req[16] = {
645 .value = {
646 0x6d, 0xe8, 0x77, 0xc3, 0xab, 0x49, 0x6b, 0x79,
647 0x4f, 0x0f, 0x4c, 0x65, 0xc5, 0x77, 0x68, 0xd9,
648 },
649 },
650 .random_rsp[16] = {
651 .value = {
652 0xd0, 0x59, 0xf3, 0x53, 0xb1, 0x14, 0x81, 0x88,
653 0x26, 0x88, 0xef, 0x4b, 0xa4, 0x7d, 0x0a, 0x84,
654 },
655 },
656 .confirm_req[17] = {
657 .value = {
658 0xa3, 0x96, 0x9f, 0x96, 0x53, 0x0e, 0x38, 0x78,
659 0x9e, 0xbd, 0xf7, 0x65, 0x23, 0x73, 0x99, 0xa7,
660 },
661 },
662 .confirm_rsp[17] = {
663 .value = {
664 0x6b, 0x25, 0x8d, 0x51, 0xd8, 0xc4, 0xd9, 0xbf,
665 0xa6, 0x4f, 0xa3, 0x25, 0x28, 0xb5, 0x7c, 0x05,
666 },
667 },
668 .random_req[17] = {
669 .value = {
670 0xa5, 0xac, 0xd9, 0xb6, 0x9e, 0x98, 0x75, 0xae,
671 0x9b, 0x16, 0xe1, 0x60, 0xc6, 0xa5, 0x07, 0xf2,
672 },
673 },
674 .random_rsp[17] = {
675 .value = {
676 0x65, 0x53, 0x56, 0xe6, 0x2c, 0x22, 0x68, 0xc9,
677 0xb8, 0xbe, 0xb1, 0x40, 0x08, 0xe2, 0xb6, 0xb9,
678 },
679 },
680 .confirm_req[18] = {
681 .value = {
682 0x67, 0xcd, 0x0e, 0x4f, 0xfc, 0x38, 0x7f, 0x8a,
683 0x3b, 0xea, 0xff, 0x86, 0xf3, 0x8a, 0x92, 0xcb,
684 },
685 },
686 .confirm_rsp[18] = {
687 .value = {
688 0x22, 0x95, 0x1f, 0x20, 0xc9, 0x5c, 0x73, 0x39,
689 0xa4, 0xd9, 0xc1, 0x37, 0x9d, 0x94, 0xb2, 0xfd,
690 },
691 },
692 .random_req[18] = {
693 .value = {
694 0xe1, 0x80, 0x82, 0xdd, 0x21, 0x6c, 0xe4, 0x93,
695 0xa3, 0x41, 0x0f, 0xfc, 0x96, 0x42, 0x8b, 0xde,
696 },
697 },
698 .random_rsp[18] = {
699 .value = {
700 0x11, 0x1c, 0xd7, 0x7a, 0xe7, 0x1a, 0x88, 0xdd,
701 0x2a, 0xdf, 0xe5, 0x30, 0xca, 0x0b, 0x9f, 0xb6,
702 },
703 },
704 .confirm_req[19] = {
705 .value = {
706 0x45, 0x9b, 0x36, 0x3d, 0xf8, 0xc0, 0x43, 0x6d,
707 0x94, 0xcf, 0xbd, 0x5f, 0xfe, 0xec, 0xd7, 0x4b,
708 },
709 },
710 .confirm_rsp[19] = {
711 .value = {
712 0xf0, 0xaa, 0xfd, 0xae, 0xb7, 0x73, 0x3c, 0x9d,
713 0x93, 0xd4, 0x00, 0xea, 0x81, 0x31, 0xde, 0x41,
714 },
715 },
716 .random_req[19] = {
717 .value = {
718 0x1a, 0xaa, 0xff, 0x2a, 0xdc, 0xcc, 0x89, 0xbc,
719 0xcf, 0x48, 0x5c, 0x1e, 0x4d, 0x69, 0x85, 0x39,
720 },
721 },
722 .random_rsp[19] = {
723 .value = {
724 0xe7, 0xd0, 0xcb, 0x9a, 0xb5, 0x76, 0xec, 0xfc,
725 0x48, 0xa3, 0x41, 0x48, 0x4c, 0xa7, 0xec, 0xb7,
726 },
727 },
728 .dhkey_check_req = {
729 .value = {
730 0xe3, 0x4e, 0x42, 0xb5, 0xe3, 0x63, 0x4b, 0x7c,
731 0xf0, 0x9f, 0xef, 0x6e, 0x97, 0xe2, 0x86, 0xc0,
732 },
733 },
734 .dhkey_check_rsp = {
735 .value = {
736 0xea, 0x8a, 0xab, 0x7f, 0x15, 0x21, 0x5a, 0x36,
737 0x9b, 0x56, 0xee, 0x51, 0x61, 0x97, 0xe2, 0x0a,
738 },
739 },
740 .id_info_req = {
741 .irk = {
742 0xef, 0x8d, 0xe2, 0x16, 0x4f, 0xec, 0x43, 0x0d,
743 0xbf, 0x5b, 0xdd, 0x34, 0xc0, 0x53, 0x1e, 0xb8,
744 },
745 },
746 .id_addr_info_req = {
747 .addr_type = 0,
748 .bd_addr = {
749 0x33, 0x22, 0x11, 0x00, 0x45, 0x0a,
750 },
751 },
752 .sign_info_req = {
753 .sig_key = {
754 0x85, 0x54, 0x52, 0xe3, 0xb4, 0xe8, 0x26, 0xa4,
755 0x38, 0xb0, 0x4c, 0xa0, 0x41, 0xf5, 0x30, 0x6e,
756 },
757 },
758 .sign_info_rsp = {
759 .sig_key = {
760 0x6f, 0x93, 0xb8, 0x9c, 0x26, 0x88, 0xb4, 0x20,
761 0x87, 0x95, 0xf2, 0xf4, 0x3a, 0xbe, 0x92, 0xb7,
762 },
763 },
764 .ltk = {
765 0x30, 0xf6, 0xd3, 0x2e, 0x1c, 0x81, 0x2c, 0x96,
766 0x56, 0x30, 0x55, 0xec, 0x9b, 0x72, 0xf4, 0x83,
767 },
768 .pair_alg = BLE_SM_PAIR_ALG_PASSKEY,
769 .authenticated = 1,
770 .passkey_info = {
771 .passkey = {
772 .action = BLE_SM_IOACT_INPUT,
773 .passkey = 879894,
774 },
775 },
776 };
777 ble_sm_test_util_peer_sc_good(¶ms);
778 }
779
780 /**
781 * Secure connections pairing
782 * Master: peer
783 * Pair algorithm: passkey entry
784 * Initiator IO capabilities: 2
785 * Responder IO capabilities: 0
786 * Bonding: true
787 * Initiator address type: 0
788 * Responder address type: 0
789 * Initiator key distribution: 5
790 * Responder key distribution: 7
791 */
TEST_CASE(ble_sm_sc_peer_pk_iio2_rio0_b1_iat0_rat0_ik5_rk7)792 TEST_CASE(ble_sm_sc_peer_pk_iio2_rio0_b1_iat0_rat0_ik5_rk7)
793 {
794 struct ble_sm_test_params params;
795
796 params = (struct ble_sm_test_params) {
797 .init_id_addr = {
798 0xca, 0x61, 0xa0, 0x67, 0x94, 0xe0,
799 },
800 .resp_id_addr = {
801 0x33, 0x22, 0x11, 0x00, 0x45, 0x0a,
802 },
803 .pair_req = {
804 .io_cap = 0x02,
805 .oob_data_flag = 0x00,
806 .authreq = 0x0d,
807 .max_enc_key_size = 0x10,
808 .init_key_dist = 0x0d,
809 .resp_key_dist = 0x0f,
810 },
811 .pair_rsp = {
812 .io_cap = 0x00,
813 .oob_data_flag = 0x00,
814 .authreq = 0x0d,
815 .max_enc_key_size = 0x10,
816 .init_key_dist = 0x05,
817 .resp_key_dist = 0x07,
818 },
819 .our_priv_key = {
820 0xd6, 0x2f, 0x4f, 0x6b, 0xeb, 0xfc, 0xbd, 0xee,
821 0x9b, 0x94, 0xd7, 0x15, 0x98, 0xc6, 0x0c, 0x83,
822 0x9b, 0xc7, 0xa2, 0x45, 0xfd, 0x00, 0xe8, 0xa4,
823 0x52, 0xe9, 0x70, 0x2f, 0xd7, 0x62, 0xf1, 0xa4,
824 },
825 .public_key_req = {
826 .x = {
827 0xd6, 0xa7, 0xaf, 0xc1, 0x18, 0x8b, 0x92, 0x2f,
828 0xbc, 0xbc, 0x4d, 0xb8, 0x5c, 0xfb, 0x39, 0x7c,
829 0x1e, 0x90, 0x7e, 0xfa, 0xa2, 0x0d, 0xee, 0x9e,
830 0xb4, 0x9e, 0xbe, 0x50, 0xf0, 0xbc, 0x2c, 0x10,
831 },
832 .y = {
833 0xa4, 0x25, 0xad, 0x75, 0xbe, 0xab, 0x1e, 0xcf,
834 0x4e, 0xc8, 0x19, 0xab, 0x6c, 0x68, 0x38, 0xa4,
835 0xe7, 0x43, 0x7b, 0x19, 0xef, 0x28, 0xd5, 0x93,
836 0x52, 0xe9, 0xb9, 0x31, 0x68, 0x60, 0x19, 0x71,
837 },
838 },
839 .public_key_rsp = {
840 .x = {
841 0xbc, 0x6a, 0xcf, 0xc6, 0x8a, 0x3a, 0xdc, 0x89,
842 0xdd, 0xa9, 0xaf, 0x29, 0xc7, 0xaf, 0xe2, 0x8b,
843 0x25, 0xee, 0xce, 0xa6, 0x10, 0x1d, 0x33, 0x2f,
844 0xd5, 0xfc, 0x30, 0xb8, 0xb1, 0x7b, 0xb1, 0x6e,
845 },
846 .y = {
847 0x1a, 0xc6, 0x42, 0x36, 0x98, 0x40, 0x4f, 0x90,
848 0x82, 0xa0, 0x10, 0x3a, 0xa5, 0x0f, 0xcf, 0x57,
849 0xd2, 0x2e, 0x80, 0x9d, 0x61, 0xc7, 0x21, 0xac,
850 0x47, 0x5b, 0x93, 0x75, 0x02, 0x30, 0x40, 0x14,
851 },
852 },
853 .confirm_req[0] = {
854 .value = {
855 0xd1, 0x64, 0x49, 0xa0, 0xc4, 0x28, 0x81, 0x57,
856 0x0c, 0x25, 0x62, 0xfb, 0x2c, 0xa2, 0xb0, 0xc7,
857 },
858 },
859 .confirm_rsp[0] = {
860 .value = {
861 0xea, 0xae, 0x4e, 0x03, 0x00, 0xf9, 0xd1, 0x65,
862 0xc7, 0x6a, 0x0d, 0x74, 0x4f, 0x02, 0x0b, 0x94,
863 },
864 },
865 .random_req[0] = {
866 .value = {
867 0x05, 0xb2, 0x09, 0x9b, 0x36, 0x23, 0x4f, 0x74,
868 0x4e, 0xc9, 0x7a, 0x2c, 0x65, 0x3a, 0xd1, 0xf6,
869 },
870 },
871 .random_rsp[0] = {
872 .value = {
873 0x50, 0xd8, 0x88, 0xd4, 0x7e, 0xc1, 0x36, 0x92,
874 0x0f, 0xa7, 0x17, 0x3c, 0xb4, 0xeb, 0xee, 0xa6,
875 },
876 },
877 .confirm_req[1] = {
878 .value = {
879 0xab, 0xa2, 0xd0, 0xec, 0xdd, 0xf3, 0xd2, 0xa9,
880 0x2d, 0xde, 0x4b, 0x02, 0x66, 0x45, 0x2f, 0xc0,
881 },
882 },
883 .confirm_rsp[1] = {
884 .value = {
885 0xa9, 0xc1, 0x9d, 0x75, 0xd0, 0xb6, 0xec, 0x06,
886 0x31, 0x87, 0xb6, 0x9d, 0x31, 0xdc, 0x92, 0x7c,
887 },
888 },
889 .random_req[1] = {
890 .value = {
891 0xb9, 0x5b, 0xe0, 0x0f, 0x83, 0xe7, 0x2d, 0x77,
892 0x2f, 0x55, 0x0a, 0x2c, 0xd9, 0xc1, 0x46, 0xcd,
893 },
894 },
895 .random_rsp[1] = {
896 .value = {
897 0xa2, 0x9a, 0x5b, 0x99, 0xb1, 0xc0, 0xc5, 0xd6,
898 0xf1, 0x87, 0x0b, 0x49, 0x9c, 0xfd, 0xfe, 0xd5,
899 },
900 },
901 .confirm_req[2] = {
902 .value = {
903 0x3a, 0x9d, 0x58, 0xe5, 0xb0, 0x31, 0xd9, 0xde,
904 0xac, 0xd2, 0x44, 0xb7, 0xe1, 0xe5, 0x89, 0x50,
905 },
906 },
907 .confirm_rsp[2] = {
908 .value = {
909 0xae, 0x4e, 0x4f, 0x84, 0x5f, 0x4c, 0xd1, 0x9b,
910 0x81, 0x22, 0x9c, 0x68, 0x52, 0xe0, 0x9a, 0xfc,
911 },
912 },
913 .random_req[2] = {
914 .value = {
915 0xa5, 0xbb, 0x5f, 0x9a, 0xa2, 0x97, 0xdb, 0xcd,
916 0x3d, 0xfe, 0xd9, 0x58, 0x21, 0x52, 0x99, 0xb7,
917 },
918 },
919 .random_rsp[2] = {
920 .value = {
921 0xea, 0x44, 0xdd, 0x0c, 0xbf, 0xb5, 0x6b, 0xc7,
922 0xe1, 0x19, 0xe8, 0x0b, 0xc2, 0x15, 0x04, 0x37,
923 },
924 },
925 .confirm_req[3] = {
926 .value = {
927 0xa8, 0xa3, 0xdb, 0x08, 0xca, 0x31, 0xd5, 0xef,
928 0x17, 0x37, 0x77, 0xd0, 0x64, 0x2e, 0x2f, 0x2f,
929 },
930 },
931 .confirm_rsp[3] = {
932 .value = {
933 0xe4, 0xf6, 0xa5, 0x94, 0x1a, 0x09, 0x4b, 0x75,
934 0x79, 0xb8, 0x0c, 0xe6, 0xe2, 0x28, 0x5a, 0x2c,
935 },
936 },
937 .random_req[3] = {
938 .value = {
939 0x1a, 0x3f, 0x80, 0x6f, 0xd3, 0xe8, 0xc5, 0xfb,
940 0x9b, 0xda, 0xa1, 0x07, 0x68, 0x1a, 0x54, 0xbc,
941 },
942 },
943 .random_rsp[3] = {
944 .value = {
945 0x1b, 0x48, 0x22, 0x87, 0x04, 0x24, 0x87, 0xba,
946 0x14, 0xb9, 0x85, 0xb2, 0xa6, 0xf5, 0xea, 0x89,
947 },
948 },
949 .confirm_req[4] = {
950 .value = {
951 0x31, 0xcb, 0xc4, 0x0c, 0x36, 0xb5, 0xe2, 0x32,
952 0xd8, 0x0e, 0xd3, 0x86, 0x96, 0xe3, 0x8c, 0x84,
953 },
954 },
955 .confirm_rsp[4] = {
956 .value = {
957 0x90, 0x11, 0x30, 0x35, 0x5f, 0xe5, 0x45, 0xff,
958 0xab, 0xd3, 0xe0, 0xbe, 0x1c, 0x20, 0x23, 0xb8,
959 },
960 },
961 .random_req[4] = {
962 .value = {
963 0xa0, 0xc7, 0x79, 0x28, 0x87, 0x19, 0xa3, 0x78,
964 0x33, 0xe5, 0x1a, 0x81, 0xba, 0x9b, 0xe3, 0x5c,
965 },
966 },
967 .random_rsp[4] = {
968 .value = {
969 0x43, 0xcf, 0x20, 0x1b, 0x39, 0x3f, 0xdf, 0x73,
970 0x58, 0xd2, 0x0d, 0xc7, 0x41, 0xd7, 0x58, 0xea,
971 },
972 },
973 .confirm_req[5] = {
974 .value = {
975 0x59, 0xda, 0x78, 0xeb, 0xd5, 0xcd, 0x8e, 0x23,
976 0xe5, 0x5e, 0xa7, 0xa5, 0xba, 0x13, 0x00, 0xff,
977 },
978 },
979 .confirm_rsp[5] = {
980 .value = {
981 0x31, 0x7a, 0xf0, 0x56, 0x82, 0x69, 0xdb, 0xcd,
982 0x27, 0x5a, 0x11, 0xd3, 0x65, 0x82, 0x0d, 0xda,
983 },
984 },
985 .random_req[5] = {
986 .value = {
987 0x2e, 0xe8, 0x76, 0x40, 0x9c, 0x49, 0x07, 0x42,
988 0x1e, 0x45, 0x7b, 0x1e, 0x73, 0xa3, 0x71, 0x05,
989 },
990 },
991 .random_rsp[5] = {
992 .value = {
993 0x64, 0x99, 0x42, 0x5d, 0x05, 0xd6, 0x12, 0x41,
994 0x2a, 0x44, 0x55, 0x26, 0xe7, 0x08, 0x5e, 0xfb,
995 },
996 },
997 .confirm_req[6] = {
998 .value = {
999 0x1c, 0x55, 0xe1, 0x75, 0x4f, 0x6e, 0xdd, 0x7e,
1000 0xc8, 0xff, 0x76, 0x25, 0xdb, 0x2a, 0x6d, 0xe3,
1001 },
1002 },
1003 .confirm_rsp[6] = {
1004 .value = {
1005 0xf6, 0x36, 0x78, 0x88, 0x62, 0xa8, 0x78, 0xe6,
1006 0xf9, 0xa1, 0x17, 0x63, 0x86, 0xd3, 0xae, 0x60,
1007 },
1008 },
1009 .random_req[6] = {
1010 .value = {
1011 0x96, 0x9a, 0x1c, 0xbe, 0x82, 0x82, 0xc2, 0xa7,
1012 0x18, 0xc3, 0x7b, 0x40, 0x5d, 0x6c, 0x4e, 0xe3,
1013 },
1014 },
1015 .random_rsp[6] = {
1016 .value = {
1017 0x2b, 0x7d, 0x36, 0xc3, 0xf7, 0x59, 0x63, 0x40,
1018 0x6f, 0xc0, 0x2a, 0x2b, 0x1b, 0xd7, 0x41, 0x38,
1019 },
1020 },
1021 .confirm_req[7] = {
1022 .value = {
1023 0x88, 0x99, 0x53, 0xae, 0x2a, 0xaf, 0x97, 0x5a,
1024 0xcc, 0x9f, 0xfd, 0xe2, 0x1d, 0xd3, 0x27, 0x66,
1025 },
1026 },
1027 .confirm_rsp[7] = {
1028 .value = {
1029 0xdb, 0xae, 0xfb, 0xf7, 0x33, 0xd4, 0xd1, 0xcb,
1030 0xfe, 0x75, 0x8e, 0x81, 0x16, 0xd1, 0x49, 0xeb,
1031 },
1032 },
1033 .random_req[7] = {
1034 .value = {
1035 0x13, 0x5c, 0x00, 0x34, 0xe5, 0x96, 0xd0, 0x97,
1036 0xb1, 0x84, 0x3d, 0x00, 0xb4, 0x2a, 0x4a, 0x12,
1037 },
1038 },
1039 .random_rsp[7] = {
1040 .value = {
1041 0xed, 0x94, 0x1f, 0x41, 0x12, 0xe5, 0x35, 0x5b,
1042 0xa6, 0x6a, 0x72, 0x1e, 0xa2, 0x7c, 0xe1, 0x6c,
1043 },
1044 },
1045 .confirm_req[8] = {
1046 .value = {
1047 0xa3, 0xc7, 0x17, 0xad, 0xb6, 0xe6, 0xaa, 0x16,
1048 0x8d, 0x4b, 0x70, 0x5f, 0x49, 0x73, 0xa7, 0x19,
1049 },
1050 },
1051 .confirm_rsp[8] = {
1052 .value = {
1053 0x10, 0xb0, 0x31, 0xa7, 0x16, 0x61, 0xf7, 0xd6,
1054 0xe6, 0x16, 0x9e, 0xb1, 0x9e, 0xb5, 0x5e, 0x94,
1055 },
1056 },
1057 .random_req[8] = {
1058 .value = {
1059 0x6f, 0xe7, 0x62, 0x73, 0xfb, 0xbf, 0xf1, 0x4a,
1060 0x14, 0xa1, 0x09, 0x45, 0xd4, 0xde, 0x26, 0xad,
1061 },
1062 },
1063 .random_rsp[8] = {
1064 .value = {
1065 0x3f, 0x48, 0xa7, 0xdf, 0x4a, 0xd5, 0x55, 0x26,
1066 0xd3, 0x32, 0xbf, 0x98, 0x4a, 0x20, 0xad, 0xb0,
1067 },
1068 },
1069 .confirm_req[9] = {
1070 .value = {
1071 0x88, 0x1c, 0xef, 0xfe, 0x4e, 0x68, 0x41, 0x7c,
1072 0xe8, 0xe8, 0x81, 0x1a, 0xb9, 0x9e, 0xaf, 0xc6,
1073 },
1074 },
1075 .confirm_rsp[9] = {
1076 .value = {
1077 0xa3, 0x53, 0x2a, 0xe1, 0xbd, 0x9d, 0xbe, 0x89,
1078 0xf8, 0xc7, 0x70, 0x6e, 0xa9, 0x12, 0x07, 0x0d,
1079 },
1080 },
1081 .random_req[9] = {
1082 .value = {
1083 0x52, 0x06, 0x56, 0x09, 0xf4, 0xb2, 0xb9, 0x63,
1084 0x3f, 0x2e, 0x59, 0x6c, 0x6b, 0x43, 0xb6, 0xc0,
1085 },
1086 },
1087 .random_rsp[9] = {
1088 .value = {
1089 0x36, 0xb0, 0x33, 0x84, 0x52, 0xd1, 0x60, 0xac,
1090 0x37, 0x81, 0x6b, 0x18, 0x5f, 0xfc, 0x61, 0xb1,
1091 },
1092 },
1093 .confirm_req[10] = {
1094 .value = {
1095 0xc8, 0x55, 0xb7, 0x9e, 0x3e, 0xf0, 0x26, 0xa4,
1096 0x55, 0xb3, 0x1d, 0x4d, 0xa1, 0x5d, 0xa9, 0xaf,
1097 },
1098 },
1099 .confirm_rsp[10] = {
1100 .value = {
1101 0xb7, 0xb9, 0x6b, 0x8e, 0xef, 0xd3, 0xbc, 0x58,
1102 0x10, 0xbe, 0x5a, 0x9a, 0x4d, 0xbc, 0xec, 0xe3,
1103 },
1104 },
1105 .random_req[10] = {
1106 .value = {
1107 0x55, 0xa1, 0xf4, 0xd7, 0xfa, 0xe1, 0x84, 0x03,
1108 0xed, 0xb6, 0x95, 0x63, 0x4b, 0x93, 0x93, 0xc2,
1109 },
1110 },
1111 .random_rsp[10] = {
1112 .value = {
1113 0x72, 0xa9, 0xe5, 0xf7, 0x48, 0x1f, 0x64, 0x71,
1114 0xd9, 0x81, 0xf0, 0xc5, 0x4d, 0x38, 0xac, 0x9a,
1115 },
1116 },
1117 .confirm_req[11] = {
1118 .value = {
1119 0x12, 0x37, 0x56, 0xa6, 0x66, 0xa1, 0x23, 0xee,
1120 0xe3, 0x1e, 0x20, 0x66, 0x66, 0x85, 0x7c, 0xa8,
1121 },
1122 },
1123 .confirm_rsp[11] = {
1124 .value = {
1125 0x74, 0xaa, 0xbb, 0x5a, 0xdf, 0xd9, 0xc4, 0xaf,
1126 0xe4, 0xa7, 0xe6, 0x4b, 0x45, 0x97, 0xf8, 0x7d,
1127 },
1128 },
1129 .random_req[11] = {
1130 .value = {
1131 0x29, 0xce, 0xcc, 0xb7, 0xb2, 0x1e, 0x0e, 0xa8,
1132 0x48, 0x90, 0x43, 0x6d, 0x34, 0xa4, 0xa3, 0x12,
1133 },
1134 },
1135 .random_rsp[11] = {
1136 .value = {
1137 0x2e, 0xaf, 0x4c, 0x63, 0x84, 0x2c, 0x62, 0x67,
1138 0x68, 0x8f, 0x0b, 0xfd, 0xff, 0xef, 0x15, 0x26,
1139 },
1140 },
1141 .confirm_req[12] = {
1142 .value = {
1143 0xec, 0xcf, 0x6a, 0x60, 0x77, 0x04, 0x2c, 0x62,
1144 0x42, 0xf0, 0x21, 0xfd, 0x53, 0xd6, 0x8a, 0xe8,
1145 },
1146 },
1147 .confirm_rsp[12] = {
1148 .value = {
1149 0x2c, 0x13, 0x65, 0x69, 0xd7, 0x66, 0x04, 0x13,
1150 0x3c, 0xa8, 0xfb, 0xe5, 0x76, 0xbb, 0x4f, 0x48,
1151 },
1152 },
1153 .random_req[12] = {
1154 .value = {
1155 0x0d, 0x93, 0x30, 0xe2, 0x76, 0xf1, 0xbc, 0x24,
1156 0x61, 0x0d, 0xcd, 0xef, 0x33, 0x98, 0xe2, 0x3b,
1157 },
1158 },
1159 .random_rsp[12] = {
1160 .value = {
1161 0xb6, 0x32, 0x69, 0x81, 0xc0, 0x81, 0x46, 0xae,
1162 0x8d, 0x5a, 0x17, 0xb5, 0xc0, 0x0f, 0x9f, 0x4e,
1163 },
1164 },
1165 .confirm_req[13] = {
1166 .value = {
1167 0x89, 0x96, 0x22, 0x0c, 0x76, 0xdf, 0x27, 0x13,
1168 0x96, 0x5a, 0x0c, 0x88, 0x65, 0x18, 0x74, 0x52,
1169 },
1170 },
1171 .confirm_rsp[13] = {
1172 .value = {
1173 0x1c, 0x77, 0x25, 0x22, 0xc0, 0x28, 0x88, 0x45,
1174 0x29, 0x62, 0x7a, 0x8e, 0xc0, 0x2a, 0x5c, 0xd8,
1175 },
1176 },
1177 .random_req[13] = {
1178 .value = {
1179 0xcc, 0x84, 0xb6, 0x98, 0x3e, 0xf9, 0x09, 0xd2,
1180 0x71, 0x47, 0x56, 0xb1, 0x09, 0xf5, 0xd2, 0x0b,
1181 },
1182 },
1183 .random_rsp[13] = {
1184 .value = {
1185 0xf0, 0xcf, 0x1c, 0xa6, 0x24, 0xcd, 0xfa, 0x42,
1186 0xa4, 0x93, 0x8b, 0xa0, 0xe3, 0x42, 0x72, 0x51,
1187 },
1188 },
1189 .confirm_req[14] = {
1190 .value = {
1191 0xab, 0xb0, 0xa3, 0x80, 0x0d, 0xcb, 0x8e, 0xf6,
1192 0x6c, 0x07, 0x50, 0xe9, 0x8a, 0x85, 0x02, 0xae,
1193 },
1194 },
1195 .confirm_rsp[14] = {
1196 .value = {
1197 0xf6, 0x52, 0xd8, 0x34, 0x15, 0x62, 0x9f, 0x6e,
1198 0x2b, 0x52, 0xdc, 0x1c, 0x70, 0x17, 0x0a, 0x31,
1199 },
1200 },
1201 .random_req[14] = {
1202 .value = {
1203 0x8d, 0xc9, 0x0a, 0x45, 0xe9, 0x81, 0x0d, 0x5e,
1204 0xbb, 0xd8, 0x94, 0x29, 0x68, 0x42, 0x44, 0xe2,
1205 },
1206 },
1207 .random_rsp[14] = {
1208 .value = {
1209 0x96, 0x2a, 0x35, 0x39, 0x09, 0xf7, 0x66, 0x5a,
1210 0xb6, 0x33, 0x77, 0x6d, 0xba, 0xd3, 0x8a, 0xfb,
1211 },
1212 },
1213 .confirm_req[15] = {
1214 .value = {
1215 0x53, 0x08, 0x9b, 0x37, 0xc3, 0x79, 0xe6, 0x8c,
1216 0x42, 0x30, 0x94, 0x73, 0x6f, 0x39, 0x64, 0x20,
1217 },
1218 },
1219 .confirm_rsp[15] = {
1220 .value = {
1221 0x4d, 0xb7, 0xe9, 0x50, 0x8e, 0x0f, 0xe0, 0xd5,
1222 0x3e, 0xf6, 0x32, 0xdd, 0xb8, 0x18, 0x77, 0xd3,
1223 },
1224 },
1225 .random_req[15] = {
1226 .value = {
1227 0x8d, 0x49, 0x14, 0xdd, 0x95, 0x57, 0x55, 0x14,
1228 0x48, 0x97, 0xd3, 0x73, 0x29, 0xa0, 0xb9, 0x2b,
1229 },
1230 },
1231 .random_rsp[15] = {
1232 .value = {
1233 0xcf, 0x38, 0x8b, 0xab, 0xe4, 0x2b, 0x3f, 0x13,
1234 0xc3, 0xfb, 0x07, 0xee, 0x0e, 0x33, 0x2f, 0x04,
1235 },
1236 },
1237 .confirm_req[16] = {
1238 .value = {
1239 0xc6, 0x58, 0x13, 0x19, 0x56, 0x06, 0x52, 0x4b,
1240 0x3d, 0x5e, 0x9d, 0xa8, 0x48, 0xf2, 0x40, 0xf3,
1241 },
1242 },
1243 .confirm_rsp[16] = {
1244 .value = {
1245 0xbb, 0x93, 0xd2, 0xed, 0x89, 0x66, 0xa5, 0x1c,
1246 0xc9, 0x2a, 0x42, 0x2c, 0xff, 0x4a, 0x80, 0x84,
1247 },
1248 },
1249 .random_req[16] = {
1250 .value = {
1251 0x3d, 0x9c, 0x11, 0x2a, 0xd3, 0xce, 0x4b, 0x20,
1252 0xf2, 0xfb, 0xdd, 0x18, 0x4d, 0x7c, 0x58, 0xb6,
1253 },
1254 },
1255 .random_rsp[16] = {
1256 .value = {
1257 0xda, 0x80, 0x63, 0x9d, 0xa2, 0x73, 0x61, 0xdd,
1258 0x9a, 0x45, 0x91, 0x4d, 0x78, 0x39, 0x54, 0x75,
1259 },
1260 },
1261 .confirm_req[17] = {
1262 .value = {
1263 0x2e, 0xe4, 0x44, 0xe8, 0xdb, 0xc2, 0xbd, 0x62,
1264 0xd1, 0xc4, 0x23, 0x4e, 0x5f, 0x65, 0xb6, 0x3b,
1265 },
1266 },
1267 .confirm_rsp[17] = {
1268 .value = {
1269 0x19, 0x91, 0xa3, 0xc7, 0x3b, 0x68, 0x12, 0x24,
1270 0xcd, 0xd6, 0x02, 0xf5, 0xcd, 0x19, 0x6c, 0x88,
1271 },
1272 },
1273 .random_req[17] = {
1274 .value = {
1275 0xf0, 0x28, 0x18, 0xe8, 0xa7, 0x3e, 0xd8, 0x21,
1276 0x42, 0x58, 0xb3, 0x72, 0xa0, 0x34, 0x89, 0x04,
1277 },
1278 },
1279 .random_rsp[17] = {
1280 .value = {
1281 0xe9, 0xff, 0x0b, 0x9a, 0xfd, 0x29, 0x95, 0x37,
1282 0x89, 0x2c, 0x84, 0xfa, 0x02, 0xa0, 0xb6, 0xeb,
1283 },
1284 },
1285 .confirm_req[18] = {
1286 .value = {
1287 0x4f, 0x90, 0x70, 0xbe, 0xc4, 0x81, 0x9f, 0xc1,
1288 0x74, 0xa3, 0x01, 0x2e, 0x78, 0x7a, 0xe2, 0x61,
1289 },
1290 },
1291 .confirm_rsp[18] = {
1292 .value = {
1293 0xbb, 0xd5, 0x91, 0xec, 0x81, 0xe0, 0x9b, 0x5e,
1294 0xe9, 0xd2, 0x93, 0x57, 0xa8, 0x27, 0xdd, 0x9b,
1295 },
1296 },
1297 .random_req[18] = {
1298 .value = {
1299 0x78, 0xa4, 0x35, 0x1a, 0xbc, 0xa7, 0x19, 0x8c,
1300 0x96, 0x8f, 0x63, 0x9d, 0x11, 0xee, 0x27, 0x44,
1301 },
1302 },
1303 .random_rsp[18] = {
1304 .value = {
1305 0x39, 0x5b, 0x71, 0xfd, 0x7e, 0x39, 0x6b, 0xbe,
1306 0xaf, 0xe1, 0x55, 0x90, 0xa6, 0x58, 0xec, 0xc5,
1307 },
1308 },
1309 .confirm_req[19] = {
1310 .value = {
1311 0x91, 0x43, 0xe5, 0xc8, 0x26, 0x0c, 0x8c, 0x6c,
1312 0xf3, 0xd1, 0x30, 0xb3, 0x22, 0x94, 0x4c, 0x67,
1313 },
1314 },
1315 .confirm_rsp[19] = {
1316 .value = {
1317 0x51, 0xc4, 0x3e, 0x09, 0xca, 0x03, 0xbe, 0x2c,
1318 0xe8, 0x1a, 0x5d, 0x07, 0x12, 0x14, 0x2d, 0x43,
1319 },
1320 },
1321 .random_req[19] = {
1322 .value = {
1323 0x2f, 0xa1, 0x20, 0xde, 0xf5, 0xb4, 0xa6, 0x92,
1324 0x31, 0xe9, 0x86, 0x63, 0xef, 0xc1, 0x85, 0x3b,
1325 },
1326 },
1327 .random_rsp[19] = {
1328 .value = {
1329 0x41, 0xd0, 0xd0, 0x96, 0x93, 0xd1, 0xcb, 0xed,
1330 0xab, 0x27, 0xd5, 0x88, 0x5e, 0xe6, 0x5e, 0x5c,
1331 },
1332 },
1333 .dhkey_check_req = {
1334 .value = {
1335 0xec, 0xc5, 0x5f, 0xf3, 0xae, 0xfe, 0x79, 0x65,
1336 0x17, 0x5a, 0x60, 0xf7, 0x36, 0x4f, 0x90, 0x45,
1337 },
1338 },
1339 .dhkey_check_rsp = {
1340 .value = {
1341 0xa7, 0x45, 0x7a, 0x54, 0x1b, 0x64, 0x08, 0x60,
1342 0x51, 0x7d, 0x74, 0x27, 0x48, 0xa2, 0xf1, 0x0f,
1343 },
1344 },
1345 .id_info_req = {
1346 .irk = {
1347 0xef, 0x8d, 0xe2, 0x16, 0x4f, 0xec, 0x43, 0x0d,
1348 0xbf, 0x5b, 0xdd, 0x34, 0xc0, 0x53, 0x1e, 0xb8,
1349 },
1350 },
1351 .id_addr_info_req = {
1352 .addr_type = 0,
1353 .bd_addr = {
1354 0x33, 0x22, 0x11, 0x00, 0x45, 0x0a,
1355 },
1356 },
1357 .sign_info_req = {
1358 .sig_key = {
1359 0x36, 0x9a, 0xd9, 0x25, 0x5c, 0xdb, 0x78, 0xdc,
1360 0x1d, 0x2c, 0x83, 0xf7, 0xde, 0x99, 0xa0, 0x66,
1361 },
1362 },
1363 .sign_info_rsp = {
1364 .sig_key = {
1365 0x61, 0x6e, 0x9a, 0x26, 0xc5, 0xd0, 0x85, 0xdc,
1366 0xea, 0x9d, 0xca, 0x3b, 0x17, 0xd7, 0x43, 0x80,
1367 },
1368 },
1369 .ltk = {
1370 0xd6, 0x02, 0xba, 0x3d, 0xa2, 0xce, 0x93, 0x1a,
1371 0xfd, 0xd6, 0xb5, 0x54, 0x90, 0xc4, 0x2a, 0x8f,
1372 },
1373 .pair_alg = BLE_SM_PAIR_ALG_PASSKEY,
1374 .authenticated = 1,
1375 .passkey_info = {
1376 .passkey = {
1377 .action = BLE_SM_IOACT_DISP,
1378 .passkey = 222333,
1379 },
1380 },
1381 };
1382 ble_sm_test_util_peer_sc_good(¶ms);
1383 }
1384
1385 /**
1386 * Secure connections pairing
1387 * Master: peer
1388 * Pair algorithm: numeric comparison
1389 * Initiator IO capabilities: 1
1390 * Responder IO capabilities: 1
1391 * Bonding: true
1392 * Initiator address type: 0
1393 * Responder address type: 0
1394 * Initiator key distribution: 5
1395 * Responder key distribution: 7
1396 */
TEST_CASE(ble_sm_sc_peer_nc_iio1_rio1_b1_iat0_rat0_ik5_rk7)1397 TEST_CASE(ble_sm_sc_peer_nc_iio1_rio1_b1_iat0_rat0_ik5_rk7)
1398 {
1399 struct ble_sm_test_params params;
1400
1401 params = (struct ble_sm_test_params) {
1402 .init_id_addr = {
1403 0xca, 0x61, 0xa0, 0x67, 0x94, 0xe0,
1404 },
1405 .resp_id_addr = {
1406 0x33, 0x22, 0x11, 0x00, 0x45, 0x0a,
1407 },
1408 .pair_req = {
1409 .io_cap = 0x01,
1410 .oob_data_flag = 0x00,
1411 .authreq = 0x0d,
1412 .max_enc_key_size = 0x10,
1413 .init_key_dist = 0x0d,
1414 .resp_key_dist = 0x0f,
1415 },
1416 .pair_rsp = {
1417 .io_cap = 0x01,
1418 .oob_data_flag = 0x00,
1419 .authreq = 0x0d,
1420 .max_enc_key_size = 0x10,
1421 .init_key_dist = 0x05,
1422 .resp_key_dist = 0x07,
1423 },
1424 .our_priv_key = {
1425 0xd6, 0x2f, 0x4f, 0x6b, 0xeb, 0xfc, 0xbd, 0xee,
1426 0x9b, 0x94, 0xd7, 0x15, 0x98, 0xc6, 0x0c, 0x83,
1427 0x9b, 0xc7, 0xa2, 0x45, 0xfd, 0x00, 0xe8, 0xa4,
1428 0x52, 0xe9, 0x70, 0x2f, 0xd7, 0x62, 0xf1, 0xa4,
1429 },
1430 .public_key_req = {
1431 .x = {
1432 0x41, 0x0d, 0x95, 0x8a, 0x68, 0xb8, 0xcf, 0x07,
1433 0x58, 0x25, 0x5f, 0x97, 0xd2, 0x99, 0x71, 0x44,
1434 0x06, 0xfc, 0x9c, 0x4d, 0xd1, 0x74, 0x80, 0xed,
1435 0x49, 0xd1, 0x36, 0x6b, 0x55, 0x8b, 0x54, 0x3b,
1436 },
1437 .y = {
1438 0x0f, 0x1a, 0x61, 0x45, 0xe5, 0x4b, 0x11, 0x13,
1439 0xb3, 0x15, 0x87, 0x09, 0xec, 0x16, 0xf8, 0x41,
1440 0x2e, 0xe2, 0x15, 0x93, 0x14, 0x56, 0x9f, 0xcd,
1441 0x60, 0x7d, 0x92, 0xec, 0xd3, 0xb5, 0x85, 0xc5,
1442 },
1443 },
1444 .public_key_rsp = {
1445 .x = {
1446 0xbc, 0x6a, 0xcf, 0xc6, 0x8a, 0x3a, 0xdc, 0x89,
1447 0xdd, 0xa9, 0xaf, 0x29, 0xc7, 0xaf, 0xe2, 0x8b,
1448 0x25, 0xee, 0xce, 0xa6, 0x10, 0x1d, 0x33, 0x2f,
1449 0xd5, 0xfc, 0x30, 0xb8, 0xb1, 0x7b, 0xb1, 0x6e,
1450 },
1451 .y = {
1452 0x1a, 0xc6, 0x42, 0x36, 0x98, 0x40, 0x4f, 0x90,
1453 0x82, 0xa0, 0x10, 0x3a, 0xa5, 0x0f, 0xcf, 0x57,
1454 0xd2, 0x2e, 0x80, 0x9d, 0x61, 0xc7, 0x21, 0xac,
1455 0x47, 0x5b, 0x93, 0x75, 0x02, 0x30, 0x40, 0x14,
1456 },
1457 },
1458 .confirm_rsp[0] = {
1459 .value = {
1460 0x73, 0xc8, 0x56, 0x5e, 0x33, 0x37, 0x26, 0xb6,
1461 0x00, 0x65, 0x9c, 0xa1, 0xee, 0xbf, 0x61, 0xf6,
1462 },
1463 },
1464 .random_req[0] = {
1465 .value = {
1466 0x7c, 0x23, 0x03, 0x70, 0x54, 0xa2, 0x70, 0xe4,
1467 0x2d, 0xe9, 0x88, 0x6f, 0x40, 0xd6, 0x2f, 0xb2,
1468 },
1469 },
1470 .random_rsp[0] = {
1471 .value = {
1472 0x2d, 0x9f, 0xe8, 0x1d, 0xf2, 0x4e, 0x2e, 0x58,
1473 0x16, 0x8c, 0x83, 0x89, 0x92, 0x70, 0xa2, 0xba,
1474 },
1475 },
1476 .dhkey_check_req = {
1477 .value = {
1478 0xc0, 0x8a, 0x1c, 0xff, 0x7f, 0xd6, 0xbc, 0xee,
1479 0x19, 0xa5, 0xc6, 0x3a, 0xbd, 0x48, 0x4b, 0xc3,
1480 },
1481 },
1482 .dhkey_check_rsp = {
1483 .value = {
1484 0x38, 0x36, 0x83, 0xd5, 0x1a, 0xfb, 0xe6, 0x3c,
1485 0x80, 0x0c, 0x81, 0x81, 0x78, 0x12, 0x41, 0x38,
1486 },
1487 },
1488 .id_info_req = {
1489 .irk = {
1490 0xef, 0x8d, 0xe2, 0x16, 0x4f, 0xec, 0x43, 0x0d,
1491 0xbf, 0x5b, 0xdd, 0x34, 0xc0, 0x53, 0x1e, 0xb8,
1492 },
1493 },
1494 .id_addr_info_req = {
1495 .addr_type = 0,
1496 .bd_addr = {
1497 0x33, 0x22, 0x11, 0x00, 0x45, 0x0a,
1498 },
1499 },
1500 .sign_info_req = {
1501 .sig_key = {
1502 0x52, 0xf4, 0xcc, 0x2f, 0xc6, 0xc1, 0xdb, 0x07,
1503 0xa5, 0x38, 0xc1, 0x09, 0x82, 0x2e, 0xa3, 0x53,
1504 },
1505 },
1506 .sign_info_rsp = {
1507 .sig_key = {
1508 0xc1, 0xa3, 0x62, 0x6a, 0x9e, 0xaa, 0x37, 0xd9,
1509 0x65, 0x9f, 0x7f, 0x5d, 0x62, 0x0c, 0x1c, 0x6c,
1510 },
1511 },
1512 .ltk = {
1513 0xd8, 0x7f, 0x0a, 0x94, 0x41, 0xa5, 0xfd, 0x84,
1514 0x15, 0x01, 0xb7, 0x2a, 0x7a, 0xe4, 0xfd, 0xfb,
1515 },
1516 .pair_alg = BLE_SM_PAIR_ALG_NUMCMP,
1517 .authenticated = 1,
1518 .passkey_info = {
1519 .passkey = {
1520 .action = BLE_SM_IOACT_NUMCMP,
1521 .numcmp_accept = 1,
1522 },
1523 .exp_numcmp = 516214,
1524 },
1525 };
1526 ble_sm_test_util_peer_sc_good(¶ms);
1527 }
1528
1529 /**
1530 * Secure connections pairing
1531 * Master: us
1532 * Pair algorithm: just works
1533 * Initiator IO capabilities: 3
1534 * Responder IO capabilities: 4
1535 * Bonding: true
1536 * Initiator address type: 0
1537 * Responder address type: 0
1538 * Initiator key distribution: 7
1539 * Responder key distribution: 5
1540 */
TEST_CASE(ble_sm_sc_us_jw_iio3_rio4_b1_iat0_rat0_ik7_rk5)1541 TEST_CASE(ble_sm_sc_us_jw_iio3_rio4_b1_iat0_rat0_ik7_rk5)
1542 {
1543 struct ble_sm_test_params params;
1544
1545 params = (struct ble_sm_test_params) {
1546 .init_id_addr = {
1547 0x01, 0x01, 0x01, 0x07, 0x08, 0x01,
1548 },
1549 .resp_id_addr = {
1550 0xca, 0x61, 0xa0, 0x67, 0x94, 0xe0,
1551 },
1552 .pair_req = {
1553 .io_cap = 0x03,
1554 .oob_data_flag = 0x00,
1555 .authreq = 0x09,
1556 .max_enc_key_size = 0x10,
1557 .init_key_dist = 0x07,
1558 .resp_key_dist = 0x07,
1559 },
1560 .pair_rsp = {
1561 .io_cap = 0x04,
1562 .oob_data_flag = 0x00,
1563 .authreq = 0x09,
1564 .max_enc_key_size = 0x10,
1565 .init_key_dist = 0x07,
1566 .resp_key_dist = 0x05,
1567 },
1568 .our_priv_key = {
1569 0xaf, 0xce, 0x12, 0x45, 0xa8, 0xe0, 0xa9, 0x45,
1570 0x8a, 0x56, 0xc5, 0xbf, 0x3b, 0xf9, 0x04, 0x69,
1571 0xf2, 0xf9, 0xe4, 0xd4, 0x7e, 0xb7, 0xc9, 0x65,
1572 0xb1, 0x68, 0x3e, 0xab, 0xcd, 0x8e, 0x6f, 0x1f,
1573 },
1574 .public_key_req = {
1575 .x = {
1576 0x45, 0xca, 0xda, 0xe3, 0x65, 0x7c, 0xf5, 0x37,
1577 0x36, 0x66, 0x8b, 0x3b, 0x54, 0xb9, 0x2b, 0xb2,
1578 0x09, 0xd5, 0x6e, 0xe0, 0x04, 0x1d, 0xd6, 0x49,
1579 0xff, 0x55, 0x41, 0x35, 0xa0, 0x2f, 0x12, 0xee,
1580 },
1581 .y = {
1582 0x65, 0x41, 0xd3, 0x7b, 0x59, 0xf2, 0xaf, 0x94,
1583 0x78, 0xd8, 0x63, 0xc4, 0x9b, 0x9a, 0x9a, 0x92,
1584 0x33, 0x0f, 0x14, 0x67, 0x98, 0x51, 0x9d, 0xff,
1585 0xef, 0x59, 0xb7, 0x17, 0xc2, 0x16, 0x72, 0x18,
1586 },
1587 },
1588 .public_key_rsp = {
1589 .x = {
1590 0x9e, 0x44, 0x09, 0x57, 0xb7, 0x01, 0x78, 0x5b,
1591 0x4e, 0x50, 0x0d, 0x99, 0x0d, 0x52, 0x88, 0x24,
1592 0x19, 0xf5, 0x40, 0x53, 0x06, 0x1e, 0x68, 0xd0,
1593 0xfd, 0xd2, 0x84, 0x8b, 0xae, 0x9d, 0xf7, 0xd9,
1594 },
1595 .y = {
1596 0xc2, 0xe7, 0xe0, 0x01, 0xb3, 0x2a, 0x1b, 0x01,
1597 0x19, 0xd1, 0x14, 0xb5, 0xc8, 0x98, 0x02, 0x2a,
1598 0xbe, 0x6b, 0x33, 0x1a, 0x99, 0x18, 0x77, 0x23,
1599 0xd4, 0x8b, 0x8c, 0x09, 0xf5, 0x77, 0x20, 0xa0,
1600 },
1601 },
1602 .confirm_rsp[0] = {
1603 .value = {
1604 0xbd, 0x85, 0xbe, 0x80, 0xd9, 0x77, 0x16, 0xa3,
1605 0x65, 0x1a, 0xdf, 0xff, 0x5a, 0x6f, 0x8b, 0x37,
1606 },
1607 },
1608 .random_req[0] = {
1609 .value = {
1610 0xb5, 0x59, 0x7c, 0x8e, 0x7b, 0x01, 0xac, 0x09,
1611 0x8f, 0xe8, 0x97, 0x98, 0x8d, 0x3f, 0xb7, 0x63,
1612 },
1613 },
1614 .random_rsp[0] = {
1615 .value = {
1616 0x86, 0x1f, 0x76, 0x11, 0x2e, 0x83, 0xed, 0x99,
1617 0x9b, 0xc0, 0x9a, 0xab, 0x7f, 0x94, 0x20, 0xcb,
1618 },
1619 },
1620 .dhkey_check_req = {
1621 .value = {
1622 0xe0, 0x9f, 0x87, 0x87, 0x9f, 0x82, 0xc5, 0x06,
1623 0x5f, 0x11, 0xfa, 0xa0, 0xe3, 0xbf, 0x72, 0xf2,
1624 },
1625 },
1626 .dhkey_check_rsp = {
1627 .value = {
1628 0x26, 0xc2, 0xf1, 0xb9, 0xf1, 0xc2, 0xbd, 0xcb,
1629 0xdb, 0x94, 0x96, 0x8e, 0x08, 0xcc, 0x53, 0xd4,
1630 },
1631 },
1632 .sign_info_req = {
1633 .sig_key = {
1634 0x74, 0x14, 0xcd, 0x5a, 0x49, 0x2e, 0xb6, 0x0d,
1635 0xc6, 0x82, 0xb0, 0x0f, 0x9c, 0xe6, 0xe5, 0x41,
1636 },
1637 },
1638 .id_info_rsp = {
1639 .irk = {
1640 0xef, 0x8d, 0xe2, 0x16, 0x4f, 0xec, 0x43, 0x0d,
1641 0xbf, 0x5b, 0xdd, 0x34, 0xc0, 0x53, 0x1e, 0xb8,
1642 },
1643 },
1644 .id_addr_info_rsp = {
1645 .addr_type = 0,
1646 .bd_addr = {
1647 0x01, 0x01, 0x01, 0x07, 0x08, 0x01,
1648 },
1649 },
1650 .sign_info_rsp = {
1651 .sig_key = {
1652 0xfb, 0x93, 0xa2, 0xb7, 0x4d, 0x0e, 0xcc, 0x92,
1653 0xe4, 0xbf, 0x5b, 0x3c, 0x6d, 0x87, 0x5b, 0x2d,
1654 },
1655 },
1656 .ltk = {
1657 0x2e, 0x6c, 0x8b, 0xdb, 0x9e, 0x19, 0x3e, 0x3d,
1658 0x4d, 0x6d, 0x29, 0xbc, 0x89, 0xca, 0x57, 0xed,
1659 },
1660 .pair_alg = BLE_SM_PAIR_ALG_JW,
1661 .authenticated = 0,
1662 .passkey_info = {
1663 .passkey = {
1664 .action = BLE_SM_IOACT_NONE,
1665 },
1666 },
1667 };
1668 ble_sm_test_util_us_sc_good(¶ms);
1669 }
1670
1671 /**
1672 * Secure connections pairing
1673 * Master: us
1674 * Pair algorithm: passkey entry
1675 * Initiator IO capabilities: 2
1676 * Responder IO capabilities: 4
1677 * Bonding: true
1678 * Initiator address type: 0
1679 * Responder address type: 0
1680 * Initiator key distribution: 7
1681 * Responder key distribution: 5
1682 */
TEST_CASE(ble_sm_sc_us_pk_iio2_rio4_b1_iat0_rat0_ik7_rk5)1683 TEST_CASE(ble_sm_sc_us_pk_iio2_rio4_b1_iat0_rat0_ik7_rk5)
1684 {
1685 struct ble_sm_test_params params;
1686
1687 params = (struct ble_sm_test_params) {
1688 .init_id_addr = {
1689 0x01, 0x01, 0x01, 0x07, 0x08, 0x01,
1690 },
1691 .resp_id_addr = {
1692 0xca, 0x61, 0xa0, 0x67, 0x94, 0xe0,
1693 },
1694 .pair_req = {
1695 .io_cap = 0x02,
1696 .oob_data_flag = 0x00,
1697 .authreq = 0x0d,
1698 .max_enc_key_size = 0x10,
1699 .init_key_dist = 0x07,
1700 .resp_key_dist = 0x07,
1701 },
1702 .pair_rsp = {
1703 .io_cap = 0x04,
1704 .oob_data_flag = 0x00,
1705 .authreq = 0x0d,
1706 .max_enc_key_size = 0x10,
1707 .init_key_dist = 0x07,
1708 .resp_key_dist = 0x05,
1709 },
1710 .our_priv_key = {
1711 0xb1, 0x6b, 0x4f, 0x81, 0xbc, 0xe3, 0x60, 0x9e,
1712 0x00, 0x20, 0xf1, 0x73, 0x3e, 0xfb, 0xcc, 0x6e,
1713 0x8c, 0xb6, 0xd2, 0x51, 0xd9, 0x36, 0x8a, 0x6d,
1714 0xca, 0x8c, 0xd7, 0xbe, 0x96, 0x03, 0xdf, 0xd6,
1715 },
1716 .public_key_req = {
1717 .x = {
1718 0xe5, 0x0f, 0x02, 0x0a, 0x37, 0x90, 0x94, 0x5a,
1719 0x06, 0x21, 0xf7, 0xbc, 0xd5, 0xbe, 0xb9, 0x24,
1720 0x8a, 0x35, 0xfd, 0xf8, 0x5e, 0xe2, 0x70, 0xd5,
1721 0x5a, 0xe8, 0xe7, 0xdd, 0x13, 0x90, 0xeb, 0xd4,
1722 },
1723 .y = {
1724 0x41, 0xc8, 0x51, 0x1a, 0x25, 0x44, 0x01, 0x53,
1725 0x42, 0x74, 0x07, 0x9c, 0x18, 0xe6, 0x3b, 0x8a,
1726 0xce, 0x7a, 0x37, 0x1f, 0x18, 0x5c, 0x02, 0x7c,
1727 0x67, 0x16, 0xf5, 0x30, 0x2b, 0x31, 0xa9, 0xc7,
1728 },
1729 },
1730 .public_key_rsp = {
1731 .x = {
1732 0x1b, 0xd2, 0x03, 0x79, 0xb4, 0x9b, 0x0a, 0xd7,
1733 0x1b, 0x28, 0x73, 0x2a, 0xd7, 0xe6, 0xa0, 0xd4,
1734 0x2d, 0x95, 0x8d, 0x29, 0xaf, 0x6a, 0xab, 0xee,
1735 0xa0, 0x0d, 0x13, 0x4d, 0xe7, 0x16, 0x76, 0x91,
1736 },
1737 .y = {
1738 0x2a, 0x26, 0x2c, 0x50, 0x55, 0xd1, 0x2b, 0x83,
1739 0xf6, 0x5f, 0xdb, 0x99, 0x5f, 0x85, 0xf6, 0x78,
1740 0x1c, 0x14, 0xed, 0xd3, 0x70, 0x5e, 0xe5, 0x2c,
1741 0x05, 0x1e, 0x5c, 0xec, 0xf8, 0x65, 0x43, 0x49,
1742 },
1743 },
1744 .confirm_req[0] = {
1745 .value = {
1746 0x55, 0x2c, 0xaa, 0x41, 0x59, 0x42, 0x4d, 0xfe,
1747 0x47, 0x74, 0xcd, 0x2b, 0x11, 0xab, 0x21, 0xe6,
1748 },
1749 },
1750 .confirm_rsp[0] = {
1751 .value = {
1752 0x6a, 0x3c, 0x45, 0xf5, 0xb2, 0xe2, 0x04, 0x30,
1753 0xde, 0xd6, 0x3c, 0x6d, 0x85, 0x00, 0x00, 0x2c,
1754 },
1755 },
1756 .random_req[0] = {
1757 .value = {
1758 0x78, 0x06, 0x04, 0x60, 0x76, 0xe9, 0xc4, 0x5a,
1759 0xfb, 0x34, 0x44, 0xae, 0x45, 0xa0, 0x84, 0xde,
1760 },
1761 },
1762 .random_rsp[0] = {
1763 .value = {
1764 0x91, 0xc8, 0xfd, 0x1b, 0xb2, 0x85, 0x08, 0x76,
1765 0xd3, 0xf1, 0xc4, 0xa0, 0xfa, 0x92, 0x8c, 0x94,
1766 },
1767 },
1768 .confirm_req[1] = {
1769 .value = {
1770 0xb1, 0x2f, 0x68, 0x35, 0xa1, 0xa5, 0x84, 0xb1,
1771 0x4f, 0x1a, 0xb1, 0xb5, 0xf0, 0xb2, 0xbe, 0x61,
1772 },
1773 },
1774 .confirm_rsp[1] = {
1775 .value = {
1776 0x07, 0xd8, 0x43, 0x74, 0xe8, 0x42, 0xf3, 0xf1,
1777 0x87, 0x3d, 0x9e, 0x92, 0xea, 0x33, 0xe8, 0x54,
1778 },
1779 },
1780 .random_req[1] = {
1781 .value = {
1782 0x4c, 0xb7, 0xcc, 0x6d, 0x90, 0x9f, 0x1e, 0x2d,
1783 0x9d, 0x1e, 0x52, 0xa7, 0xe0, 0x0c, 0x7b, 0xf7,
1784 },
1785 },
1786 .random_rsp[1] = {
1787 .value = {
1788 0x5c, 0x32, 0x82, 0xc8, 0x76, 0x17, 0x3b, 0x18,
1789 0x66, 0xda, 0xbf, 0xc3, 0x13, 0x49, 0x05, 0xfb,
1790 },
1791 },
1792 .confirm_req[2] = {
1793 .value = {
1794 0x27, 0x61, 0x4d, 0x04, 0x64, 0xa9, 0x58, 0xf1,
1795 0xe0, 0xf9, 0xe5, 0x78, 0x0b, 0x54, 0x89, 0x0a,
1796 },
1797 },
1798 .confirm_rsp[2] = {
1799 .value = {
1800 0xe4, 0x8f, 0xdb, 0xc8, 0x35, 0xed, 0x4e, 0x7d,
1801 0xbc, 0x92, 0x7f, 0x58, 0x02, 0xaa, 0xbf, 0x6b,
1802 },
1803 },
1804 .random_req[2] = {
1805 .value = {
1806 0xfe, 0x85, 0x08, 0xe0, 0x35, 0x90, 0x13, 0xa9,
1807 0xd3, 0xcf, 0xb6, 0x6d, 0x36, 0xaf, 0xbd, 0x59,
1808 },
1809 },
1810 .random_rsp[2] = {
1811 .value = {
1812 0x47, 0x40, 0x8e, 0x97, 0xe3, 0xfe, 0x8f, 0x52,
1813 0x29, 0x5e, 0x6b, 0x44, 0xdf, 0x0d, 0x60, 0xf4,
1814 },
1815 },
1816 .confirm_req[3] = {
1817 .value = {
1818 0xac, 0xab, 0x13, 0x7c, 0x1a, 0x6e, 0x7a, 0xdb,
1819 0xf6, 0xe8, 0x72, 0x9f, 0xc5, 0xc3, 0x99, 0x1b,
1820 },
1821 },
1822 .confirm_rsp[3] = {
1823 .value = {
1824 0x79, 0xf2, 0xd1, 0x89, 0x5e, 0xa5, 0xa2, 0x90,
1825 0xee, 0x25, 0x36, 0x81, 0x5a, 0x87, 0x20, 0x82,
1826 },
1827 },
1828 .random_req[3] = {
1829 .value = {
1830 0xd4, 0x46, 0xa0, 0xc4, 0x3d, 0xae, 0x22, 0x06,
1831 0xaf, 0x5d, 0x93, 0x96, 0xb7, 0x06, 0xc3, 0x61,
1832 },
1833 },
1834 .random_rsp[3] = {
1835 .value = {
1836 0x5f, 0x81, 0x97, 0x8b, 0x52, 0x87, 0x1c, 0x67,
1837 0xe0, 0x04, 0xcc, 0x50, 0xd9, 0x2b, 0x16, 0xb5,
1838 },
1839 },
1840 .confirm_req[4] = {
1841 .value = {
1842 0x6c, 0x51, 0xc3, 0x61, 0x77, 0x7f, 0xf1, 0x05,
1843 0x9e, 0x0f, 0xba, 0xfd, 0x32, 0x02, 0x09, 0x45,
1844 },
1845 },
1846 .confirm_rsp[4] = {
1847 .value = {
1848 0x54, 0xe5, 0x24, 0x81, 0x62, 0x68, 0xe2, 0x45,
1849 0x86, 0x2c, 0x11, 0x28, 0x15, 0xa8, 0x8e, 0x5b,
1850 },
1851 },
1852 .random_req[4] = {
1853 .value = {
1854 0xbb, 0x29, 0x3a, 0xba, 0xe6, 0x4f, 0x06, 0xcf,
1855 0xa3, 0x13, 0x27, 0xf2, 0xcb, 0xe4, 0xd2, 0xe6,
1856 },
1857 },
1858 .random_rsp[4] = {
1859 .value = {
1860 0x50, 0xba, 0xd0, 0x0e, 0x26, 0xab, 0x04, 0xf8,
1861 0xa2, 0x03, 0x1e, 0x63, 0x9a, 0xf7, 0x15, 0xdc,
1862 },
1863 },
1864 .confirm_req[5] = {
1865 .value = {
1866 0x12, 0x3e, 0xfe, 0x5a, 0xb1, 0x09, 0x6f, 0x17,
1867 0xb7, 0x77, 0x7e, 0x65, 0x88, 0xd4, 0x95, 0x56,
1868 },
1869 },
1870 .confirm_rsp[5] = {
1871 .value = {
1872 0xc6, 0x9b, 0xac, 0xde, 0x7e, 0x03, 0x7a, 0xd3,
1873 0xf1, 0xff, 0x3c, 0x4f, 0x4a, 0x85, 0xba, 0x73,
1874 },
1875 },
1876 .random_req[5] = {
1877 .value = {
1878 0x17, 0xd5, 0x5e, 0x69, 0x30, 0x2c, 0x1f, 0x01,
1879 0x87, 0x9c, 0xd6, 0xd2, 0xe4, 0x48, 0x8c, 0x84,
1880 },
1881 },
1882 .random_rsp[5] = {
1883 .value = {
1884 0x9d, 0x54, 0x83, 0x4a, 0xcd, 0x93, 0x7c, 0x1e,
1885 0x5b, 0xaf, 0xd2, 0x66, 0x8c, 0x2d, 0xaa, 0xc3,
1886 },
1887 },
1888 .confirm_req[6] = {
1889 .value = {
1890 0xdc, 0x24, 0x69, 0xa8, 0xd3, 0xa9, 0x17, 0x11,
1891 0x08, 0x37, 0x1a, 0x1e, 0x92, 0x03, 0xee, 0x36,
1892 },
1893 },
1894 .confirm_rsp[6] = {
1895 .value = {
1896 0x98, 0xf8, 0x72, 0x71, 0x99, 0xa0, 0xbd, 0xcd,
1897 0xb1, 0x97, 0x4c, 0x8a, 0xb8, 0xa8, 0x1a, 0x52,
1898 },
1899 },
1900 .random_req[6] = {
1901 .value = {
1902 0xbf, 0xb1, 0x8e, 0xa5, 0x14, 0xe3, 0xeb, 0x9e,
1903 0x29, 0x27, 0xe0, 0x19, 0xb1, 0xb2, 0x5c, 0xfe,
1904 },
1905 },
1906 .random_rsp[6] = {
1907 .value = {
1908 0xae, 0x8a, 0x92, 0x78, 0x53, 0x7b, 0xdb, 0x8c,
1909 0xec, 0x3a, 0x99, 0x2b, 0x94, 0xf1, 0x17, 0xfe,
1910 },
1911 },
1912 .confirm_req[7] = {
1913 .value = {
1914 0xcf, 0xaf, 0x70, 0x73, 0x53, 0x65, 0x89, 0x57,
1915 0x36, 0x98, 0xd2, 0x28, 0x86, 0x79, 0xfe, 0x85,
1916 },
1917 },
1918 .confirm_rsp[7] = {
1919 .value = {
1920 0x0d, 0x2d, 0x77, 0x8a, 0x21, 0x11, 0xd9, 0x61,
1921 0x9f, 0x80, 0x32, 0x8a, 0x32, 0x09, 0x42, 0x42,
1922 },
1923 },
1924 .random_req[7] = {
1925 .value = {
1926 0x8b, 0xd2, 0x53, 0xcd, 0x96, 0xd1, 0x14, 0xb5,
1927 0xea, 0x17, 0xb1, 0xa3, 0xa8, 0xfc, 0x3c, 0x2b,
1928 },
1929 },
1930 .random_rsp[7] = {
1931 .value = {
1932 0xc2, 0x4f, 0x84, 0x60, 0x54, 0x79, 0x16, 0xed,
1933 0x1a, 0x6e, 0x78, 0xa0, 0x99, 0x58, 0xf2, 0x94,
1934 },
1935 },
1936 .confirm_req[8] = {
1937 .value = {
1938 0x9a, 0x4c, 0xbc, 0x9c, 0x55, 0x15, 0xa2, 0x4f,
1939 0xa2, 0x5d, 0x3b, 0xa7, 0x43, 0xb3, 0x9c, 0x63,
1940 },
1941 },
1942 .confirm_rsp[8] = {
1943 .value = {
1944 0xa3, 0xb1, 0x88, 0xa5, 0x70, 0xca, 0xa3, 0xa9,
1945 0x67, 0x2a, 0xac, 0x99, 0x5e, 0x61, 0x68, 0xa0,
1946 },
1947 },
1948 .random_req[8] = {
1949 .value = {
1950 0xcf, 0xcf, 0x5b, 0x94, 0xe0, 0xb2, 0x9d, 0x5a,
1951 0x86, 0x71, 0x45, 0xce, 0xd9, 0xce, 0x13, 0xba,
1952 },
1953 },
1954 .random_rsp[8] = {
1955 .value = {
1956 0x10, 0x96, 0x8a, 0x50, 0xa4, 0xd0, 0xaa, 0x5f,
1957 0xd6, 0x32, 0xdb, 0x09, 0x7e, 0x22, 0x96, 0x42,
1958 },
1959 },
1960 .confirm_req[9] = {
1961 .value = {
1962 0xf0, 0x90, 0x61, 0x25, 0x04, 0x29, 0x4f, 0xb6,
1963 0x8b, 0xd5, 0x73, 0x49, 0xbd, 0xf7, 0x9b, 0xe7,
1964 },
1965 },
1966 .confirm_rsp[9] = {
1967 .value = {
1968 0x5b, 0xe6, 0xb4, 0x3f, 0x1b, 0x77, 0x12, 0x75,
1969 0x84, 0x94, 0xc6, 0x07, 0xfa, 0xa1, 0x41, 0x94,
1970 },
1971 },
1972 .random_req[9] = {
1973 .value = {
1974 0x3d, 0x1a, 0xa3, 0x95, 0xec, 0x72, 0x84, 0xf4,
1975 0xc5, 0xcd, 0xaa, 0x48, 0xe9, 0x0c, 0x0f, 0xe3,
1976 },
1977 },
1978 .random_rsp[9] = {
1979 .value = {
1980 0x8a, 0x5a, 0x53, 0xfc, 0x07, 0x52, 0x01, 0xb9,
1981 0xe9, 0x2d, 0xe7, 0x9d, 0x8c, 0x7c, 0xc7, 0xb3,
1982 },
1983 },
1984 .confirm_req[10] = {
1985 .value = {
1986 0xe7, 0x8e, 0xc5, 0x08, 0x7f, 0x7e, 0xb8, 0xdc,
1987 0x05, 0x88, 0x3a, 0x92, 0x5a, 0xf5, 0x9b, 0xa9,
1988 },
1989 },
1990 .confirm_rsp[10] = {
1991 .value = {
1992 0xf7, 0xa2, 0xb6, 0xec, 0xcd, 0xef, 0xcb, 0xb7,
1993 0x6f, 0xc3, 0xac, 0x17, 0xe2, 0xfd, 0xfa, 0x42,
1994 },
1995 },
1996 .random_req[10] = {
1997 .value = {
1998 0x0d, 0xd1, 0xa2, 0x1d, 0xff, 0x74, 0xc5, 0x99,
1999 0xe0, 0x67, 0x07, 0x99, 0x95, 0x75, 0x39, 0x76,
2000 },
2001 },
2002 .random_rsp[10] = {
2003 .value = {
2004 0x2f, 0x13, 0xd1, 0x59, 0xfe, 0x20, 0x60, 0xf0,
2005 0x02, 0x0c, 0xea, 0x79, 0xd7, 0x40, 0x86, 0x85,
2006 },
2007 },
2008 .confirm_req[11] = {
2009 .value = {
2010 0x8b, 0x57, 0x87, 0xdd, 0xb1, 0xcc, 0x2d, 0x65,
2011 0xc1, 0xba, 0xac, 0x88, 0x48, 0x23, 0xda, 0xe7,
2012 },
2013 },
2014 .confirm_rsp[11] = {
2015 .value = {
2016 0xb3, 0xc4, 0x2e, 0xea, 0x33, 0xaf, 0x12, 0x9c,
2017 0xb5, 0xab, 0xa1, 0x95, 0x30, 0xca, 0x46, 0x48,
2018 },
2019 },
2020 .random_req[11] = {
2021 .value = {
2022 0x35, 0x57, 0xcd, 0xd5, 0xd2, 0xf8, 0xd7, 0xf2,
2023 0x7b, 0xe3, 0xd7, 0xba, 0x31, 0xa5, 0xca, 0xfd,
2024 },
2025 },
2026 .random_rsp[11] = {
2027 .value = {
2028 0xe2, 0x3b, 0x20, 0xbe, 0xec, 0xa5, 0x34, 0x3b,
2029 0x76, 0x23, 0x53, 0x28, 0x36, 0xc4, 0x60, 0x13,
2030 },
2031 },
2032 .confirm_req[12] = {
2033 .value = {
2034 0xc9, 0xfe, 0x03, 0x49, 0xe4, 0xff, 0x7e, 0xf7,
2035 0x00, 0xd1, 0x2b, 0x13, 0xb1, 0x15, 0x6e, 0x92,
2036 },
2037 },
2038 .confirm_rsp[12] = {
2039 .value = {
2040 0xbc, 0xa2, 0xf2, 0x03, 0x5c, 0xfd, 0x20, 0x7b,
2041 0xd0, 0x1f, 0xd6, 0x50, 0xec, 0xc6, 0x7b, 0x31,
2042 },
2043 },
2044 .random_req[12] = {
2045 .value = {
2046 0x04, 0x50, 0xea, 0xb8, 0xca, 0x36, 0x1a, 0x61,
2047 0x92, 0xed, 0xa0, 0x67, 0x78, 0x15, 0x10, 0xb5,
2048 },
2049 },
2050 .random_rsp[12] = {
2051 .value = {
2052 0x0c, 0x8e, 0x9d, 0x7b, 0x9d, 0x7e, 0xda, 0x23,
2053 0xbb, 0x61, 0xd9, 0xff, 0x46, 0x77, 0x33, 0x1b,
2054 },
2055 },
2056 .confirm_req[13] = {
2057 .value = {
2058 0x9a, 0xff, 0xd6, 0xe5, 0x1a, 0xc3, 0xd3, 0x37,
2059 0x34, 0xeb, 0x3e, 0x3a, 0x8e, 0x0b, 0x86, 0xb4,
2060 },
2061 },
2062 .confirm_rsp[13] = {
2063 .value = {
2064 0xf6, 0x32, 0x19, 0xb4, 0x08, 0x6b, 0x8a, 0x0f,
2065 0xc9, 0x9c, 0x1b, 0x68, 0xb8, 0xa0, 0xd0, 0xc9,
2066 },
2067 },
2068 .random_req[13] = {
2069 .value = {
2070 0x86, 0xeb, 0x5c, 0xf9, 0x33, 0x54, 0x7d, 0xe4,
2071 0xa4, 0xe2, 0xe1, 0xf6, 0x6b, 0xea, 0x34, 0xed,
2072 },
2073 },
2074 .random_rsp[13] = {
2075 .value = {
2076 0xad, 0x53, 0xa0, 0x6e, 0xde, 0x1d, 0xda, 0x99,
2077 0x31, 0x45, 0xe5, 0x3a, 0x73, 0xa1, 0x5e, 0xe1,
2078 },
2079 },
2080 .confirm_req[14] = {
2081 .value = {
2082 0x93, 0xd4, 0xe0, 0xaa, 0x0c, 0x91, 0xba, 0xde,
2083 0xc9, 0x5c, 0x68, 0xb0, 0xce, 0xb6, 0x84, 0xcd,
2084 },
2085 },
2086 .confirm_rsp[14] = {
2087 .value = {
2088 0x85, 0xc7, 0x05, 0x02, 0x21, 0x9d, 0x4c, 0x4c,
2089 0x16, 0xf7, 0x8f, 0x7b, 0xaa, 0xb4, 0x8f, 0x37,
2090 },
2091 },
2092 .random_req[14] = {
2093 .value = {
2094 0x84, 0xfd, 0xf1, 0x39, 0x1a, 0x9a, 0xa5, 0xb8,
2095 0x49, 0xc0, 0x66, 0xdc, 0x33, 0x71, 0x32, 0x87,
2096 },
2097 },
2098 .random_rsp[14] = {
2099 .value = {
2100 0x5d, 0xaf, 0x38, 0xcd, 0xb5, 0x83, 0xaa, 0xa0,
2101 0xab, 0x30, 0x82, 0xed, 0x6f, 0xd2, 0x75, 0xe7,
2102 },
2103 },
2104 .confirm_req[15] = {
2105 .value = {
2106 0x88, 0x12, 0xe8, 0x89, 0xd4, 0x52, 0x6d, 0xac,
2107 0x61, 0x2a, 0x85, 0x85, 0x1e, 0x9c, 0x82, 0x21,
2108 },
2109 },
2110 .confirm_rsp[15] = {
2111 .value = {
2112 0xc1, 0xe9, 0xcd, 0x21, 0x29, 0x6a, 0x78, 0xe4,
2113 0x7b, 0x7d, 0x73, 0x25, 0x9e, 0x9b, 0x95, 0x8b,
2114 },
2115 },
2116 .random_req[15] = {
2117 .value = {
2118 0x95, 0x87, 0x9d, 0x5a, 0x10, 0x14, 0xa0, 0xdf,
2119 0x5e, 0x02, 0x22, 0x39, 0x23, 0xc9, 0xbc, 0xba,
2120 },
2121 },
2122 .random_rsp[15] = {
2123 .value = {
2124 0x1b, 0x91, 0xe2, 0xdf, 0xca, 0xfe, 0x2b, 0x61,
2125 0x33, 0x8c, 0x83, 0xbf, 0xcf, 0xc3, 0x72, 0xcc,
2126 },
2127 },
2128 .confirm_req[16] = {
2129 .value = {
2130 0xce, 0xc9, 0x68, 0xf7, 0xea, 0x41, 0x18, 0x5c,
2131 0x16, 0x6a, 0x98, 0x13, 0x0c, 0x10, 0xc2, 0xa3,
2132 },
2133 },
2134 .confirm_rsp[16] = {
2135 .value = {
2136 0x97, 0x73, 0xc9, 0x72, 0x68, 0x99, 0x63, 0xed,
2137 0x81, 0x3b, 0x5c, 0xee, 0x37, 0xfc, 0xca, 0xae,
2138 },
2139 },
2140 .random_req[16] = {
2141 .value = {
2142 0x5b, 0x85, 0xb0, 0x1b, 0xc3, 0xde, 0x18, 0xba,
2143 0xc1, 0xc7, 0x89, 0x99, 0xfe, 0xcd, 0xdb, 0x6a,
2144 },
2145 },
2146 .random_rsp[16] = {
2147 .value = {
2148 0x5e, 0x1a, 0xcb, 0xbc, 0xda, 0x41, 0x06, 0x5a,
2149 0x14, 0x34, 0x3a, 0xb1, 0xa1, 0x6f, 0xb2, 0xd8,
2150 },
2151 },
2152 .confirm_req[17] = {
2153 .value = {
2154 0x1d, 0x59, 0x8a, 0xb0, 0x19, 0xe5, 0xff, 0x45,
2155 0xb6, 0xc3, 0x33, 0x64, 0xd1, 0x6e, 0xee, 0xdd,
2156 },
2157 },
2158 .confirm_rsp[17] = {
2159 .value = {
2160 0x4c, 0x9b, 0xe8, 0x68, 0x52, 0x34, 0xef, 0xe1,
2161 0x84, 0xbd, 0x37, 0x85, 0x53, 0x0d, 0xd5, 0xc1,
2162 },
2163 },
2164 .random_req[17] = {
2165 .value = {
2166 0xa6, 0xf7, 0x97, 0x18, 0x9a, 0x3e, 0x9d, 0xcf,
2167 0x91, 0xa3, 0xa3, 0x8e, 0xda, 0x8f, 0x8f, 0x90,
2168 },
2169 },
2170 .random_rsp[17] = {
2171 .value = {
2172 0x94, 0x10, 0x19, 0x17, 0x8d, 0x0a, 0x72, 0xfd,
2173 0x24, 0x9d, 0xfd, 0x37, 0x4e, 0xdf, 0x4c, 0x30,
2174 },
2175 },
2176 .confirm_req[18] = {
2177 .value = {
2178 0xfc, 0x64, 0x8a, 0x8b, 0x37, 0x17, 0x90, 0x6d,
2179 0x25, 0x0e, 0xc6, 0x18, 0xc9, 0xc9, 0xc2, 0x2a,
2180 },
2181 },
2182 .confirm_rsp[18] = {
2183 .value = {
2184 0x50, 0x98, 0x86, 0xf5, 0xc0, 0xda, 0x45, 0x2d,
2185 0xea, 0xc8, 0x9d, 0x28, 0x04, 0xd8, 0x73, 0x6f,
2186 },
2187 },
2188 .random_req[18] = {
2189 .value = {
2190 0x13, 0x10, 0x38, 0xe8, 0x17, 0x6d, 0x72, 0xd5,
2191 0x94, 0xaf, 0xed, 0x4f, 0x23, 0xa0, 0x41, 0xfc,
2192 },
2193 },
2194 .random_rsp[18] = {
2195 .value = {
2196 0xdf, 0xed, 0xf7, 0x08, 0xce, 0x64, 0xbc, 0x11,
2197 0x41, 0x7a, 0xd9, 0xf7, 0x4a, 0xd9, 0x4a, 0x15,
2198 },
2199 },
2200 .confirm_req[19] = {
2201 .value = {
2202 0xae, 0x24, 0x8f, 0xdf, 0xb0, 0x57, 0xc4, 0x9c,
2203 0xe6, 0xae, 0x9b, 0xc2, 0x4d, 0x3d, 0x1c, 0xcb,
2204 },
2205 },
2206 .confirm_rsp[19] = {
2207 .value = {
2208 0xcc, 0x5c, 0xa3, 0xbe, 0xd7, 0x83, 0xee, 0x60,
2209 0x80, 0xff, 0x5f, 0x1a, 0x07, 0xbf, 0x4c, 0x33,
2210 },
2211 },
2212 .random_req[19] = {
2213 .value = {
2214 0x93, 0xc3, 0x62, 0x06, 0xcb, 0xe5, 0xb0, 0x01,
2215 0x02, 0x18, 0xa2, 0x50, 0x4c, 0x73, 0xa2, 0x27,
2216 },
2217 },
2218 .random_rsp[19] = {
2219 .value = {
2220 0x11, 0x2a, 0xd3, 0x06, 0x28, 0x9c, 0xdf, 0x73,
2221 0xa5, 0xa4, 0xe5, 0x1e, 0x07, 0xcf, 0xee, 0x71,
2222 },
2223 },
2224 .dhkey_check_req = {
2225 .value = {
2226 0x73, 0xa0, 0x40, 0x58, 0x78, 0x20, 0x5f, 0x2c,
2227 0xf4, 0x19, 0x23, 0xa8, 0x74, 0xbd, 0xc2, 0x3e,
2228 },
2229 },
2230 .dhkey_check_rsp = {
2231 .value = {
2232 0x5a, 0x30, 0xbc, 0xce, 0xec, 0xdf, 0xf0, 0x32,
2233 0x3c, 0x18, 0xa3, 0xd3, 0x3f, 0x20, 0x87, 0x10,
2234 },
2235 },
2236 .sign_info_req = {
2237 .sig_key = {
2238 0x2e, 0x81, 0x09, 0xde, 0x32, 0xc5, 0x28, 0x34,
2239 0xe1, 0x45, 0x4a, 0x35, 0x49, 0xef, 0xa2, 0xed,
2240 },
2241 },
2242 .id_info_rsp = {
2243 .irk = {
2244 0xef, 0x8d, 0xe2, 0x16, 0x4f, 0xec, 0x43, 0x0d,
2245 0xbf, 0x5b, 0xdd, 0x34, 0xc0, 0x53, 0x1e, 0xb8,
2246 },
2247 },
2248 .id_addr_info_rsp = {
2249 .addr_type = 0,
2250 .bd_addr = {
2251 0x01, 0x01, 0x01, 0x07, 0x08, 0x01,
2252 },
2253 },
2254 .sign_info_rsp = {
2255 .sig_key = {
2256 0x90, 0x3d, 0x26, 0x65, 0xc1, 0xd1, 0x5a, 0x9d,
2257 0xda, 0xab, 0x0d, 0x00, 0x05, 0x0e, 0x6c, 0x5d,
2258 },
2259 },
2260 .ltk = {
2261 0xf1, 0x41, 0x1a, 0x5b, 0x60, 0xc1, 0x43, 0xc6,
2262 0x80, 0x34, 0x5e, 0x7f, 0xd8, 0x0c, 0x75, 0xdc,
2263 },
2264 .pair_alg = BLE_SM_PAIR_ALG_PASSKEY,
2265 .authenticated = 1,
2266 .passkey_info = {
2267 .passkey = {
2268 .action = BLE_SM_IOACT_INPUT,
2269 .passkey = 516645,
2270 },
2271 },
2272 };
2273 ble_sm_test_util_us_sc_good(¶ms);
2274 }
2275
2276 /**
2277 * Secure connections pairing
2278 * Master: us
2279 * Pair algorithm: passkey entry
2280 * Initiator IO capabilities: 0
2281 * Responder IO capabilities: 4
2282 * Bonding: true
2283 * Initiator address type: 0
2284 * Responder address type: 0
2285 * Initiator key distribution: 7
2286 * Responder key distribution: 5
2287 */
TEST_CASE(ble_sm_sc_us_pk_iio0_rio4_b1_iat0_rat0_ik7_rk5)2288 TEST_CASE(ble_sm_sc_us_pk_iio0_rio4_b1_iat0_rat0_ik7_rk5)
2289 {
2290 struct ble_sm_test_params params;
2291
2292 params = (struct ble_sm_test_params) {
2293 .init_id_addr = {
2294 0x01, 0x01, 0x01, 0x07, 0x08, 0x01,
2295 },
2296 .resp_id_addr = {
2297 0xca, 0x61, 0xa0, 0x67, 0x94, 0xe0,
2298 },
2299 .pair_req = {
2300 .io_cap = 0x00,
2301 .oob_data_flag = 0x00,
2302 .authreq = 0x0d,
2303 .max_enc_key_size = 0x10,
2304 .init_key_dist = 0x07,
2305 .resp_key_dist = 0x07,
2306 },
2307 .pair_rsp = {
2308 .io_cap = 0x04,
2309 .oob_data_flag = 0x00,
2310 .authreq = 0x0d,
2311 .max_enc_key_size = 0x10,
2312 .init_key_dist = 0x07,
2313 .resp_key_dist = 0x05,
2314 },
2315 .our_priv_key = {
2316 0xb1, 0x6b, 0x4f, 0x81, 0xbc, 0xe3, 0x60, 0x9e,
2317 0x00, 0x20, 0xf1, 0x73, 0x3e, 0xfb, 0xcc, 0x6e,
2318 0x8c, 0xb6, 0xd2, 0x51, 0xd9, 0x36, 0x8a, 0x6d,
2319 0xca, 0x8c, 0xd7, 0xbe, 0x96, 0x03, 0xdf, 0xd6,
2320 },
2321 .public_key_req = {
2322 .x = {
2323 0xe5, 0x0f, 0x02, 0x0a, 0x37, 0x90, 0x94, 0x5a,
2324 0x06, 0x21, 0xf7, 0xbc, 0xd5, 0xbe, 0xb9, 0x24,
2325 0x8a, 0x35, 0xfd, 0xf8, 0x5e, 0xe2, 0x70, 0xd5,
2326 0x5a, 0xe8, 0xe7, 0xdd, 0x13, 0x90, 0xeb, 0xd4,
2327 },
2328 .y = {
2329 0x41, 0xc8, 0x51, 0x1a, 0x25, 0x44, 0x01, 0x53,
2330 0x42, 0x74, 0x07, 0x9c, 0x18, 0xe6, 0x3b, 0x8a,
2331 0xce, 0x7a, 0x37, 0x1f, 0x18, 0x5c, 0x02, 0x7c,
2332 0x67, 0x16, 0xf5, 0x30, 0x2b, 0x31, 0xa9, 0xc7,
2333 },
2334 },
2335 .public_key_rsp = {
2336 .x = {
2337 0x03, 0x0d, 0x13, 0x55, 0xd9, 0xee, 0x3f, 0xac,
2338 0x8e, 0x8a, 0xa6, 0x2a, 0xcb, 0x60, 0x35, 0xb9,
2339 0xb2, 0x4d, 0x63, 0x91, 0x5e, 0xa1, 0xdd, 0xdf,
2340 0x60, 0xdc, 0x6e, 0x09, 0xb9, 0x9e, 0xf1, 0x4d,
2341 },
2342 .y = {
2343 0xa8, 0x09, 0x31, 0x1e, 0x39, 0x96, 0x74, 0x41,
2344 0xea, 0x19, 0x4f, 0x24, 0x36, 0x57, 0x7c, 0x9f,
2345 0x21, 0xa3, 0xad, 0xa1, 0x3d, 0xe2, 0x1c, 0x6a,
2346 0xd6, 0xc9, 0xdb, 0xff, 0xce, 0x0a, 0x94, 0x12,
2347 },
2348 },
2349 .confirm_req[0] = {
2350 .value = {
2351 0x3b, 0x3d, 0xb2, 0x2f, 0x72, 0x0f, 0x93, 0x19,
2352 0x95, 0xdb, 0x88, 0xdf, 0x5d, 0x58, 0x95, 0x37,
2353 },
2354 },
2355 .confirm_rsp[0] = {
2356 .value = {
2357 0x98, 0xab, 0x20, 0x8d, 0x51, 0x3b, 0x6c, 0x29,
2358 0x2d, 0x73, 0x15, 0xf6, 0x6d, 0x6d, 0xb9, 0xb3,
2359 },
2360 },
2361 .random_req[0] = {
2362 .value = {
2363 0xc1, 0xdf, 0x20, 0x3d, 0x7b, 0xcb, 0x5f, 0xe2,
2364 0x9a, 0x23, 0x9c, 0xba, 0x2f, 0x42, 0x3c, 0xb8,
2365 },
2366 },
2367 .random_rsp[0] = {
2368 .value = {
2369 0x7d, 0x82, 0xb4, 0xae, 0x41, 0xdb, 0x67, 0x8f,
2370 0x54, 0x01, 0x21, 0x64, 0x31, 0xd4, 0xfc, 0xb5,
2371 },
2372 },
2373 .confirm_req[1] = {
2374 .value = {
2375 0xc3, 0xa5, 0xd0, 0xdd, 0xd5, 0xec, 0x1d, 0xc3,
2376 0x14, 0x95, 0x79, 0xb2, 0x61, 0x4d, 0x4f, 0x36,
2377 },
2378 },
2379 .confirm_rsp[1] = {
2380 .value = {
2381 0xe2, 0x20, 0xf4, 0x4d, 0xa1, 0x9c, 0x83, 0x51,
2382 0x18, 0xf9, 0x35, 0x2a, 0x51, 0x50, 0xdf, 0xe7,
2383 },
2384 },
2385 .random_req[1] = {
2386 .value = {
2387 0x71, 0xcb, 0x01, 0xb4, 0x83, 0xdc, 0xd8, 0x54,
2388 0x0f, 0xe5, 0xd5, 0x6b, 0x6a, 0x0d, 0x98, 0xb6,
2389 },
2390 },
2391 .random_rsp[1] = {
2392 .value = {
2393 0x30, 0xbf, 0xd3, 0xfd, 0xf4, 0xc2, 0xa1, 0xd0,
2394 0xba, 0x4b, 0x27, 0x7c, 0x29, 0x98, 0x54, 0xa2,
2395 },
2396 },
2397 .confirm_req[2] = {
2398 .value = {
2399 0xf0, 0x92, 0xc4, 0xda, 0x8a, 0x17, 0x7c, 0xc6,
2400 0x14, 0x05, 0x7d, 0xbb, 0xfc, 0x7c, 0xcd, 0x0a,
2401 },
2402 },
2403 .confirm_rsp[2] = {
2404 .value = {
2405 0xf3, 0x89, 0xca, 0xe0, 0xfb, 0xbe, 0x8c, 0xc3,
2406 0x4c, 0x6c, 0x6e, 0x11, 0x36, 0x4e, 0xaa, 0x25,
2407 },
2408 },
2409 .random_req[2] = {
2410 .value = {
2411 0x78, 0x5a, 0xf0, 0x1e, 0x2a, 0x0d, 0x16, 0xb3,
2412 0x03, 0x4b, 0x4b, 0x68, 0x17, 0xe0, 0xf0, 0x82,
2413 },
2414 },
2415 .random_rsp[2] = {
2416 .value = {
2417 0xbf, 0x96, 0xdd, 0xf5, 0x30, 0x2a, 0xe9, 0x8c,
2418 0xb9, 0x13, 0xc5, 0xb7, 0x15, 0x1f, 0xa3, 0x9b,
2419 },
2420 },
2421 .confirm_req[3] = {
2422 .value = {
2423 0x36, 0xe4, 0x4c, 0x00, 0xe7, 0x0d, 0xee, 0xe4,
2424 0x95, 0xb8, 0x6a, 0xf9, 0xf7, 0x24, 0xef, 0xea,
2425 },
2426 },
2427 .confirm_rsp[3] = {
2428 .value = {
2429 0x2e, 0x90, 0x87, 0x85, 0xb8, 0x29, 0x93, 0x9e,
2430 0x38, 0xa6, 0xdb, 0x17, 0xb2, 0xa8, 0x32, 0x65,
2431 },
2432 },
2433 .random_req[3] = {
2434 .value = {
2435 0x0a, 0xee, 0x93, 0xf6, 0x56, 0x35, 0x8e, 0xed,
2436 0x3f, 0x45, 0xa5, 0x01, 0x59, 0xeb, 0xea, 0xa8,
2437 },
2438 },
2439 .random_rsp[3] = {
2440 .value = {
2441 0x38, 0xd0, 0xf8, 0x11, 0x5e, 0x47, 0x72, 0x66,
2442 0xce, 0x56, 0x9c, 0x81, 0x5f, 0x52, 0xd4, 0x9a,
2443 },
2444 },
2445 .confirm_req[4] = {
2446 .value = {
2447 0x2c, 0x98, 0x9b, 0x71, 0xe4, 0xde, 0x6d, 0x20,
2448 0x84, 0x30, 0xab, 0x7a, 0xfc, 0x43, 0x82, 0xc6,
2449 },
2450 },
2451 .confirm_rsp[4] = {
2452 .value = {
2453 0x76, 0xfe, 0x1f, 0x78, 0xaa, 0x42, 0xd5, 0xc6,
2454 0x9f, 0xe4, 0xa7, 0xc7, 0xb8, 0xd2, 0x1e, 0x59,
2455 },
2456 },
2457 .random_req[4] = {
2458 .value = {
2459 0x61, 0x5e, 0x47, 0xb1, 0x77, 0x6f, 0x04, 0xee,
2460 0x94, 0xc4, 0x6c, 0xa9, 0xf5, 0xf8, 0x11, 0x6e,
2461 },
2462 },
2463 .random_rsp[4] = {
2464 .value = {
2465 0xa5, 0xad, 0x98, 0x65, 0x28, 0xfc, 0x6b, 0x02,
2466 0x6d, 0x9a, 0x29, 0x61, 0x1c, 0x02, 0x0a, 0x6b,
2467 },
2468 },
2469 .confirm_req[5] = {
2470 .value = {
2471 0x4d, 0x55, 0x3e, 0x1f, 0x87, 0x12, 0xc7, 0x6c,
2472 0xd7, 0x9a, 0xa6, 0xf1, 0x6e, 0x48, 0xd3, 0x7d,
2473 },
2474 },
2475 .confirm_rsp[5] = {
2476 .value = {
2477 0xff, 0x77, 0x6e, 0xba, 0x1f, 0xb7, 0xbd, 0x0b,
2478 0x3f, 0xce, 0xd5, 0x39, 0x81, 0x17, 0x51, 0xfc,
2479 },
2480 },
2481 .random_req[5] = {
2482 .value = {
2483 0xf9, 0x2c, 0x77, 0x41, 0xcd, 0x9a, 0x10, 0x99,
2484 0xc6, 0x70, 0x5a, 0xc8, 0x24, 0x26, 0xb2, 0xc8,
2485 },
2486 },
2487 .random_rsp[5] = {
2488 .value = {
2489 0xa0, 0x44, 0x0a, 0x8b, 0xda, 0x6a, 0x74, 0x90,
2490 0x5f, 0x89, 0x44, 0xa5, 0x9a, 0x58, 0xd5, 0x08,
2491 },
2492 },
2493 .confirm_req[6] = {
2494 .value = {
2495 0x7e, 0x6e, 0x89, 0xc8, 0xbe, 0xde, 0x1c, 0xc3,
2496 0x45, 0xb6, 0x4c, 0x83, 0x71, 0xe2, 0xd6, 0xda,
2497 },
2498 },
2499 .confirm_rsp[6] = {
2500 .value = {
2501 0x4a, 0x29, 0x7b, 0x88, 0x97, 0xc1, 0x60, 0x85,
2502 0x32, 0x7d, 0xf1, 0xaa, 0x04, 0x13, 0x89, 0x11,
2503 },
2504 },
2505 .random_req[6] = {
2506 .value = {
2507 0x2a, 0xaf, 0x7d, 0x21, 0x4e, 0x14, 0xf5, 0x7e,
2508 0xcc, 0x39, 0xf7, 0x56, 0x45, 0x87, 0x23, 0x64,
2509 },
2510 },
2511 .random_rsp[6] = {
2512 .value = {
2513 0x74, 0xd2, 0xff, 0xf0, 0x19, 0xf7, 0x87, 0xe7,
2514 0x0d, 0x65, 0x27, 0x61, 0xea, 0x9e, 0x05, 0x3d,
2515 },
2516 },
2517 .confirm_req[7] = {
2518 .value = {
2519 0x4f, 0x77, 0x22, 0x08, 0x58, 0xed, 0x8c, 0x60,
2520 0xbf, 0xbc, 0x78, 0x0c, 0x80, 0xc9, 0xb7, 0x60,
2521 },
2522 },
2523 .confirm_rsp[7] = {
2524 .value = {
2525 0xd2, 0x47, 0xfd, 0xea, 0xa3, 0x32, 0x53, 0xc1,
2526 0x06, 0xcd, 0x64, 0xeb, 0x88, 0x64, 0x0e, 0xe5,
2527 },
2528 },
2529 .random_req[7] = {
2530 .value = {
2531 0xc8, 0xd0, 0x45, 0xa8, 0x29, 0xdb, 0x5a, 0x42,
2532 0xfe, 0x68, 0xa8, 0x7a, 0x0a, 0x13, 0x22, 0xa4,
2533 },
2534 },
2535 .random_rsp[7] = {
2536 .value = {
2537 0x78, 0x14, 0x46, 0xe2, 0x47, 0x0e, 0xd4, 0xb4,
2538 0xde, 0x35, 0x4a, 0x82, 0x4b, 0x32, 0x9b, 0x46,
2539 },
2540 },
2541 .confirm_req[8] = {
2542 .value = {
2543 0x24, 0x96, 0xe5, 0x50, 0xfa, 0xff, 0xba, 0xdf,
2544 0x6b, 0x76, 0x40, 0x60, 0x56, 0x5e, 0x5a, 0x66,
2545 },
2546 },
2547 .confirm_rsp[8] = {
2548 .value = {
2549 0x09, 0xfe, 0x15, 0x3e, 0x55, 0xe5, 0xbe, 0xb7,
2550 0x8d, 0xaa, 0x04, 0x59, 0xe6, 0x8b, 0x2c, 0x4e,
2551 },
2552 },
2553 .random_req[8] = {
2554 .value = {
2555 0x02, 0x25, 0xbe, 0x88, 0x37, 0xb4, 0x6e, 0xcb,
2556 0xbc, 0xa9, 0xef, 0x5a, 0xfd, 0x1a, 0x5f, 0x5f,
2557 },
2558 },
2559 .random_rsp[8] = {
2560 .value = {
2561 0x0b, 0x35, 0xdc, 0x9b, 0x3d, 0xf7, 0xa6, 0x99,
2562 0xf3, 0xb9, 0x3c, 0x73, 0x67, 0x0e, 0xcc, 0x12,
2563 },
2564 },
2565 .confirm_req[9] = {
2566 .value = {
2567 0x38, 0x1c, 0xf7, 0xf0, 0x31, 0xb1, 0x20, 0xa0,
2568 0x51, 0x1c, 0xf1, 0xbd, 0x67, 0xfa, 0x84, 0xb4,
2569 },
2570 },
2571 .confirm_rsp[9] = {
2572 .value = {
2573 0x8e, 0xa1, 0xc1, 0xf5, 0x39, 0xf0, 0x00, 0x49,
2574 0xfb, 0xfc, 0xdc, 0xdf, 0x87, 0x0e, 0x96, 0x7e,
2575 },
2576 },
2577 .random_req[9] = {
2578 .value = {
2579 0xd0, 0xed, 0x6c, 0x52, 0x20, 0x4b, 0x7b, 0x24,
2580 0xdd, 0x28, 0x53, 0x2d, 0x71, 0x76, 0xfb, 0x8f,
2581 },
2582 },
2583 .random_rsp[9] = {
2584 .value = {
2585 0xac, 0xd7, 0x34, 0x6b, 0x7b, 0x59, 0x9e, 0x9b,
2586 0x5b, 0x37, 0xc6, 0x5c, 0x3e, 0x9d, 0xe2, 0x13,
2587 },
2588 },
2589 .confirm_req[10] = {
2590 .value = {
2591 0xa6, 0xd7, 0xb6, 0xd6, 0xb5, 0x01, 0x4a, 0x02,
2592 0x0d, 0xf0, 0x22, 0xcb, 0x68, 0xad, 0x7d, 0x73,
2593 },
2594 },
2595 .confirm_rsp[10] = {
2596 .value = {
2597 0x01, 0xcc, 0x5f, 0xbc, 0xd0, 0x22, 0xa1, 0xb2,
2598 0x71, 0x9d, 0x5c, 0x97, 0xfa, 0xd3, 0x6a, 0xc7,
2599 },
2600 },
2601 .random_req[10] = {
2602 .value = {
2603 0x9f, 0x3a, 0x25, 0xc7, 0x9b, 0xb7, 0xb3, 0x51,
2604 0xff, 0xde, 0x3b, 0x1c, 0xdd, 0xf5, 0x08, 0x21,
2605 },
2606 },
2607 .random_rsp[10] = {
2608 .value = {
2609 0x75, 0x1e, 0x8d, 0xa4, 0x5b, 0x35, 0xec, 0xae,
2610 0x17, 0xda, 0xa5, 0x43, 0x76, 0x3c, 0x6a, 0x67,
2611 },
2612 },
2613 .confirm_req[11] = {
2614 .value = {
2615 0xfc, 0x0c, 0x3f, 0x86, 0xbf, 0xbe, 0x96, 0x0f,
2616 0x99, 0x11, 0xa5, 0x36, 0x03, 0xcd, 0xbd, 0x7f,
2617 },
2618 },
2619 .confirm_rsp[11] = {
2620 .value = {
2621 0x48, 0xcd, 0xc8, 0x89, 0xd6, 0x1c, 0x0d, 0xb1,
2622 0x90, 0x01, 0x0e, 0xea, 0x80, 0xbc, 0xff, 0xb3,
2623 },
2624 },
2625 .random_req[11] = {
2626 .value = {
2627 0xec, 0xfc, 0xe3, 0x0a, 0x97, 0xed, 0xe8, 0x51,
2628 0x5d, 0x64, 0x3c, 0x73, 0x59, 0x2e, 0x62, 0xac,
2629 },
2630 },
2631 .random_rsp[11] = {
2632 .value = {
2633 0x81, 0x74, 0x44, 0xca, 0xec, 0x38, 0x20, 0x6d,
2634 0x52, 0x27, 0x49, 0x55, 0x61, 0x97, 0x01, 0x34,
2635 },
2636 },
2637 .confirm_req[12] = {
2638 .value = {
2639 0x27, 0x8c, 0x88, 0x09, 0xcb, 0xd6, 0x45, 0xb7,
2640 0x30, 0x4b, 0x1b, 0xcd, 0xc3, 0xac, 0x83, 0xd6,
2641 },
2642 },
2643 .confirm_rsp[12] = {
2644 .value = {
2645 0xea, 0xbc, 0xe2, 0x43, 0xc8, 0xe0, 0x06, 0xd8,
2646 0x7b, 0x3e, 0xa4, 0x55, 0x95, 0xa2, 0x23, 0x9b,
2647 },
2648 },
2649 .random_req[12] = {
2650 .value = {
2651 0x68, 0x8f, 0xb6, 0x7b, 0x91, 0x0d, 0xc9, 0x30,
2652 0xe7, 0xb7, 0xb7, 0x7a, 0x79, 0x29, 0x59, 0x7d,
2653 },
2654 },
2655 .random_rsp[12] = {
2656 .value = {
2657 0xfd, 0xa1, 0x3d, 0xaf, 0x8d, 0xd2, 0xa0, 0x02,
2658 0x82, 0x92, 0xeb, 0x2e, 0x4d, 0x6c, 0x8d, 0x69,
2659 },
2660 },
2661 .confirm_req[13] = {
2662 .value = {
2663 0x6f, 0xa8, 0x20, 0x81, 0x1c, 0x4b, 0xe8, 0xe3,
2664 0xdc, 0xea, 0x39, 0xbd, 0xfb, 0xbf, 0x79, 0xc4,
2665 },
2666 },
2667 .confirm_rsp[13] = {
2668 .value = {
2669 0x2a, 0x09, 0xec, 0x32, 0x63, 0x3d, 0x38, 0x5d,
2670 0x28, 0xb2, 0xb1, 0x62, 0xee, 0x6c, 0x0a, 0x6c,
2671 },
2672 },
2673 .random_req[13] = {
2674 .value = {
2675 0x35, 0xb5, 0xc5, 0xc0, 0x74, 0x1f, 0x40, 0xac,
2676 0x23, 0x52, 0x02, 0x68, 0xdf, 0x62, 0x73, 0xca,
2677 },
2678 },
2679 .random_rsp[13] = {
2680 .value = {
2681 0xb8, 0xe2, 0x65, 0xdc, 0x22, 0xcb, 0xc2, 0xdb,
2682 0x00, 0x60, 0x37, 0xe2, 0xcc, 0xc0, 0x41, 0x72,
2683 },
2684 },
2685 .confirm_req[14] = {
2686 .value = {
2687 0x05, 0x0b, 0x5c, 0xa7, 0x58, 0x9c, 0x08, 0x81,
2688 0x4a, 0x6b, 0x12, 0xae, 0xaa, 0xe5, 0x81, 0xf3,
2689 },
2690 },
2691 .confirm_rsp[14] = {
2692 .value = {
2693 0xdd, 0x2b, 0xd1, 0xdd, 0x49, 0x92, 0xf3, 0xe1,
2694 0xae, 0xf3, 0x6d, 0x89, 0xfd, 0x77, 0xf9, 0xaa,
2695 },
2696 },
2697 .random_req[14] = {
2698 .value = {
2699 0xbc, 0x27, 0x29, 0x1b, 0xc4, 0xbc, 0x0e, 0x88,
2700 0x95, 0x50, 0xf7, 0x92, 0xe6, 0xf7, 0x29, 0xe8,
2701 },
2702 },
2703 .random_rsp[14] = {
2704 .value = {
2705 0xe7, 0x15, 0xfe, 0x53, 0x77, 0xd9, 0x98, 0x1d,
2706 0x5b, 0x4e, 0x37, 0xa3, 0x1f, 0xc9, 0x47, 0x5d,
2707 },
2708 },
2709 .confirm_req[15] = {
2710 .value = {
2711 0x75, 0x70, 0x9f, 0x84, 0x3e, 0x6b, 0x88, 0xcb,
2712 0x66, 0xda, 0x8f, 0x79, 0xbc, 0xf8, 0x44, 0x99,
2713 },
2714 },
2715 .confirm_rsp[15] = {
2716 .value = {
2717 0x13, 0xe4, 0x43, 0xb2, 0x61, 0x72, 0xfd, 0x33,
2718 0xba, 0x87, 0x44, 0x27, 0x6f, 0x9a, 0xea, 0x19,
2719 },
2720 },
2721 .random_req[15] = {
2722 .value = {
2723 0xda, 0x90, 0x59, 0x72, 0xed, 0x67, 0xde, 0x65,
2724 0x21, 0xab, 0x7d, 0x9d, 0x72, 0x8c, 0x88, 0x8e,
2725 },
2726 },
2727 .random_rsp[15] = {
2728 .value = {
2729 0x94, 0x92, 0x0f, 0x6c, 0x08, 0xde, 0xae, 0xa7,
2730 0xfd, 0x36, 0xe0, 0x02, 0xc8, 0xfd, 0xdd, 0x69,
2731 },
2732 },
2733 .confirm_req[16] = {
2734 .value = {
2735 0x35, 0x68, 0x1e, 0x80, 0x37, 0xc4, 0x91, 0xe8,
2736 0xbf, 0x5e, 0x27, 0x0c, 0xaa, 0x8e, 0x85, 0x7b,
2737 },
2738 },
2739 .confirm_rsp[16] = {
2740 .value = {
2741 0x1e, 0x42, 0x47, 0x29, 0x06, 0xdc, 0x2b, 0x45,
2742 0xec, 0x95, 0x23, 0x31, 0x29, 0x24, 0x95, 0xf0,
2743 },
2744 },
2745 .random_req[16] = {
2746 .value = {
2747 0x4e, 0x9f, 0x5d, 0x5a, 0x8f, 0xf7, 0x28, 0xc9,
2748 0x29, 0x62, 0x0a, 0x67, 0x19, 0x17, 0x5e, 0xa7,
2749 },
2750 },
2751 .random_rsp[16] = {
2752 .value = {
2753 0x7c, 0xd4, 0x13, 0xba, 0x27, 0x16, 0x39, 0xe7,
2754 0xf0, 0xbf, 0xec, 0x1e, 0xe5, 0xcc, 0x20, 0x0b,
2755 },
2756 },
2757 .confirm_req[17] = {
2758 .value = {
2759 0xb9, 0xcd, 0xf5, 0xf9, 0x2b, 0x4f, 0x6d, 0x08,
2760 0x51, 0xe0, 0x92, 0x99, 0x15, 0xca, 0x15, 0x2a,
2761 },
2762 },
2763 .confirm_rsp[17] = {
2764 .value = {
2765 0xb8, 0xf2, 0xf9, 0x61, 0x4f, 0x0e, 0xfd, 0x19,
2766 0xcb, 0x5d, 0x7e, 0x93, 0x87, 0x7a, 0x0a, 0x6e,
2767 },
2768 },
2769 .random_req[17] = {
2770 .value = {
2771 0x8b, 0xf8, 0xc8, 0xeb, 0xe5, 0xdb, 0xcf, 0xfe,
2772 0x68, 0x70, 0x1f, 0xbe, 0x1e, 0x3c, 0x94, 0x7d,
2773 },
2774 },
2775 .random_rsp[17] = {
2776 .value = {
2777 0x0d, 0xfc, 0x68, 0x2e, 0x50, 0x31, 0x9f, 0x60,
2778 0xe6, 0x12, 0x72, 0x24, 0x7c, 0xad, 0xf7, 0x48,
2779 },
2780 },
2781 .confirm_req[18] = {
2782 .value = {
2783 0x27, 0x68, 0x07, 0xaa, 0xa6, 0x33, 0x13, 0x49,
2784 0x65, 0x4c, 0x80, 0x54, 0xfb, 0x69, 0xcb, 0x0e,
2785 },
2786 },
2787 .confirm_rsp[18] = {
2788 .value = {
2789 0xc5, 0x8d, 0x45, 0x81, 0xb0, 0x5a, 0x69, 0x0f,
2790 0x6c, 0x89, 0x0b, 0x60, 0x1e, 0x27, 0x9b, 0x9e,
2791 },
2792 },
2793 .random_req[18] = {
2794 .value = {
2795 0x97, 0x46, 0x95, 0xb5, 0x86, 0xa1, 0xc1, 0x86,
2796 0x3a, 0x8a, 0x1f, 0x29, 0x38, 0xe0, 0x69, 0x7f,
2797 },
2798 },
2799 .random_rsp[18] = {
2800 .value = {
2801 0x8f, 0x0e, 0x56, 0x17, 0x1c, 0x4b, 0x78, 0x1f,
2802 0xd1, 0x8a, 0x69, 0xbd, 0x65, 0xe3, 0xde, 0x3c,
2803 },
2804 },
2805 .confirm_req[19] = {
2806 .value = {
2807 0xd2, 0xa5, 0x4e, 0x31, 0x34, 0xde, 0x68, 0xf0,
2808 0x69, 0x88, 0x6f, 0x28, 0xa2, 0xdd, 0xba, 0xe1,
2809 },
2810 },
2811 .confirm_rsp[19] = {
2812 .value = {
2813 0xf8, 0x5e, 0x4f, 0x4d, 0x56, 0xf6, 0x22, 0xc0,
2814 0x57, 0x04, 0x04, 0x45, 0x24, 0x83, 0x09, 0x80,
2815 },
2816 },
2817 .random_req[19] = {
2818 .value = {
2819 0x64, 0xe1, 0x5a, 0x76, 0x71, 0x94, 0xc0, 0x64,
2820 0x2b, 0xea, 0x9d, 0xaf, 0xbd, 0x10, 0x25, 0x9b,
2821 },
2822 },
2823 .random_rsp[19] = {
2824 .value = {
2825 0x1e, 0x38, 0x6e, 0x66, 0x55, 0xf1, 0x7f, 0x55,
2826 0x7c, 0x00, 0xff, 0xad, 0x07, 0x13, 0x25, 0x97,
2827 },
2828 },
2829 .dhkey_check_req = {
2830 .value = {
2831 0x98, 0xf1, 0x5a, 0x24, 0x81, 0x5d, 0xb5, 0xac,
2832 0x04, 0x4e, 0x3a, 0x31, 0x8b, 0x7d, 0xf6, 0x09,
2833 },
2834 },
2835 .dhkey_check_rsp = {
2836 .value = {
2837 0x1a, 0xb4, 0xf4, 0xf3, 0xc0, 0x5a, 0xf3, 0x13,
2838 0x8d, 0x6e, 0x01, 0x16, 0x1e, 0x54, 0xf3, 0xe1,
2839 },
2840 },
2841 .sign_info_req = {
2842 .sig_key = {
2843 0x4b, 0x01, 0x33, 0x5f, 0x4b, 0xfe, 0x12, 0x8b,
2844 0x9f, 0x81, 0x44, 0x78, 0x90, 0x03, 0x9e, 0x53,
2845 },
2846 },
2847 .id_info_rsp = {
2848 .irk = {
2849 0xef, 0x8d, 0xe2, 0x16, 0x4f, 0xec, 0x43, 0x0d,
2850 0xbf, 0x5b, 0xdd, 0x34, 0xc0, 0x53, 0x1e, 0xb8,
2851 },
2852 },
2853 .id_addr_info_rsp = {
2854 .addr_type = 0,
2855 .bd_addr = {
2856 0x01, 0x01, 0x01, 0x07, 0x08, 0x01,
2857 },
2858 },
2859 .sign_info_rsp = {
2860 .sig_key = {
2861 0xd2, 0xa1, 0x2c, 0xf0, 0xa6, 0xeb, 0x97, 0x5e,
2862 0xac, 0x53, 0xa1, 0x3d, 0x41, 0x40, 0x36, 0x2f,
2863 },
2864 },
2865 .ltk = {
2866 0xce, 0x28, 0x91, 0xa9, 0x36, 0xb7, 0xe1, 0xda,
2867 0x3c, 0x66, 0xd9, 0x33, 0x3d, 0x03, 0x8e, 0x31,
2868 },
2869 .pair_alg = BLE_SM_PAIR_ALG_PASSKEY,
2870 .authenticated = 1,
2871 .passkey_info = {
2872 .passkey = {
2873 .action = BLE_SM_IOACT_DISP,
2874 .passkey = 866744,
2875 },
2876 },
2877 };
2878 ble_sm_test_util_us_sc_good(¶ms);
2879 }
2880
2881 /**
2882 * Secure connections pairing
2883 * Master: us
2884 * Pair algorithm: numeric comparison
2885 * Initiator IO capabilities: 1
2886 * Responder IO capabilities: 4
2887 * Bonding: true
2888 * Initiator address type: 0
2889 * Responder address type: 0
2890 * Initiator key distribution: 7
2891 * Responder key distribution: 5
2892 */
TEST_CASE(ble_sm_sc_us_nc_iio1_rio4_b1_iat0_rat0_ik7_rk5)2893 TEST_CASE(ble_sm_sc_us_nc_iio1_rio4_b1_iat0_rat0_ik7_rk5)
2894 {
2895 struct ble_sm_test_params params;
2896
2897 params = (struct ble_sm_test_params) {
2898 .init_id_addr = {
2899 0x01, 0x01, 0x01, 0x07, 0x08, 0x01,
2900 },
2901 .resp_id_addr = {
2902 0xca, 0x61, 0xa0, 0x67, 0x94, 0xe0,
2903 },
2904 .pair_req = {
2905 .io_cap = 0x01,
2906 .oob_data_flag = 0x00,
2907 .authreq = 0x0d,
2908 .max_enc_key_size = 0x10,
2909 .init_key_dist = 0x07,
2910 .resp_key_dist = 0x07,
2911 },
2912 .pair_rsp = {
2913 .io_cap = 0x04,
2914 .oob_data_flag = 0x00,
2915 .authreq = 0x0d,
2916 .max_enc_key_size = 0x10,
2917 .init_key_dist = 0x07,
2918 .resp_key_dist = 0x05,
2919 },
2920 .our_priv_key = {
2921 0xb1, 0x6b, 0x4f, 0x81, 0xbc, 0xe3, 0x60, 0x9e,
2922 0x00, 0x20, 0xf1, 0x73, 0x3e, 0xfb, 0xcc, 0x6e,
2923 0x8c, 0xb6, 0xd2, 0x51, 0xd9, 0x36, 0x8a, 0x6d,
2924 0xca, 0x8c, 0xd7, 0xbe, 0x96, 0x03, 0xdf, 0xd6,
2925 },
2926 .public_key_req = {
2927 .x = {
2928 0xe5, 0x0f, 0x02, 0x0a, 0x37, 0x90, 0x94, 0x5a,
2929 0x06, 0x21, 0xf7, 0xbc, 0xd5, 0xbe, 0xb9, 0x24,
2930 0x8a, 0x35, 0xfd, 0xf8, 0x5e, 0xe2, 0x70, 0xd5,
2931 0x5a, 0xe8, 0xe7, 0xdd, 0x13, 0x90, 0xeb, 0xd4,
2932 },
2933 .y = {
2934 0x41, 0xc8, 0x51, 0x1a, 0x25, 0x44, 0x01, 0x53,
2935 0x42, 0x74, 0x07, 0x9c, 0x18, 0xe6, 0x3b, 0x8a,
2936 0xce, 0x7a, 0x37, 0x1f, 0x18, 0x5c, 0x02, 0x7c,
2937 0x67, 0x16, 0xf5, 0x30, 0x2b, 0x31, 0xa9, 0xc7,
2938 },
2939 },
2940 .public_key_rsp = {
2941 .x = {
2942 0x7c, 0x27, 0x39, 0xdc, 0x10, 0xfa, 0x57, 0x97,
2943 0x4a, 0x18, 0xdc, 0x0e, 0xfc, 0x4b, 0xd0, 0xac,
2944 0x3a, 0xa4, 0x4c, 0x65, 0xb5, 0xbe, 0x7b, 0xd8,
2945 0xd1, 0xfd, 0x9d, 0xf8, 0xe3, 0x00, 0x4e, 0xf3,
2946 },
2947 .y = {
2948 0xae, 0xfd, 0x8e, 0x93, 0xb4, 0xa9, 0x4d, 0xd3,
2949 0xb6, 0xbd, 0x4c, 0x1d, 0xc1, 0x7e, 0x67, 0x57,
2950 0x07, 0x10, 0x4e, 0xd0, 0x0f, 0x23, 0x23, 0xab,
2951 0x09, 0x86, 0xc3, 0xb9, 0x63, 0x14, 0xe4, 0xe5,
2952 },
2953 },
2954 .confirm_rsp[0] = {
2955 .value = {
2956 0x40, 0x35, 0x6d, 0xa1, 0x19, 0xa6, 0x8b, 0xff,
2957 0x4f, 0x0c, 0x86, 0x7e, 0x95, 0x7c, 0xb8, 0xc1,
2958 },
2959 },
2960 .random_req[0] = {
2961 .value = {
2962 0x95, 0x84, 0x0d, 0x2d, 0x7a, 0xfd, 0x5a, 0xa6,
2963 0xea, 0xfd, 0x7b, 0xf0, 0x68, 0x95, 0xeb, 0x77,
2964 },
2965 },
2966 .random_rsp[0] = {
2967 .value = {
2968 0x25, 0x41, 0xda, 0xdf, 0xdd, 0xca, 0xcd, 0x2e,
2969 0x49, 0x79, 0xb0, 0xaa, 0x7a, 0x23, 0x28, 0x7f,
2970 },
2971 },
2972 .dhkey_check_req = {
2973 .value = {
2974 0x49, 0xbb, 0x89, 0x9e, 0xa1, 0x10, 0x26, 0x7a,
2975 0xe7, 0x42, 0x51, 0xcd, 0x1f, 0x3b, 0x22, 0x1d,
2976 },
2977 },
2978 .dhkey_check_rsp = {
2979 .value = {
2980 0x59, 0x51, 0xc8, 0x7b, 0x4f, 0xae, 0xfe, 0xb8,
2981 0x0c, 0x41, 0xe8, 0xe0, 0xf9, 0x4c, 0x2b, 0xc7,
2982 },
2983 },
2984 .sign_info_req = {
2985 .sig_key = {
2986 0x37, 0x26, 0xc0, 0x79, 0x59, 0xcd, 0xb7, 0x0f,
2987 0xa6, 0xd8, 0xe4, 0x02, 0xc9, 0xe6, 0x02, 0x71,
2988 },
2989 },
2990 .id_info_rsp = {
2991 .irk = {
2992 0xef, 0x8d, 0xe2, 0x16, 0x4f, 0xec, 0x43, 0x0d,
2993 0xbf, 0x5b, 0xdd, 0x34, 0xc0, 0x53, 0x1e, 0xb8,
2994 },
2995 },
2996 .id_addr_info_rsp = {
2997 .addr_type = 0,
2998 .bd_addr = {
2999 0x01, 0x01, 0x01, 0x07, 0x08, 0x01,
3000 },
3001 },
3002 .sign_info_rsp = {
3003 .sig_key = {
3004 0x45, 0x69, 0x05, 0xe3, 0x0c, 0x9e, 0x01, 0xb3,
3005 0xe8, 0xea, 0xa0, 0x5b, 0x70, 0xd9, 0x62, 0x0e,
3006 },
3007 },
3008 .ltk = {
3009 0xf5, 0x60, 0x02, 0x97, 0x2f, 0xbb, 0x3c, 0xe9,
3010 0x97, 0xd7, 0xd5, 0x58, 0x04, 0x96, 0xa6, 0xe7,
3011 },
3012 .pair_alg = BLE_SM_PAIR_ALG_NUMCMP,
3013 .authenticated = 1,
3014 .passkey_info = {
3015 .passkey = {
3016 .action = BLE_SM_IOACT_NUMCMP,
3017 .numcmp_accept = 1,
3018 },
3019 .exp_numcmp = 344302,
3020 },
3021 };
3022 ble_sm_test_util_us_sc_good(¶ms);
3023 }
3024
3025 /**
3026 * Secure connections pairing
3027 * Master: peer
3028 * Pair algorithm: just works
3029 * Initiator IO capabilities: 3
3030 * Responder IO capabilities: 3
3031 * Bonding: true
3032 * Initiator address type: BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT
3033 * Responder address type: BLE_ADDR_PUBLIC_ID
3034 * Initiator key distribution: 7
3035 * Responder key distribution: 7
3036 */
TEST_CASE(ble_sm_sc_peer_jw_iio3_rio3_b1_iat2_rat2_ik7_rk7)3037 TEST_CASE(ble_sm_sc_peer_jw_iio3_rio3_b1_iat2_rat2_ik7_rk7)
3038 {
3039 struct ble_sm_test_params params;
3040
3041 params = (struct ble_sm_test_params) {
3042 .init_addr_type = BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT,
3043 .init_id_addr = {
3044 0x06, 0x05, 0x04, 0x03, 0x02, 0x01,
3045 },
3046 .init_rpa = {
3047 0xd0, 0x8e, 0xf7, 0x42, 0x8c, 0x69,
3048 },
3049 .resp_addr_type = BLE_ADDR_PUBLIC_ID,
3050 .resp_id_addr = {
3051 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07,
3052 },
3053 .resp_rpa = {
3054 0x1a, 0x6e, 0x83, 0x55, 0x5b, 0x5a,
3055 },
3056 .pair_req = {
3057 .io_cap = 0x03,
3058 .oob_data_flag = 0x00,
3059 .authreq = 0x0d,
3060 .max_enc_key_size = 0x10,
3061 .init_key_dist = 0x07,
3062 .resp_key_dist = 0x07,
3063 },
3064 .pair_rsp = {
3065 .io_cap = 0x03,
3066 .oob_data_flag = 0x00,
3067 .authreq = 0x0d,
3068 .max_enc_key_size = 0x10,
3069 .init_key_dist = 0x07,
3070 .resp_key_dist = 0x07,
3071 },
3072 .our_priv_key = {
3073 0xc5, 0x04, 0xc5, 0xf9, 0x28, 0x95, 0x78, 0x17,
3074 0xd5, 0x97, 0x1d, 0x01, 0xbb, 0x2c, 0xcf, 0x77,
3075 0x5c, 0x70, 0x52, 0xc6, 0x5e, 0x33, 0x2e, 0xe7,
3076 0x79, 0x58, 0xc8, 0xf1, 0xc2, 0x2d, 0xb0, 0x61,
3077 },
3078 .public_key_req = {
3079 .x = {
3080 0x54, 0xd9, 0x8f, 0xeb, 0xc1, 0xbb, 0xe6, 0x74,
3081 0x8a, 0x55, 0x3a, 0x80, 0x0e, 0xef, 0x90, 0xc9,
3082 0xab, 0x79, 0x12, 0x88, 0x97, 0xd9, 0x1c, 0x62,
3083 0x0d, 0x26, 0x43, 0x7d, 0x25, 0x86, 0x79, 0xc7,
3084 },
3085 .y = {
3086 0x07, 0x33, 0x91, 0x40, 0xde, 0x25, 0xb4, 0x3d,
3087 0x81, 0x2f, 0xd2, 0x41, 0x98, 0xe7, 0xaf, 0x0f,
3088 0x5f, 0x17, 0x85, 0x1f, 0x75, 0x6e, 0xf4, 0x0e,
3089 0x05, 0x19, 0x7f, 0x03, 0x9b, 0xf4, 0x41, 0x23,
3090 },
3091 },
3092 .public_key_rsp = {
3093 .x = {
3094 0x1d, 0x44, 0x66, 0x0d, 0x3a, 0x03, 0x71, 0x17,
3095 0xb3, 0x10, 0x2e, 0xf0, 0xd3, 0xf8, 0xa2, 0x6c,
3096 0x1f, 0xfc, 0xbf, 0x02, 0x62, 0x6b, 0x11, 0x5a,
3097 0x76, 0x5b, 0x30, 0x20, 0xb1, 0xef, 0xb3, 0x76,
3098 },
3099 .y = {
3100 0xf1, 0x23, 0x63, 0x75, 0xfc, 0xb6, 0xc9, 0x32,
3101 0xa4, 0x36, 0xbe, 0x18, 0xa0, 0x7d, 0x0b, 0x16,
3102 0x65, 0x24, 0xd0, 0xe3, 0x74, 0x1b, 0x34, 0x1a,
3103 0xf9, 0xe2, 0xcb, 0x30, 0x93, 0x88, 0xd7, 0xfa,
3104 },
3105 },
3106 .confirm_rsp[0] = {
3107 .value = {
3108 0x1e, 0x07, 0x87, 0xb2, 0x54, 0x3a, 0x44, 0x6b,
3109 0x97, 0x45, 0xa7, 0xa2, 0x36, 0xf4, 0x10, 0x42,
3110 },
3111 },
3112 .random_req[0] = {
3113 .value = {
3114 0x99, 0xc4, 0xdf, 0x4a, 0x2f, 0x14, 0xd8, 0x11,
3115 0xd3, 0x93, 0x53, 0xac, 0x64, 0xc8, 0x67, 0xe6,
3116 },
3117 },
3118 .random_rsp[0] = {
3119 .value = {
3120 0xc5, 0xb0, 0xf5, 0x2a, 0x65, 0x77, 0x05, 0xb8,
3121 0xf7, 0x5b, 0xad, 0x4e, 0xa9, 0x9e, 0x79, 0x98,
3122 },
3123 },
3124 .dhkey_check_req = {
3125 .value = {
3126 0xbb, 0x44, 0x9b, 0x1b, 0xcd, 0xfc, 0xdf, 0xff,
3127 0xbb, 0x34, 0xb7, 0x3b, 0x3e, 0x30, 0xa1, 0x6e,
3128 },
3129 },
3130 .dhkey_check_rsp = {
3131 .value = {
3132 0x58, 0x8f, 0xbe, 0xa2, 0x5f, 0xe3, 0x0a, 0xbc,
3133 0x17, 0x0f, 0x3b, 0x23, 0x27, 0xa5, 0xfb, 0x25,
3134 },
3135 },
3136 .id_info_req = {
3137 .irk = {
3138 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
3139 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff,
3140 },
3141 },
3142 .id_addr_info_req = {
3143 .addr_type = 0,
3144 .bd_addr = {
3145 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07,
3146 },
3147 },
3148 .sign_info_req = {
3149 .sig_key = {
3150 0xd3, 0x46, 0x86, 0xf7, 0xeb, 0x19, 0x0a, 0x18,
3151 0x5a, 0xb2, 0xd0, 0x5b, 0x0f, 0x03, 0x64, 0x01,
3152 },
3153 },
3154 .id_info_rsp = {
3155 .irk = {
3156 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
3157 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
3158 },
3159 },
3160 .id_addr_info_rsp = {
3161 .addr_type = 0,
3162 .bd_addr = {
3163 0x06, 0x05, 0x04, 0x03, 0x02, 0x01,
3164 },
3165 },
3166 .sign_info_rsp = {
3167 .sig_key = {
3168 0x84, 0x91, 0x5d, 0x89, 0xf6, 0xf0, 0x01, 0x65,
3169 0xed, 0xa9, 0xcc, 0x9b, 0xa4, 0xd4, 0x97, 0x86,
3170 },
3171 },
3172 .ltk = {
3173 0x4b, 0xb6, 0x1d, 0xd2, 0xba, 0xa4, 0x94, 0xe5,
3174 0x78, 0xde, 0xee, 0x47, 0x7a, 0x95, 0x91, 0x1c,
3175 },
3176 .pair_alg = BLE_SM_PAIR_ALG_JW,
3177 .authenticated = 0,
3178 .passkey_info = {
3179 .passkey = {
3180 .action = BLE_SM_IOACT_NONE,
3181 },
3182 },
3183 };
3184 ble_sm_test_util_peer_sc_good(¶ms);
3185 }
3186
3187 /**
3188 * Secure connections pairing
3189 * Master: peer
3190 * Pair algorithm: numeric comparison
3191 * Initiator IO capabilities: 1
3192 * Responder IO capabilities: 1
3193 * Bonding: true
3194 * Initiator address type: BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT
3195 * Responder address type: BLE_ADDR_PUBLIC_ID
3196 * Initiator key distribution: 3
3197 * Responder key distribution: 3
3198 */
TEST_CASE(ble_sm_sc_peer_nc_iio1_rio1_b1_iat2_rat2_ik3_rk3)3199 TEST_CASE(ble_sm_sc_peer_nc_iio1_rio1_b1_iat2_rat2_ik3_rk3)
3200 {
3201 struct ble_sm_test_params params;
3202
3203 params = (struct ble_sm_test_params) {
3204 .init_addr_type = BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT,
3205 .init_id_addr = {
3206 0x06, 0x05, 0x04, 0x03, 0x02, 0x01,
3207 },
3208 .init_rpa = {
3209 0xc5, 0xf3, 0x5d, 0x83, 0xcd, 0x4a,
3210 },
3211 .resp_addr_type = BLE_ADDR_PUBLIC_ID,
3212 .resp_id_addr = {
3213 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07,
3214 },
3215 .resp_rpa = {
3216 0x9f, 0x56, 0x57, 0x5e, 0x12, 0x65,
3217 },
3218 .pair_req = {
3219 .io_cap = 0x01,
3220 .oob_data_flag = 0x00,
3221 .authreq = 0x0d,
3222 .max_enc_key_size = 0x10,
3223 .init_key_dist = 0x03,
3224 .resp_key_dist = 0x03,
3225 },
3226 .pair_rsp = {
3227 .io_cap = 0x01,
3228 .oob_data_flag = 0x00,
3229 .authreq = 0x0d,
3230 .max_enc_key_size = 0x10,
3231 .init_key_dist = 0x03,
3232 .resp_key_dist = 0x03,
3233 },
3234 .our_priv_key = {
3235 0xc5, 0x04, 0xc5, 0xf9, 0x28, 0x95, 0x78, 0x17,
3236 0xd5, 0x97, 0x1d, 0x01, 0xbb, 0x2c, 0xcf, 0x77,
3237 0x5c, 0x70, 0x52, 0xc6, 0x5e, 0x33, 0x2e, 0xe7,
3238 0x79, 0x58, 0xc8, 0xf1, 0xc2, 0x2d, 0xb0, 0x61,
3239 },
3240 .public_key_req = {
3241 .x = {
3242 0x54, 0xd9, 0x8f, 0xeb, 0xc1, 0xbb, 0xe6, 0x74,
3243 0x8a, 0x55, 0x3a, 0x80, 0x0e, 0xef, 0x90, 0xc9,
3244 0xab, 0x79, 0x12, 0x88, 0x97, 0xd9, 0x1c, 0x62,
3245 0x0d, 0x26, 0x43, 0x7d, 0x25, 0x86, 0x79, 0xc7,
3246 },
3247 .y = {
3248 0x07, 0x33, 0x91, 0x40, 0xde, 0x25, 0xb4, 0x3d,
3249 0x81, 0x2f, 0xd2, 0x41, 0x98, 0xe7, 0xaf, 0x0f,
3250 0x5f, 0x17, 0x85, 0x1f, 0x75, 0x6e, 0xf4, 0x0e,
3251 0x05, 0x19, 0x7f, 0x03, 0x9b, 0xf4, 0x41, 0x23,
3252 },
3253 },
3254 .public_key_rsp = {
3255 .x = {
3256 0x1d, 0x44, 0x66, 0x0d, 0x3a, 0x03, 0x71, 0x17,
3257 0xb3, 0x10, 0x2e, 0xf0, 0xd3, 0xf8, 0xa2, 0x6c,
3258 0x1f, 0xfc, 0xbf, 0x02, 0x62, 0x6b, 0x11, 0x5a,
3259 0x76, 0x5b, 0x30, 0x20, 0xb1, 0xef, 0xb3, 0x76,
3260 },
3261 .y = {
3262 0xf1, 0x23, 0x63, 0x75, 0xfc, 0xb6, 0xc9, 0x32,
3263 0xa4, 0x36, 0xbe, 0x18, 0xa0, 0x7d, 0x0b, 0x16,
3264 0x65, 0x24, 0xd0, 0xe3, 0x74, 0x1b, 0x34, 0x1a,
3265 0xf9, 0xe2, 0xcb, 0x30, 0x93, 0x88, 0xd7, 0xfa,
3266 },
3267 },
3268 .confirm_rsp[0] = {
3269 .value = {
3270 0x39, 0xba, 0x86, 0x47, 0x06, 0x87, 0x14, 0xe4,
3271 0x5c, 0x82, 0xe9, 0x6a, 0x80, 0xca, 0x87, 0xcd,
3272 },
3273 },
3274 .random_req[0] = {
3275 .value = {
3276 0xce, 0xe2, 0xa3, 0x29, 0x8a, 0xc6, 0x76, 0x1d,
3277 0xa2, 0xfd, 0xe0, 0x7f, 0x8c, 0xbe, 0xf8, 0x1d,
3278 },
3279 },
3280 .random_rsp[0] = {
3281 .value = {
3282 0x3d, 0xac, 0xf0, 0xfe, 0x7c, 0x78, 0x73, 0x03,
3283 0xe2, 0xb6, 0x59, 0x7e, 0x80, 0xb4, 0x69, 0x07,
3284 },
3285 },
3286 .dhkey_check_req = {
3287 .value = {
3288 0xaa, 0x95, 0x9f, 0x33, 0x32, 0xa1, 0xbd, 0xf9,
3289 0xef, 0xb9, 0x3d, 0xfb, 0x08, 0xd1, 0x28, 0xa0,
3290 },
3291 },
3292 .dhkey_check_rsp = {
3293 .value = {
3294 0x3c, 0x10, 0x17, 0x76, 0x55, 0x65, 0x6f, 0x14,
3295 0xfa, 0x80, 0xd3, 0x52, 0x04, 0x82, 0xe2, 0xf7,
3296 },
3297 },
3298 .id_info_req = {
3299 .irk = {
3300 0xd4, 0x66, 0x94, 0xc9, 0x96, 0xd0, 0x28, 0x96,
3301 0x1c, 0xa1, 0x3b, 0xf7, 0x15, 0x95, 0x95, 0x43,
3302 },
3303 },
3304 .id_addr_info_req = {
3305 .addr_type = 0,
3306 .bd_addr = {
3307 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07,
3308 },
3309 },
3310 .id_info_rsp = {
3311 .irk = {
3312 0xb7, 0x98, 0xac, 0x85, 0xc4, 0x0a, 0x69, 0x8d,
3313 0xa6, 0xaf, 0xf3, 0x1f, 0x63, 0x3c, 0xf2, 0x33,
3314 },
3315 },
3316 .id_addr_info_rsp = {
3317 .addr_type = 0,
3318 .bd_addr = {
3319 0x06, 0x05, 0x04, 0x03, 0x02, 0x01,
3320 },
3321 },
3322 .ltk = {
3323 0x95, 0x46, 0xe6, 0x8e, 0x52, 0xcc, 0x05, 0xca,
3324 0xf4, 0x59, 0x57, 0x54, 0x8c, 0x0d, 0x51, 0xfc,
3325 },
3326 .pair_alg = BLE_SM_PAIR_ALG_NUMCMP,
3327 .authenticated = 1,
3328 .passkey_info = {
3329 .passkey = {
3330 .action = BLE_SM_IOACT_NUMCMP,
3331 .numcmp_accept = 1,
3332 },
3333 .exp_numcmp = 70210,
3334 },
3335 };
3336 ble_sm_test_util_peer_sc_good(¶ms);
3337 }
3338
3339 /**
3340 * Secure connections pairing
3341 * Master: peer
3342 * Pair algorithm: passkey entry
3343 * Initiator IO capabilities: 2
3344 * Responder IO capabilities: 0
3345 * Bonding: true
3346 * Initiator address type: BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT
3347 * Responder address type: BLE_ADDR_PUBLIC_ID
3348 * Initiator key distribution: 7
3349 * Responder key distribution: 3
3350 */
TEST_CASE(ble_sm_sc_peer_pk_iio2_rio0_b1_iat2_rat2_ik7_rk3)3351 TEST_CASE(ble_sm_sc_peer_pk_iio2_rio0_b1_iat2_rat2_ik7_rk3)
3352 {
3353 struct ble_sm_test_params params;
3354
3355 params = (struct ble_sm_test_params) {
3356 .init_addr_type = BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT,
3357 .init_id_addr = {
3358 0x06, 0x05, 0x04, 0x03, 0x02, 0x01,
3359 },
3360 .init_rpa = {
3361 0x6e, 0x56, 0x09, 0xef, 0x1e, 0x76,
3362 },
3363 .resp_addr_type = BLE_ADDR_PUBLIC_ID,
3364 .resp_id_addr = {
3365 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07,
3366 },
3367 .resp_rpa = {
3368 0xb5, 0x29, 0xdf, 0xb4, 0x9b, 0x62,
3369 },
3370 .pair_req = {
3371 .io_cap = 0x02,
3372 .oob_data_flag = 0x00,
3373 .authreq = 0x0d,
3374 .max_enc_key_size = 0x10,
3375 .init_key_dist = 0x07,
3376 .resp_key_dist = 0x03,
3377 },
3378 .pair_rsp = {
3379 .io_cap = 0x00,
3380 .oob_data_flag = 0x00,
3381 .authreq = 0x0d,
3382 .max_enc_key_size = 0x10,
3383 .init_key_dist = 0x07,
3384 .resp_key_dist = 0x03,
3385 },
3386 .our_priv_key = {
3387 0xc5, 0x04, 0xc5, 0xf9, 0x28, 0x95, 0x78, 0x17,
3388 0xd5, 0x97, 0x1d, 0x01, 0xbb, 0x2c, 0xcf, 0x77,
3389 0x5c, 0x70, 0x52, 0xc6, 0x5e, 0x33, 0x2e, 0xe7,
3390 0x79, 0x58, 0xc8, 0xf1, 0xc2, 0x2d, 0xb0, 0x61,
3391 },
3392 .public_key_req = {
3393 .x = {
3394 0x54, 0xd9, 0x8f, 0xeb, 0xc1, 0xbb, 0xe6, 0x74,
3395 0x8a, 0x55, 0x3a, 0x80, 0x0e, 0xef, 0x90, 0xc9,
3396 0xab, 0x79, 0x12, 0x88, 0x97, 0xd9, 0x1c, 0x62,
3397 0x0d, 0x26, 0x43, 0x7d, 0x25, 0x86, 0x79, 0xc7,
3398 },
3399 .y = {
3400 0x07, 0x33, 0x91, 0x40, 0xde, 0x25, 0xb4, 0x3d,
3401 0x81, 0x2f, 0xd2, 0x41, 0x98, 0xe7, 0xaf, 0x0f,
3402 0x5f, 0x17, 0x85, 0x1f, 0x75, 0x6e, 0xf4, 0x0e,
3403 0x05, 0x19, 0x7f, 0x03, 0x9b, 0xf4, 0x41, 0x23,
3404 },
3405 },
3406 .public_key_rsp = {
3407 .x = {
3408 0x1d, 0x44, 0x66, 0x0d, 0x3a, 0x03, 0x71, 0x17,
3409 0xb3, 0x10, 0x2e, 0xf0, 0xd3, 0xf8, 0xa2, 0x6c,
3410 0x1f, 0xfc, 0xbf, 0x02, 0x62, 0x6b, 0x11, 0x5a,
3411 0x76, 0x5b, 0x30, 0x20, 0xb1, 0xef, 0xb3, 0x76,
3412 },
3413 .y = {
3414 0xf1, 0x23, 0x63, 0x75, 0xfc, 0xb6, 0xc9, 0x32,
3415 0xa4, 0x36, 0xbe, 0x18, 0xa0, 0x7d, 0x0b, 0x16,
3416 0x65, 0x24, 0xd0, 0xe3, 0x74, 0x1b, 0x34, 0x1a,
3417 0xf9, 0xe2, 0xcb, 0x30, 0x93, 0x88, 0xd7, 0xfa,
3418 },
3419 },
3420 .confirm_req[0] = {
3421 .value = {
3422 0x12, 0xe3, 0x01, 0xd0, 0x30, 0x59, 0xca, 0xd9,
3423 0x78, 0x0b, 0x45, 0x73, 0xb1, 0x7a, 0x4d, 0xca,
3424 },
3425 },
3426 .confirm_rsp[0] = {
3427 .value = {
3428 0x47, 0x68, 0x16, 0x24, 0xd4, 0x07, 0x60, 0x6c,
3429 0xa5, 0x47, 0x6f, 0x05, 0x78, 0x71, 0x3e, 0xa8,
3430 },
3431 },
3432 .random_req[0] = {
3433 .value = {
3434 0x2a, 0x29, 0xa8, 0xef, 0x0b, 0x70, 0x5f, 0x1b,
3435 0x81, 0x4d, 0x97, 0xff, 0xfb, 0x7f, 0x30, 0x90,
3436 },
3437 },
3438 .random_rsp[0] = {
3439 .value = {
3440 0x12, 0x9e, 0x1d, 0x12, 0x11, 0x44, 0x36, 0x74,
3441 0xa3, 0x0c, 0xea, 0x36, 0x4d, 0xdf, 0x2d, 0x5d,
3442 },
3443 },
3444 .confirm_req[1] = {
3445 .value = {
3446 0x4d, 0x6a, 0x32, 0xfe, 0xe2, 0xa0, 0xdd, 0x92,
3447 0x60, 0x5c, 0x82, 0x7f, 0xa6, 0xa6, 0x24, 0xd6,
3448 },
3449 },
3450 .confirm_rsp[1] = {
3451 .value = {
3452 0xd5, 0x3e, 0xa7, 0xa0, 0xbf, 0x39, 0x8e, 0xfe,
3453 0xfd, 0x73, 0x47, 0x4c, 0x92, 0x8b, 0x74, 0x06,
3454 },
3455 },
3456 .random_req[1] = {
3457 .value = {
3458 0xc1, 0x88, 0xdf, 0xb0, 0x99, 0xbb, 0xbf, 0xed,
3459 0xdc, 0x40, 0x66, 0x55, 0xbe, 0x91, 0x56, 0x9a,
3460 },
3461 },
3462 .random_rsp[1] = {
3463 .value = {
3464 0xed, 0xed, 0x9a, 0x61, 0xb8, 0x21, 0x03, 0x77,
3465 0xa6, 0xcf, 0x34, 0x65, 0x8c, 0x18, 0x82, 0x9f,
3466 },
3467 },
3468 .confirm_req[2] = {
3469 .value = {
3470 0xdb, 0xea, 0x94, 0x29, 0xe4, 0x44, 0x7d, 0x7b,
3471 0xd3, 0x16, 0x81, 0x8e, 0xaf, 0xe6, 0x9c, 0x85,
3472 },
3473 },
3474 .confirm_rsp[2] = {
3475 .value = {
3476 0x3f, 0xdd, 0x54, 0x76, 0xab, 0x45, 0x7f, 0x53,
3477 0x64, 0x6b, 0x37, 0xa6, 0xc7, 0xc6, 0x4a, 0x73,
3478 },
3479 },
3480 .random_req[2] = {
3481 .value = {
3482 0x5a, 0xf1, 0xfb, 0xde, 0xb3, 0xbe, 0x6e, 0xac,
3483 0x68, 0x51, 0x47, 0x8e, 0x0b, 0xcd, 0xc1, 0xa0,
3484 },
3485 },
3486 .random_rsp[2] = {
3487 .value = {
3488 0x29, 0x0f, 0x5e, 0x83, 0x87, 0xca, 0xd3, 0x21,
3489 0xa7, 0x7e, 0x3d, 0x78, 0x47, 0x54, 0xf8, 0xe4,
3490 },
3491 },
3492 .confirm_req[3] = {
3493 .value = {
3494 0xca, 0x3e, 0xd5, 0xe3, 0x59, 0xb0, 0x5d, 0x1e,
3495 0x0f, 0x4c, 0x95, 0x0f, 0x6a, 0x72, 0xcf, 0x25,
3496 },
3497 },
3498 .confirm_rsp[3] = {
3499 .value = {
3500 0x2f, 0x4d, 0x06, 0x40, 0x09, 0x68, 0x68, 0x45,
3501 0x87, 0x79, 0x78, 0x48, 0xda, 0xe4, 0xf5, 0xae,
3502 },
3503 },
3504 .random_req[3] = {
3505 .value = {
3506 0x63, 0x5a, 0xee, 0x91, 0xe4, 0xf8, 0xe8, 0x69,
3507 0xd1, 0x46, 0x18, 0x0d, 0xd2, 0x94, 0xd8, 0x20,
3508 },
3509 },
3510 .random_rsp[3] = {
3511 .value = {
3512 0x76, 0x36, 0xf5, 0xc2, 0x41, 0xb6, 0x3c, 0x1f,
3513 0x36, 0x19, 0x58, 0xce, 0x8f, 0x41, 0xeb, 0x8c,
3514 },
3515 },
3516 .confirm_req[4] = {
3517 .value = {
3518 0x76, 0xfd, 0x84, 0x0f, 0x0f, 0x58, 0x70, 0x45,
3519 0x41, 0x33, 0x5d, 0xce, 0xe5, 0xe2, 0x2f, 0x83,
3520 },
3521 },
3522 .confirm_rsp[4] = {
3523 .value = {
3524 0x87, 0xcf, 0xdf, 0xa5, 0x60, 0x82, 0x4f, 0x09,
3525 0x4c, 0x50, 0x24, 0xba, 0x91, 0x96, 0x0d, 0x65,
3526 },
3527 },
3528 .random_req[4] = {
3529 .value = {
3530 0x67, 0xdb, 0x73, 0x1e, 0x57, 0x5c, 0xb7, 0x86,
3531 0xf8, 0xaf, 0x58, 0xd8, 0x0f, 0x97, 0x47, 0xce,
3532 },
3533 },
3534 .random_rsp[4] = {
3535 .value = {
3536 0xaa, 0x99, 0x90, 0x05, 0x11, 0xfc, 0xc2, 0xd9,
3537 0xb8, 0xd6, 0x9d, 0xef, 0x86, 0x10, 0xcf, 0x26,
3538 },
3539 },
3540 .confirm_req[5] = {
3541 .value = {
3542 0xfc, 0x22, 0xd9, 0x1f, 0x5f, 0x86, 0x25, 0xe7,
3543 0x5e, 0x55, 0x48, 0x35, 0xec, 0x32, 0x37, 0x6d,
3544 },
3545 },
3546 .confirm_rsp[5] = {
3547 .value = {
3548 0x98, 0xbc, 0x07, 0x72, 0xa2, 0xe7, 0xa7, 0x66,
3549 0x64, 0xf7, 0x29, 0x3a, 0xaf, 0x52, 0x18, 0x04,
3550 },
3551 },
3552 .random_req[5] = {
3553 .value = {
3554 0xd3, 0x36, 0xb9, 0x69, 0x6a, 0x6d, 0x55, 0xbc,
3555 0x82, 0xdf, 0x1c, 0x04, 0xa7, 0xd5, 0x00, 0x68,
3556 },
3557 },
3558 .random_rsp[5] = {
3559 .value = {
3560 0xb9, 0x03, 0xbf, 0xd9, 0x86, 0x5a, 0x1a, 0xb4,
3561 0xdc, 0xe6, 0x8f, 0x9b, 0xa4, 0xa8, 0x2a, 0x12,
3562 },
3563 },
3564 .confirm_req[6] = {
3565 .value = {
3566 0xfe, 0x14, 0xab, 0x1c, 0xfd, 0x36, 0x64, 0x38,
3567 0xc1, 0xf8, 0xdd, 0xcd, 0xf4, 0x77, 0xa1, 0xb8,
3568 },
3569 },
3570 .confirm_rsp[6] = {
3571 .value = {
3572 0x2e, 0x70, 0x54, 0xdc, 0xa6, 0xae, 0xb2, 0xcd,
3573 0x4a, 0x26, 0x97, 0xf8, 0xbf, 0xb4, 0xb4, 0x52,
3574 },
3575 },
3576 .random_req[6] = {
3577 .value = {
3578 0x1e, 0x27, 0x73, 0x94, 0x44, 0xfc, 0xd4, 0x44,
3579 0xbf, 0x5b, 0x7d, 0x5d, 0x6d, 0x13, 0x68, 0xb1,
3580 },
3581 },
3582 .random_rsp[6] = {
3583 .value = {
3584 0xeb, 0xfd, 0x0b, 0xa1, 0x7b, 0xda, 0x61, 0xdc,
3585 0x6d, 0xe4, 0x3b, 0x51, 0xa7, 0x09, 0x29, 0x6d,
3586 },
3587 },
3588 .confirm_req[7] = {
3589 .value = {
3590 0x38, 0x2b, 0x23, 0xb9, 0x18, 0x2d, 0xb9, 0x0b,
3591 0xe7, 0x4d, 0x20, 0x83, 0xab, 0x17, 0xfd, 0x88,
3592 },
3593 },
3594 .confirm_rsp[7] = {
3595 .value = {
3596 0x65, 0x60, 0x85, 0xef, 0x0e, 0x9a, 0x23, 0x96,
3597 0xe7, 0xa9, 0xee, 0xba, 0x9e, 0x48, 0xb9, 0x1c,
3598 },
3599 },
3600 .random_req[7] = {
3601 .value = {
3602 0x8b, 0xa8, 0x7a, 0x33, 0x15, 0x1e, 0xa7, 0x78,
3603 0x27, 0x01, 0x3e, 0x90, 0x43, 0x47, 0x5a, 0x9d,
3604 },
3605 },
3606 .random_rsp[7] = {
3607 .value = {
3608 0x76, 0xf1, 0x21, 0x67, 0x94, 0x20, 0x6f, 0xc7,
3609 0x84, 0xc8, 0xdb, 0x07, 0xdb, 0x77, 0xdd, 0x50,
3610 },
3611 },
3612 .confirm_req[8] = {
3613 .value = {
3614 0x4e, 0x7f, 0x83, 0x8e, 0xa6, 0x28, 0xaa, 0x46,
3615 0xa2, 0x69, 0x95, 0x3b, 0xf0, 0x71, 0x14, 0x24,
3616 },
3617 },
3618 .confirm_rsp[8] = {
3619 .value = {
3620 0x93, 0x0b, 0x4d, 0xbe, 0x49, 0x36, 0xa0, 0x26,
3621 0xe9, 0x18, 0x4e, 0xc8, 0x19, 0x59, 0xc1, 0x7d,
3622 },
3623 },
3624 .random_req[8] = {
3625 .value = {
3626 0x11, 0xa9, 0xce, 0x26, 0x0e, 0x2f, 0x11, 0x0e,
3627 0xc1, 0xbd, 0x68, 0x80, 0xc8, 0xf8, 0x41, 0x65,
3628 },
3629 },
3630 .random_rsp[8] = {
3631 .value = {
3632 0xb6, 0x3d, 0x6b, 0x62, 0xb5, 0x37, 0x31, 0x28,
3633 0x79, 0xc4, 0xe2, 0x62, 0xbb, 0x63, 0xf9, 0x91,
3634 },
3635 },
3636 .confirm_req[9] = {
3637 .value = {
3638 0x5f, 0x55, 0xb5, 0xa4, 0x80, 0xa8, 0x54, 0x47,
3639 0xa7, 0x79, 0x87, 0x12, 0x2e, 0x44, 0x92, 0x42,
3640 },
3641 },
3642 .confirm_rsp[9] = {
3643 .value = {
3644 0x01, 0x69, 0xa2, 0xac, 0xd6, 0x62, 0x8a, 0x64,
3645 0xa2, 0x0b, 0xd0, 0xb4, 0x0e, 0x68, 0xe0, 0x88,
3646 },
3647 },
3648 .random_req[9] = {
3649 .value = {
3650 0x75, 0x1e, 0x56, 0xd0, 0xcb, 0x06, 0xfd, 0x51,
3651 0x55, 0xae, 0x77, 0xa4, 0xf2, 0xe7, 0x86, 0x3c,
3652 },
3653 },
3654 .random_rsp[9] = {
3655 .value = {
3656 0xff, 0xab, 0x8a, 0x7d, 0xb7, 0x40, 0xe5, 0x07,
3657 0xfe, 0x8f, 0x74, 0xdb, 0x2c, 0x35, 0x35, 0x12,
3658 },
3659 },
3660 .confirm_req[10] = {
3661 .value = {
3662 0x1f, 0x2a, 0xed, 0xcd, 0x6b, 0x87, 0xea, 0xa2,
3663 0xf8, 0xd8, 0xad, 0x04, 0x23, 0xc7, 0x5d, 0x47,
3664 },
3665 },
3666 .confirm_rsp[10] = {
3667 .value = {
3668 0x5b, 0x18, 0x2d, 0x96, 0x3b, 0xf6, 0xdc, 0x82,
3669 0x3b, 0xfa, 0xc9, 0x81, 0xc7, 0x33, 0xa0, 0x07,
3670 },
3671 },
3672 .random_req[10] = {
3673 .value = {
3674 0xd1, 0x3a, 0x82, 0xce, 0x31, 0x75, 0xa2, 0xbf,
3675 0x6f, 0x12, 0xf2, 0xac, 0xf6, 0xcc, 0xea, 0x34,
3676 },
3677 },
3678 .random_rsp[10] = {
3679 .value = {
3680 0xcf, 0x11, 0x3d, 0x44, 0x10, 0x0d, 0x26, 0x32,
3681 0xa5, 0x61, 0x13, 0xfd, 0xb8, 0xed, 0x31, 0x53,
3682 },
3683 },
3684 .confirm_req[11] = {
3685 .value = {
3686 0x67, 0x14, 0x8a, 0xf6, 0xc8, 0xb8, 0x73, 0x6b,
3687 0xb2, 0xec, 0xa9, 0x61, 0xaa, 0xc0, 0xc9, 0x28,
3688 },
3689 },
3690 .confirm_rsp[11] = {
3691 .value = {
3692 0xa5, 0xbf, 0x00, 0x07, 0x48, 0xff, 0x30, 0x36,
3693 0x20, 0x83, 0xd7, 0xd6, 0xd0, 0x90, 0x46, 0x03,
3694 },
3695 },
3696 .random_req[11] = {
3697 .value = {
3698 0x75, 0x99, 0x9a, 0xa3, 0xad, 0x9a, 0xe5, 0x9d,
3699 0x2f, 0x21, 0xdb, 0x72, 0x2f, 0xaf, 0xb8, 0x79,
3700 },
3701 },
3702 .random_rsp[11] = {
3703 .value = {
3704 0xa3, 0xb7, 0xb7, 0x46, 0x39, 0x99, 0xc2, 0x82,
3705 0xe9, 0x31, 0x8d, 0xc2, 0x28, 0x1b, 0x86, 0x91,
3706 },
3707 },
3708 .confirm_req[12] = {
3709 .value = {
3710 0x46, 0x2f, 0xc8, 0x0e, 0x2c, 0x70, 0x3a, 0xdb,
3711 0x25, 0x2f, 0xce, 0xe6, 0x15, 0x1f, 0x9a, 0x06,
3712 },
3713 },
3714 .confirm_rsp[12] = {
3715 .value = {
3716 0x9a, 0xa4, 0xe0, 0x03, 0x3a, 0xb5, 0x43, 0x75,
3717 0x8e, 0x93, 0x35, 0x25, 0xe6, 0x5e, 0x9d, 0x7f,
3718 },
3719 },
3720 .random_req[12] = {
3721 .value = {
3722 0x1f, 0x01, 0x32, 0x56, 0x64, 0x45, 0xc5, 0x20,
3723 0xd4, 0xad, 0x13, 0x8f, 0xbe, 0x82, 0xc8, 0x01,
3724 },
3725 },
3726 .random_rsp[12] = {
3727 .value = {
3728 0xd4, 0x3f, 0xa4, 0xc9, 0xe9, 0x2e, 0x62, 0x77,
3729 0x4e, 0x21, 0x55, 0xd8, 0xde, 0x31, 0xf5, 0xea,
3730 },
3731 },
3732 .confirm_req[13] = {
3733 .value = {
3734 0x4e, 0x48, 0x88, 0x4e, 0x4f, 0x74, 0x7e, 0xec,
3735 0x99, 0x5d, 0xb1, 0xcb, 0x84, 0x88, 0x80, 0xe9,
3736 },
3737 },
3738 .confirm_rsp[13] = {
3739 .value = {
3740 0x1a, 0x84, 0xfa, 0x2f, 0xd7, 0x3c, 0x5f, 0xee,
3741 0x3e, 0x81, 0xc0, 0x4b, 0x35, 0x4b, 0x7e, 0x98,
3742 },
3743 },
3744 .random_req[13] = {
3745 .value = {
3746 0xe3, 0x3a, 0xc5, 0x2f, 0x9f, 0x91, 0x93, 0xfb,
3747 0xcb, 0xd8, 0x53, 0x63, 0xab, 0xc4, 0xa5, 0x85,
3748 },
3749 },
3750 .random_rsp[13] = {
3751 .value = {
3752 0xa0, 0xcf, 0xad, 0x30, 0x2d, 0xec, 0xea, 0x81,
3753 0xfd, 0x7f, 0xcf, 0x7c, 0x70, 0xc9, 0x89, 0x7b,
3754 },
3755 },
3756 .confirm_req[14] = {
3757 .value = {
3758 0xe1, 0x64, 0x22, 0x19, 0x41, 0x44, 0x37, 0x2b,
3759 0x92, 0x60, 0xa4, 0x1f, 0xd6, 0x53, 0xe0, 0xa0,
3760 },
3761 },
3762 .confirm_rsp[14] = {
3763 .value = {
3764 0x08, 0xfa, 0xa4, 0xf8, 0x04, 0x08, 0xb8, 0x9f,
3765 0x61, 0xb5, 0x68, 0xaf, 0x31, 0x12, 0x8d, 0x3f,
3766 },
3767 },
3768 .random_req[14] = {
3769 .value = {
3770 0xad, 0x76, 0xc3, 0x1a, 0x4c, 0x64, 0x2c, 0x11,
3771 0x5e, 0x48, 0x6d, 0x41, 0xf5, 0x77, 0xc2, 0x40,
3772 },
3773 },
3774 .random_rsp[14] = {
3775 .value = {
3776 0x1b, 0xec, 0x78, 0x2b, 0xd9, 0xbe, 0x93, 0xbd,
3777 0x0b, 0x03, 0xf1, 0xd8, 0x31, 0xe8, 0x60, 0x67,
3778 },
3779 },
3780 .confirm_req[15] = {
3781 .value = {
3782 0x5e, 0x22, 0x44, 0x09, 0x97, 0xf9, 0xc5, 0xc7,
3783 0x23, 0xc7, 0x74, 0x51, 0xe5, 0x9d, 0x5c, 0xed,
3784 },
3785 },
3786 .confirm_rsp[15] = {
3787 .value = {
3788 0xfe, 0xb2, 0x90, 0xa7, 0x06, 0xaf, 0xdd, 0x6a,
3789 0x83, 0x26, 0x3c, 0x78, 0x66, 0xe0, 0x9d, 0xd9,
3790 },
3791 },
3792 .random_req[15] = {
3793 .value = {
3794 0xb2, 0xa0, 0x75, 0x6f, 0x77, 0xc1, 0x0b, 0x4e,
3795 0x99, 0xfa, 0x9a, 0x02, 0xf6, 0xe4, 0x66, 0x27,
3796 },
3797 },
3798 .random_rsp[15] = {
3799 .value = {
3800 0xf9, 0xdd, 0x69, 0xae, 0xc8, 0x66, 0xa9, 0xab,
3801 0xb8, 0x01, 0x38, 0xc3, 0x2a, 0x6b, 0x94, 0x66,
3802 },
3803 },
3804 .confirm_req[16] = {
3805 .value = {
3806 0x17, 0xc9, 0xf7, 0x2d, 0xe6, 0xb7, 0x99, 0x77,
3807 0x65, 0xf7, 0x62, 0xc8, 0x0d, 0x7d, 0xbd, 0x81,
3808 },
3809 },
3810 .confirm_rsp[16] = {
3811 .value = {
3812 0x39, 0xef, 0xbf, 0x39, 0xfa, 0x79, 0xc3, 0x7b,
3813 0x71, 0x40, 0x3c, 0x1f, 0x67, 0xe5, 0x60, 0xe5,
3814 },
3815 },
3816 .random_req[16] = {
3817 .value = {
3818 0x32, 0xab, 0x8b, 0xed, 0x90, 0x04, 0x5e, 0x17,
3819 0xd2, 0x5e, 0xa8, 0x91, 0xf7, 0x77, 0xe3, 0xd7,
3820 },
3821 },
3822 .random_rsp[16] = {
3823 .value = {
3824 0x6c, 0xc7, 0x14, 0x13, 0xdf, 0xfb, 0xc6, 0xed,
3825 0xa3, 0x9c, 0xa7, 0x90, 0xae, 0x4c, 0x61, 0x47,
3826 },
3827 },
3828 .confirm_req[17] = {
3829 .value = {
3830 0xc5, 0x17, 0x07, 0x35, 0x34, 0xbf, 0xc1, 0x4d,
3831 0xc4, 0x57, 0xc0, 0xd9, 0xfd, 0xe9, 0x10, 0x08,
3832 },
3833 },
3834 .confirm_rsp[17] = {
3835 .value = {
3836 0xbb, 0xcf, 0x41, 0xd2, 0x94, 0xea, 0xbe, 0x2f,
3837 0xde, 0xb2, 0xb4, 0x20, 0x72, 0x1c, 0xf8, 0x35,
3838 },
3839 },
3840 .random_req[17] = {
3841 .value = {
3842 0x59, 0x20, 0xb5, 0xdc, 0xaf, 0xc3, 0x8b, 0x32,
3843 0xe6, 0x40, 0x0f, 0x02, 0x67, 0x45, 0x49, 0x1f,
3844 },
3845 },
3846 .random_rsp[17] = {
3847 .value = {
3848 0xf5, 0x95, 0x60, 0x4c, 0x5f, 0x39, 0x54, 0xbf,
3849 0x62, 0x9e, 0x85, 0xca, 0x31, 0x9a, 0x95, 0xee,
3850 },
3851 },
3852 .confirm_req[18] = {
3853 .value = {
3854 0x36, 0x50, 0x78, 0x6b, 0x0f, 0x11, 0xe3, 0xa9,
3855 0x79, 0x3a, 0xa6, 0x9d, 0xd4, 0x8b, 0x13, 0x3f,
3856 },
3857 },
3858 .confirm_rsp[18] = {
3859 .value = {
3860 0xa5, 0x34, 0x5d, 0x5e, 0x43, 0x01, 0xf2, 0xe1,
3861 0x3f, 0xf2, 0x1c, 0x8b, 0x13, 0xf7, 0x17, 0x3e,
3862 },
3863 },
3864 .random_req[18] = {
3865 .value = {
3866 0x77, 0xa1, 0xbe, 0xbf, 0x49, 0xb8, 0x74, 0x73,
3867 0x47, 0x78, 0x2a, 0xf8, 0x66, 0x6b, 0xff, 0xd2,
3868 },
3869 },
3870 .random_rsp[18] = {
3871 .value = {
3872 0xa2, 0x05, 0x69, 0x65, 0x3f, 0xd4, 0xb4, 0xcd,
3873 0xed, 0x8c, 0x36, 0x6d, 0x51, 0x6a, 0xbb, 0xef,
3874 },
3875 },
3876 .confirm_req[19] = {
3877 .value = {
3878 0xda, 0xd8, 0x96, 0xfd, 0x1c, 0x0d, 0x1e, 0x56,
3879 0xe2, 0x62, 0xed, 0x18, 0x4b, 0xd3, 0x46, 0x48,
3880 },
3881 },
3882 .confirm_rsp[19] = {
3883 .value = {
3884 0xeb, 0x79, 0x5e, 0x52, 0x70, 0x25, 0xa7, 0x41,
3885 0x33, 0xfa, 0xac, 0xd3, 0x27, 0x35, 0xfc, 0x5f,
3886 },
3887 },
3888 .random_req[19] = {
3889 .value = {
3890 0xa8, 0x9c, 0xb9, 0xcd, 0x13, 0xb8, 0xdd, 0xd2,
3891 0x09, 0xd6, 0xc8, 0x12, 0xc3, 0x69, 0x9a, 0x64,
3892 },
3893 },
3894 .random_rsp[19] = {
3895 .value = {
3896 0x06, 0xe3, 0x8a, 0xef, 0xe4, 0x42, 0xae, 0x86,
3897 0xef, 0x58, 0x80, 0xe8, 0xe3, 0xa2, 0x09, 0x44,
3898 },
3899 },
3900 .dhkey_check_req = {
3901 .value = {
3902 0x6f, 0xa5, 0x37, 0x06, 0x4a, 0x89, 0x98, 0x39,
3903 0xf6, 0x69, 0x48, 0x56, 0x17, 0x6d, 0x44, 0x7c,
3904 },
3905 },
3906 .dhkey_check_rsp = {
3907 .value = {
3908 0x82, 0x48, 0xd4, 0x9e, 0xb8, 0x3c, 0xb4, 0xdc,
3909 0x44, 0xcb, 0x19, 0xdb, 0xcb, 0xa2, 0x00, 0x5d,
3910 },
3911 },
3912 .id_info_req = {
3913 .irk = {
3914 0x79, 0x12, 0x88, 0x97, 0xd9, 0x1c, 0x62, 0x0d,
3915 0x26, 0x43, 0x7d, 0x25, 0x86, 0x79, 0xc7, 0x07,
3916 },
3917 },
3918 .id_addr_info_req = {
3919 .addr_type = 0,
3920 .bd_addr = {
3921 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07,
3922 },
3923 },
3924 .id_info_rsp = {
3925 .irk = {
3926 0xda, 0x6b, 0x27, 0xa0, 0xac, 0x71, 0xf0, 0xc3,
3927 0x75, 0x51, 0xf6, 0x21, 0x94, 0xec, 0x81, 0x92,
3928 },
3929 },
3930 .id_addr_info_rsp = {
3931 .addr_type = 0,
3932 .bd_addr = {
3933 0x06, 0x05, 0x04, 0x03, 0x02, 0x01,
3934 },
3935 },
3936 .sign_info_rsp = {
3937 .sig_key = {
3938 0x49, 0x5b, 0x11, 0xb3, 0x4c, 0x1a, 0x23, 0x5c,
3939 0x61, 0x4f, 0xe3, 0x08, 0xf9, 0x47, 0x8b, 0xdc,
3940 },
3941 },
3942 .ltk = {
3943 0x5a, 0x49, 0x28, 0xf0, 0x11, 0x3b, 0x6f, 0x6b,
3944 0x3a, 0x69, 0x6d, 0xdd, 0xb2, 0xe5, 0xa8, 0x97,
3945 },
3946 .pair_alg = BLE_SM_PAIR_ALG_PASSKEY,
3947 .authenticated = 1,
3948 .passkey_info = {
3949 .passkey = {
3950 .action = BLE_SM_IOACT_DISP,
3951 .passkey = 4915,
3952 },
3953 },
3954 };
3955 ble_sm_test_util_peer_sc_good(¶ms);
3956 }
3957
3958 /**
3959 * Secure connections pairing
3960 * Master: us
3961 * Pair algorithm: just works
3962 * Initiator IO capabilities: 3
3963 * Responder IO capabilities: 3
3964 * Bonding: true
3965 * Initiator address type: BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT
3966 * Responder address type: BLE_ADDR_PUBLIC_ID
3967 * Initiator key distribution: 3
3968 * Responder key distribution: 3
3969 */
TEST_CASE(ble_sm_sc_us_jw_iio3_rio3_b1_iat2_rat2_ik3_rk3)3970 TEST_CASE(ble_sm_sc_us_jw_iio3_rio3_b1_iat2_rat2_ik3_rk3)
3971 {
3972 struct ble_sm_test_params params;
3973
3974 params = (struct ble_sm_test_params) {
3975 .init_addr_type = BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT,
3976 .init_id_addr = {
3977 0x06, 0x05, 0x04, 0x03, 0x02, 0x01,
3978 },
3979 .init_rpa = {
3980 0x46, 0x85, 0x37, 0x90, 0x86, 0x58,
3981 },
3982 .resp_addr_type = BLE_ADDR_PUBLIC_ID,
3983 .resp_id_addr = {
3984 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07,
3985 },
3986 .resp_rpa = {
3987 0x6d, 0x59, 0x7d, 0xa9, 0x87, 0x74,
3988 },
3989 .pair_req = {
3990 .io_cap = 0x03,
3991 .oob_data_flag = 0x00,
3992 .authreq = 0x09,
3993 .max_enc_key_size = 0x10,
3994 .init_key_dist = 0x03,
3995 .resp_key_dist = 0x03,
3996 },
3997 .pair_rsp = {
3998 .io_cap = 0x03,
3999 .oob_data_flag = 0x00,
4000 .authreq = 0x09,
4001 .max_enc_key_size = 0x10,
4002 .init_key_dist = 0x03,
4003 .resp_key_dist = 0x03,
4004 },
4005 .our_priv_key = {
4006 0xdb, 0x24, 0x2e, 0x91, 0xda, 0xaa, 0x33, 0x33,
4007 0x23, 0xa2, 0x1e, 0xbe, 0x06, 0x69, 0xdb, 0xad,
4008 0xa9, 0x2a, 0x91, 0xb1, 0x24, 0x0a, 0xc7, 0xaf,
4009 0x50, 0x0c, 0x65, 0x5b, 0x97, 0x1e, 0x12, 0x10,
4010 },
4011 .public_key_req = {
4012 .x = {
4013 0x54, 0xd9, 0x8f, 0xeb, 0xc1, 0xbb, 0xe6, 0x74,
4014 0x8a, 0x55, 0x3a, 0x80, 0x0e, 0xef, 0x90, 0xc9,
4015 0xab, 0x79, 0x12, 0x88, 0x97, 0xd9, 0x1c, 0x62,
4016 0x0d, 0x26, 0x43, 0x7d, 0x25, 0x86, 0x79, 0xc7,
4017 },
4018 .y = {
4019 0x07, 0x33, 0x91, 0x40, 0xde, 0x25, 0xb4, 0x3d,
4020 0x81, 0x2f, 0xd2, 0x41, 0x98, 0xe7, 0xaf, 0x0f,
4021 0x5f, 0x17, 0x85, 0x1f, 0x75, 0x6e, 0xf4, 0x0e,
4022 0x05, 0x19, 0x7f, 0x03, 0x9b, 0xf4, 0x41, 0x23,
4023 },
4024 },
4025 .public_key_rsp = {
4026 .x = {
4027 0x1d, 0x44, 0x66, 0x0d, 0x3a, 0x03, 0x71, 0x17,
4028 0xb3, 0x10, 0x2e, 0xf0, 0xd3, 0xf8, 0xa2, 0x6c,
4029 0x1f, 0xfc, 0xbf, 0x02, 0x62, 0x6b, 0x11, 0x5a,
4030 0x76, 0x5b, 0x30, 0x20, 0xb1, 0xef, 0xb3, 0x76,
4031 },
4032 .y = {
4033 0xf1, 0x23, 0x63, 0x75, 0xfc, 0xb6, 0xc9, 0x32,
4034 0xa4, 0x36, 0xbe, 0x18, 0xa0, 0x7d, 0x0b, 0x16,
4035 0x65, 0x24, 0xd0, 0xe3, 0x74, 0x1b, 0x34, 0x1a,
4036 0xf9, 0xe2, 0xcb, 0x30, 0x93, 0x88, 0xd7, 0xfa,
4037 },
4038 },
4039 .confirm_rsp[0] = {
4040 .value = {
4041 0x32, 0x5b, 0xee, 0x46, 0x42, 0x63, 0xca, 0x86,
4042 0x2d, 0xe7, 0xd2, 0x75, 0x23, 0x7b, 0x4d, 0x59,
4043 },
4044 },
4045 .random_req[0] = {
4046 .value = {
4047 0xd4, 0x66, 0x94, 0xc9, 0x96, 0xd0, 0x28, 0x96,
4048 0x1c, 0xa1, 0x3b, 0xf7, 0x15, 0x95, 0x95, 0x43,
4049 },
4050 },
4051 .random_rsp[0] = {
4052 .value = {
4053 0xb7, 0x98, 0xac, 0x85, 0xc4, 0x0a, 0x69, 0x8d,
4054 0xa6, 0xaf, 0xf3, 0x1f, 0x63, 0x3c, 0xf2, 0x33,
4055 },
4056 },
4057 .dhkey_check_req = {
4058 .value = {
4059 0x1a, 0xc7, 0x0b, 0xfe, 0xc0, 0x55, 0xc3, 0xdb,
4060 0x94, 0x00, 0x89, 0x4f, 0x0e, 0x64, 0x05, 0xcd,
4061 },
4062 },
4063 .dhkey_check_rsp = {
4064 .value = {
4065 0xf2, 0x45, 0x41, 0xc0, 0xba, 0x8d, 0x58, 0xec,
4066 0x61, 0xfb, 0x48, 0x71, 0xb4, 0x0e, 0x7b, 0x19,
4067 },
4068 },
4069 .id_info_req = {
4070 .irk = {
4071 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
4072 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff,
4073 },
4074 },
4075 .id_addr_info_req = {
4076 .addr_type = 0,
4077 .bd_addr = {
4078 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07,
4079 },
4080 },
4081 .id_info_rsp = {
4082 .irk = {
4083 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
4084 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
4085 },
4086 },
4087 .id_addr_info_rsp = {
4088 .addr_type = 0,
4089 .bd_addr = {
4090 0x06, 0x05, 0x04, 0x03, 0x02, 0x01,
4091 },
4092 },
4093 .ltk = {
4094 0x8b, 0xb6, 0xf6, 0x5a, 0x52, 0x7b, 0xb8, 0xf4,
4095 0xb8, 0x4c, 0xe7, 0x60, 0x4f, 0x0b, 0x88, 0xfe,
4096 },
4097 .pair_alg = BLE_SM_PAIR_ALG_JW,
4098 .authenticated = 0,
4099 .passkey_info = {
4100 .passkey = {
4101 .action = BLE_SM_IOACT_NONE,
4102 },
4103 },
4104 };
4105 ble_sm_test_util_us_sc_good(¶ms);
4106 }
4107
4108 /**
4109 * Secure connections pairing
4110 * Master: us
4111 * Pair algorithm: numeric comparison
4112 * Initiator IO capabilities: 1
4113 * Responder IO capabilities: 1
4114 * Bonding: true
4115 * Initiator address type: BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT
4116 * Responder address type: BLE_ADDR_PUBLIC_ID
4117 * Initiator key distribution: 3
4118 * Responder key distribution: 3
4119 */
TEST_CASE(ble_sm_sc_us_nc_iio1_rio1_b1_iat2_rat2_ik3_rk3)4120 TEST_CASE(ble_sm_sc_us_nc_iio1_rio1_b1_iat2_rat2_ik3_rk3)
4121 {
4122 struct ble_sm_test_params params;
4123
4124 params = (struct ble_sm_test_params) {
4125 .init_addr_type = BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT,
4126 .init_id_addr = {
4127 0x06, 0x05, 0x04, 0x03, 0x02, 0x01,
4128 },
4129 .init_rpa = {
4130 0xc5, 0xf3, 0x5d, 0x83, 0xcd, 0x4a,
4131 },
4132 .resp_addr_type = BLE_ADDR_PUBLIC_ID,
4133 .resp_id_addr = {
4134 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07,
4135 },
4136 .resp_rpa = {
4137 0x9f, 0x56, 0x57, 0x5e, 0x12, 0x65,
4138 },
4139 .pair_req = {
4140 .io_cap = 0x01,
4141 .oob_data_flag = 0x00,
4142 .authreq = 0x0d,
4143 .max_enc_key_size = 0x10,
4144 .init_key_dist = 0x03,
4145 .resp_key_dist = 0x03,
4146 },
4147 .pair_rsp = {
4148 .io_cap = 0x01,
4149 .oob_data_flag = 0x00,
4150 .authreq = 0x0d,
4151 .max_enc_key_size = 0x10,
4152 .init_key_dist = 0x03,
4153 .resp_key_dist = 0x03,
4154 },
4155 .our_priv_key = {
4156 0xdb, 0x24, 0x2e, 0x91, 0xda, 0xaa, 0x33, 0x33,
4157 0x23, 0xa2, 0x1e, 0xbe, 0x06, 0x69, 0xdb, 0xad,
4158 0xa9, 0x2a, 0x91, 0xb1, 0x24, 0x0a, 0xc7, 0xaf,
4159 0x50, 0x0c, 0x65, 0x5b, 0x97, 0x1e, 0x12, 0x10,
4160 },
4161 .public_key_req = {
4162 .x = {
4163 0x54, 0xd9, 0x8f, 0xeb, 0xc1, 0xbb, 0xe6, 0x74,
4164 0x8a, 0x55, 0x3a, 0x80, 0x0e, 0xef, 0x90, 0xc9,
4165 0xab, 0x79, 0x12, 0x88, 0x97, 0xd9, 0x1c, 0x62,
4166 0x0d, 0x26, 0x43, 0x7d, 0x25, 0x86, 0x79, 0xc7,
4167 },
4168 .y = {
4169 0x07, 0x33, 0x91, 0x40, 0xde, 0x25, 0xb4, 0x3d,
4170 0x81, 0x2f, 0xd2, 0x41, 0x98, 0xe7, 0xaf, 0x0f,
4171 0x5f, 0x17, 0x85, 0x1f, 0x75, 0x6e, 0xf4, 0x0e,
4172 0x05, 0x19, 0x7f, 0x03, 0x9b, 0xf4, 0x41, 0x23,
4173 },
4174 },
4175 .public_key_rsp = {
4176 .x = {
4177 0x1d, 0x44, 0x66, 0x0d, 0x3a, 0x03, 0x71, 0x17,
4178 0xb3, 0x10, 0x2e, 0xf0, 0xd3, 0xf8, 0xa2, 0x6c,
4179 0x1f, 0xfc, 0xbf, 0x02, 0x62, 0x6b, 0x11, 0x5a,
4180 0x76, 0x5b, 0x30, 0x20, 0xb1, 0xef, 0xb3, 0x76,
4181 },
4182 .y = {
4183 0xf1, 0x23, 0x63, 0x75, 0xfc, 0xb6, 0xc9, 0x32,
4184 0xa4, 0x36, 0xbe, 0x18, 0xa0, 0x7d, 0x0b, 0x16,
4185 0x65, 0x24, 0xd0, 0xe3, 0x74, 0x1b, 0x34, 0x1a,
4186 0xf9, 0xe2, 0xcb, 0x30, 0x93, 0x88, 0xd7, 0xfa,
4187 },
4188 },
4189 .confirm_rsp[0] = {
4190 .value = {
4191 0x39, 0xba, 0x86, 0x47, 0x06, 0x87, 0x14, 0xe4,
4192 0x5c, 0x82, 0xe9, 0x6a, 0x80, 0xca, 0x87, 0xcd,
4193 },
4194 },
4195 .random_req[0] = {
4196 .value = {
4197 0xce, 0xe2, 0xa3, 0x29, 0x8a, 0xc6, 0x76, 0x1d,
4198 0xa2, 0xfd, 0xe0, 0x7f, 0x8c, 0xbe, 0xf8, 0x1d,
4199 },
4200 },
4201 .random_rsp[0] = {
4202 .value = {
4203 0x3d, 0xac, 0xf0, 0xfe, 0x7c, 0x78, 0x73, 0x03,
4204 0xe2, 0xb6, 0x59, 0x7e, 0x80, 0xb4, 0x69, 0x07,
4205 },
4206 },
4207 .dhkey_check_req = {
4208 .value = {
4209 0xaa, 0x95, 0x9f, 0x33, 0x32, 0xa1, 0xbd, 0xf9,
4210 0xef, 0xb9, 0x3d, 0xfb, 0x08, 0xd1, 0x28, 0xa0,
4211 },
4212 },
4213 .dhkey_check_rsp = {
4214 .value = {
4215 0x3c, 0x10, 0x17, 0x76, 0x55, 0x65, 0x6f, 0x14,
4216 0xfa, 0x80, 0xd3, 0x52, 0x04, 0x82, 0xe2, 0xf7,
4217 },
4218 },
4219 .id_info_req = {
4220 .irk = {
4221 0xd4, 0x66, 0x94, 0xc9, 0x96, 0xd0, 0x28, 0x96,
4222 0x1c, 0xa1, 0x3b, 0xf7, 0x15, 0x95, 0x95, 0x43,
4223 },
4224 },
4225 .id_addr_info_req = {
4226 .addr_type = 0,
4227 .bd_addr = {
4228 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07,
4229 },
4230 },
4231 .id_info_rsp = {
4232 .irk = {
4233 0xb7, 0x98, 0xac, 0x85, 0xc4, 0x0a, 0x69, 0x8d,
4234 0xa6, 0xaf, 0xf3, 0x1f, 0x63, 0x3c, 0xf2, 0x33,
4235 },
4236 },
4237 .id_addr_info_rsp = {
4238 .addr_type = 0,
4239 .bd_addr = {
4240 0x06, 0x05, 0x04, 0x03, 0x02, 0x01,
4241 },
4242 },
4243 .ltk = {
4244 0x95, 0x46, 0xe6, 0x8e, 0x52, 0xcc, 0x05, 0xca,
4245 0xf4, 0x59, 0x57, 0x54, 0x8c, 0x0d, 0x51, 0xfc,
4246 },
4247 .pair_alg = BLE_SM_PAIR_ALG_NUMCMP,
4248 .authenticated = 1,
4249 .passkey_info = {
4250 .passkey = {
4251 .action = BLE_SM_IOACT_NUMCMP,
4252 .numcmp_accept = 1,
4253 },
4254 .exp_numcmp = 70210,
4255 },
4256 };
4257 ble_sm_test_util_us_sc_good(¶ms);
4258 }
4259
4260 /**
4261 * Secure connections pairing
4262 * Master: us
4263 * Pair algorithm: passkey entry
4264 * Initiator IO capabilities: 2
4265 * Responder IO capabilities: 0
4266 * Bonding: true
4267 * Initiator address type: BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT
4268 * Responder address type: BLE_ADDR_PUBLIC_ID
4269 * Initiator key distribution: 7
4270 * Responder key distribution: 3
4271 */
TEST_CASE(ble_sm_sc_us_pk_iio2_rio0_b1_iat2_rat2_ik7_rk3)4272 TEST_CASE(ble_sm_sc_us_pk_iio2_rio0_b1_iat2_rat2_ik7_rk3)
4273 {
4274 struct ble_sm_test_params params;
4275
4276 params = (struct ble_sm_test_params) {
4277 .init_addr_type = BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT,
4278 .init_id_addr = {
4279 0x06, 0x05, 0x04, 0x03, 0x02, 0x01,
4280 },
4281 .init_rpa = {
4282 0x6e, 0x56, 0x09, 0xef, 0x1e, 0x76,
4283 },
4284 .resp_addr_type = BLE_ADDR_PUBLIC_ID,
4285 .resp_id_addr = {
4286 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07,
4287 },
4288 .resp_rpa = {
4289 0xb5, 0x29, 0xdf, 0xb4, 0x9b, 0x62,
4290 },
4291 .pair_req = {
4292 .io_cap = 0x02,
4293 .oob_data_flag = 0x00,
4294 .authreq = 0x0d,
4295 .max_enc_key_size = 0x10,
4296 .init_key_dist = 0x07,
4297 .resp_key_dist = 0x03,
4298 },
4299 .pair_rsp = {
4300 .io_cap = 0x00,
4301 .oob_data_flag = 0x00,
4302 .authreq = 0x0d,
4303 .max_enc_key_size = 0x10,
4304 .init_key_dist = 0x07,
4305 .resp_key_dist = 0x03,
4306 },
4307 .our_priv_key = {
4308 0xdb, 0x24, 0x2e, 0x91, 0xda, 0xaa, 0x33, 0x33,
4309 0x23, 0xa2, 0x1e, 0xbe, 0x06, 0x69, 0xdb, 0xad,
4310 0xa9, 0x2a, 0x91, 0xb1, 0x24, 0x0a, 0xc7, 0xaf,
4311 0x50, 0x0c, 0x65, 0x5b, 0x97, 0x1e, 0x12, 0x10,
4312 },
4313 .public_key_req = {
4314 .x = {
4315 0x54, 0xd9, 0x8f, 0xeb, 0xc1, 0xbb, 0xe6, 0x74,
4316 0x8a, 0x55, 0x3a, 0x80, 0x0e, 0xef, 0x90, 0xc9,
4317 0xab, 0x79, 0x12, 0x88, 0x97, 0xd9, 0x1c, 0x62,
4318 0x0d, 0x26, 0x43, 0x7d, 0x25, 0x86, 0x79, 0xc7,
4319 },
4320 .y = {
4321 0x07, 0x33, 0x91, 0x40, 0xde, 0x25, 0xb4, 0x3d,
4322 0x81, 0x2f, 0xd2, 0x41, 0x98, 0xe7, 0xaf, 0x0f,
4323 0x5f, 0x17, 0x85, 0x1f, 0x75, 0x6e, 0xf4, 0x0e,
4324 0x05, 0x19, 0x7f, 0x03, 0x9b, 0xf4, 0x41, 0x23,
4325 },
4326 },
4327 .public_key_rsp = {
4328 .x = {
4329 0x1d, 0x44, 0x66, 0x0d, 0x3a, 0x03, 0x71, 0x17,
4330 0xb3, 0x10, 0x2e, 0xf0, 0xd3, 0xf8, 0xa2, 0x6c,
4331 0x1f, 0xfc, 0xbf, 0x02, 0x62, 0x6b, 0x11, 0x5a,
4332 0x76, 0x5b, 0x30, 0x20, 0xb1, 0xef, 0xb3, 0x76,
4333 },
4334 .y = {
4335 0xf1, 0x23, 0x63, 0x75, 0xfc, 0xb6, 0xc9, 0x32,
4336 0xa4, 0x36, 0xbe, 0x18, 0xa0, 0x7d, 0x0b, 0x16,
4337 0x65, 0x24, 0xd0, 0xe3, 0x74, 0x1b, 0x34, 0x1a,
4338 0xf9, 0xe2, 0xcb, 0x30, 0x93, 0x88, 0xd7, 0xfa,
4339 },
4340 },
4341 .confirm_req[0] = {
4342 .value = {
4343 0x12, 0xe3, 0x01, 0xd0, 0x30, 0x59, 0xca, 0xd9,
4344 0x78, 0x0b, 0x45, 0x73, 0xb1, 0x7a, 0x4d, 0xca,
4345 },
4346 },
4347 .confirm_rsp[0] = {
4348 .value = {
4349 0x47, 0x68, 0x16, 0x24, 0xd4, 0x07, 0x60, 0x6c,
4350 0xa5, 0x47, 0x6f, 0x05, 0x78, 0x71, 0x3e, 0xa8,
4351 },
4352 },
4353 .random_req[0] = {
4354 .value = {
4355 0x2a, 0x29, 0xa8, 0xef, 0x0b, 0x70, 0x5f, 0x1b,
4356 0x81, 0x4d, 0x97, 0xff, 0xfb, 0x7f, 0x30, 0x90,
4357 },
4358 },
4359 .random_rsp[0] = {
4360 .value = {
4361 0x12, 0x9e, 0x1d, 0x12, 0x11, 0x44, 0x36, 0x74,
4362 0xa3, 0x0c, 0xea, 0x36, 0x4d, 0xdf, 0x2d, 0x5d,
4363 },
4364 },
4365 .confirm_req[1] = {
4366 .value = {
4367 0x4d, 0x6a, 0x32, 0xfe, 0xe2, 0xa0, 0xdd, 0x92,
4368 0x60, 0x5c, 0x82, 0x7f, 0xa6, 0xa6, 0x24, 0xd6,
4369 },
4370 },
4371 .confirm_rsp[1] = {
4372 .value = {
4373 0xd5, 0x3e, 0xa7, 0xa0, 0xbf, 0x39, 0x8e, 0xfe,
4374 0xfd, 0x73, 0x47, 0x4c, 0x92, 0x8b, 0x74, 0x06,
4375 },
4376 },
4377 .random_req[1] = {
4378 .value = {
4379 0xc1, 0x88, 0xdf, 0xb0, 0x99, 0xbb, 0xbf, 0xed,
4380 0xdc, 0x40, 0x66, 0x55, 0xbe, 0x91, 0x56, 0x9a,
4381 },
4382 },
4383 .random_rsp[1] = {
4384 .value = {
4385 0xed, 0xed, 0x9a, 0x61, 0xb8, 0x21, 0x03, 0x77,
4386 0xa6, 0xcf, 0x34, 0x65, 0x8c, 0x18, 0x82, 0x9f,
4387 },
4388 },
4389 .confirm_req[2] = {
4390 .value = {
4391 0xdb, 0xea, 0x94, 0x29, 0xe4, 0x44, 0x7d, 0x7b,
4392 0xd3, 0x16, 0x81, 0x8e, 0xaf, 0xe6, 0x9c, 0x85,
4393 },
4394 },
4395 .confirm_rsp[2] = {
4396 .value = {
4397 0x3f, 0xdd, 0x54, 0x76, 0xab, 0x45, 0x7f, 0x53,
4398 0x64, 0x6b, 0x37, 0xa6, 0xc7, 0xc6, 0x4a, 0x73,
4399 },
4400 },
4401 .random_req[2] = {
4402 .value = {
4403 0x5a, 0xf1, 0xfb, 0xde, 0xb3, 0xbe, 0x6e, 0xac,
4404 0x68, 0x51, 0x47, 0x8e, 0x0b, 0xcd, 0xc1, 0xa0,
4405 },
4406 },
4407 .random_rsp[2] = {
4408 .value = {
4409 0x29, 0x0f, 0x5e, 0x83, 0x87, 0xca, 0xd3, 0x21,
4410 0xa7, 0x7e, 0x3d, 0x78, 0x47, 0x54, 0xf8, 0xe4,
4411 },
4412 },
4413 .confirm_req[3] = {
4414 .value = {
4415 0xca, 0x3e, 0xd5, 0xe3, 0x59, 0xb0, 0x5d, 0x1e,
4416 0x0f, 0x4c, 0x95, 0x0f, 0x6a, 0x72, 0xcf, 0x25,
4417 },
4418 },
4419 .confirm_rsp[3] = {
4420 .value = {
4421 0x2f, 0x4d, 0x06, 0x40, 0x09, 0x68, 0x68, 0x45,
4422 0x87, 0x79, 0x78, 0x48, 0xda, 0xe4, 0xf5, 0xae,
4423 },
4424 },
4425 .random_req[3] = {
4426 .value = {
4427 0x63, 0x5a, 0xee, 0x91, 0xe4, 0xf8, 0xe8, 0x69,
4428 0xd1, 0x46, 0x18, 0x0d, 0xd2, 0x94, 0xd8, 0x20,
4429 },
4430 },
4431 .random_rsp[3] = {
4432 .value = {
4433 0x76, 0x36, 0xf5, 0xc2, 0x41, 0xb6, 0x3c, 0x1f,
4434 0x36, 0x19, 0x58, 0xce, 0x8f, 0x41, 0xeb, 0x8c,
4435 },
4436 },
4437 .confirm_req[4] = {
4438 .value = {
4439 0x76, 0xfd, 0x84, 0x0f, 0x0f, 0x58, 0x70, 0x45,
4440 0x41, 0x33, 0x5d, 0xce, 0xe5, 0xe2, 0x2f, 0x83,
4441 },
4442 },
4443 .confirm_rsp[4] = {
4444 .value = {
4445 0x87, 0xcf, 0xdf, 0xa5, 0x60, 0x82, 0x4f, 0x09,
4446 0x4c, 0x50, 0x24, 0xba, 0x91, 0x96, 0x0d, 0x65,
4447 },
4448 },
4449 .random_req[4] = {
4450 .value = {
4451 0x67, 0xdb, 0x73, 0x1e, 0x57, 0x5c, 0xb7, 0x86,
4452 0xf8, 0xaf, 0x58, 0xd8, 0x0f, 0x97, 0x47, 0xce,
4453 },
4454 },
4455 .random_rsp[4] = {
4456 .value = {
4457 0xaa, 0x99, 0x90, 0x05, 0x11, 0xfc, 0xc2, 0xd9,
4458 0xb8, 0xd6, 0x9d, 0xef, 0x86, 0x10, 0xcf, 0x26,
4459 },
4460 },
4461 .confirm_req[5] = {
4462 .value = {
4463 0xfc, 0x22, 0xd9, 0x1f, 0x5f, 0x86, 0x25, 0xe7,
4464 0x5e, 0x55, 0x48, 0x35, 0xec, 0x32, 0x37, 0x6d,
4465 },
4466 },
4467 .confirm_rsp[5] = {
4468 .value = {
4469 0x98, 0xbc, 0x07, 0x72, 0xa2, 0xe7, 0xa7, 0x66,
4470 0x64, 0xf7, 0x29, 0x3a, 0xaf, 0x52, 0x18, 0x04,
4471 },
4472 },
4473 .random_req[5] = {
4474 .value = {
4475 0xd3, 0x36, 0xb9, 0x69, 0x6a, 0x6d, 0x55, 0xbc,
4476 0x82, 0xdf, 0x1c, 0x04, 0xa7, 0xd5, 0x00, 0x68,
4477 },
4478 },
4479 .random_rsp[5] = {
4480 .value = {
4481 0xb9, 0x03, 0xbf, 0xd9, 0x86, 0x5a, 0x1a, 0xb4,
4482 0xdc, 0xe6, 0x8f, 0x9b, 0xa4, 0xa8, 0x2a, 0x12,
4483 },
4484 },
4485 .confirm_req[6] = {
4486 .value = {
4487 0xfe, 0x14, 0xab, 0x1c, 0xfd, 0x36, 0x64, 0x38,
4488 0xc1, 0xf8, 0xdd, 0xcd, 0xf4, 0x77, 0xa1, 0xb8,
4489 },
4490 },
4491 .confirm_rsp[6] = {
4492 .value = {
4493 0x2e, 0x70, 0x54, 0xdc, 0xa6, 0xae, 0xb2, 0xcd,
4494 0x4a, 0x26, 0x97, 0xf8, 0xbf, 0xb4, 0xb4, 0x52,
4495 },
4496 },
4497 .random_req[6] = {
4498 .value = {
4499 0x1e, 0x27, 0x73, 0x94, 0x44, 0xfc, 0xd4, 0x44,
4500 0xbf, 0x5b, 0x7d, 0x5d, 0x6d, 0x13, 0x68, 0xb1,
4501 },
4502 },
4503 .random_rsp[6] = {
4504 .value = {
4505 0xeb, 0xfd, 0x0b, 0xa1, 0x7b, 0xda, 0x61, 0xdc,
4506 0x6d, 0xe4, 0x3b, 0x51, 0xa7, 0x09, 0x29, 0x6d,
4507 },
4508 },
4509 .confirm_req[7] = {
4510 .value = {
4511 0x38, 0x2b, 0x23, 0xb9, 0x18, 0x2d, 0xb9, 0x0b,
4512 0xe7, 0x4d, 0x20, 0x83, 0xab, 0x17, 0xfd, 0x88,
4513 },
4514 },
4515 .confirm_rsp[7] = {
4516 .value = {
4517 0x65, 0x60, 0x85, 0xef, 0x0e, 0x9a, 0x23, 0x96,
4518 0xe7, 0xa9, 0xee, 0xba, 0x9e, 0x48, 0xb9, 0x1c,
4519 },
4520 },
4521 .random_req[7] = {
4522 .value = {
4523 0x8b, 0xa8, 0x7a, 0x33, 0x15, 0x1e, 0xa7, 0x78,
4524 0x27, 0x01, 0x3e, 0x90, 0x43, 0x47, 0x5a, 0x9d,
4525 },
4526 },
4527 .random_rsp[7] = {
4528 .value = {
4529 0x76, 0xf1, 0x21, 0x67, 0x94, 0x20, 0x6f, 0xc7,
4530 0x84, 0xc8, 0xdb, 0x07, 0xdb, 0x77, 0xdd, 0x50,
4531 },
4532 },
4533 .confirm_req[8] = {
4534 .value = {
4535 0x4e, 0x7f, 0x83, 0x8e, 0xa6, 0x28, 0xaa, 0x46,
4536 0xa2, 0x69, 0x95, 0x3b, 0xf0, 0x71, 0x14, 0x24,
4537 },
4538 },
4539 .confirm_rsp[8] = {
4540 .value = {
4541 0x93, 0x0b, 0x4d, 0xbe, 0x49, 0x36, 0xa0, 0x26,
4542 0xe9, 0x18, 0x4e, 0xc8, 0x19, 0x59, 0xc1, 0x7d,
4543 },
4544 },
4545 .random_req[8] = {
4546 .value = {
4547 0x11, 0xa9, 0xce, 0x26, 0x0e, 0x2f, 0x11, 0x0e,
4548 0xc1, 0xbd, 0x68, 0x80, 0xc8, 0xf8, 0x41, 0x65,
4549 },
4550 },
4551 .random_rsp[8] = {
4552 .value = {
4553 0xb6, 0x3d, 0x6b, 0x62, 0xb5, 0x37, 0x31, 0x28,
4554 0x79, 0xc4, 0xe2, 0x62, 0xbb, 0x63, 0xf9, 0x91,
4555 },
4556 },
4557 .confirm_req[9] = {
4558 .value = {
4559 0x5f, 0x55, 0xb5, 0xa4, 0x80, 0xa8, 0x54, 0x47,
4560 0xa7, 0x79, 0x87, 0x12, 0x2e, 0x44, 0x92, 0x42,
4561 },
4562 },
4563 .confirm_rsp[9] = {
4564 .value = {
4565 0x01, 0x69, 0xa2, 0xac, 0xd6, 0x62, 0x8a, 0x64,
4566 0xa2, 0x0b, 0xd0, 0xb4, 0x0e, 0x68, 0xe0, 0x88,
4567 },
4568 },
4569 .random_req[9] = {
4570 .value = {
4571 0x75, 0x1e, 0x56, 0xd0, 0xcb, 0x06, 0xfd, 0x51,
4572 0x55, 0xae, 0x77, 0xa4, 0xf2, 0xe7, 0x86, 0x3c,
4573 },
4574 },
4575 .random_rsp[9] = {
4576 .value = {
4577 0xff, 0xab, 0x8a, 0x7d, 0xb7, 0x40, 0xe5, 0x07,
4578 0xfe, 0x8f, 0x74, 0xdb, 0x2c, 0x35, 0x35, 0x12,
4579 },
4580 },
4581 .confirm_req[10] = {
4582 .value = {
4583 0x1f, 0x2a, 0xed, 0xcd, 0x6b, 0x87, 0xea, 0xa2,
4584 0xf8, 0xd8, 0xad, 0x04, 0x23, 0xc7, 0x5d, 0x47,
4585 },
4586 },
4587 .confirm_rsp[10] = {
4588 .value = {
4589 0x5b, 0x18, 0x2d, 0x96, 0x3b, 0xf6, 0xdc, 0x82,
4590 0x3b, 0xfa, 0xc9, 0x81, 0xc7, 0x33, 0xa0, 0x07,
4591 },
4592 },
4593 .random_req[10] = {
4594 .value = {
4595 0xd1, 0x3a, 0x82, 0xce, 0x31, 0x75, 0xa2, 0xbf,
4596 0x6f, 0x12, 0xf2, 0xac, 0xf6, 0xcc, 0xea, 0x34,
4597 },
4598 },
4599 .random_rsp[10] = {
4600 .value = {
4601 0xcf, 0x11, 0x3d, 0x44, 0x10, 0x0d, 0x26, 0x32,
4602 0xa5, 0x61, 0x13, 0xfd, 0xb8, 0xed, 0x31, 0x53,
4603 },
4604 },
4605 .confirm_req[11] = {
4606 .value = {
4607 0x67, 0x14, 0x8a, 0xf6, 0xc8, 0xb8, 0x73, 0x6b,
4608 0xb2, 0xec, 0xa9, 0x61, 0xaa, 0xc0, 0xc9, 0x28,
4609 },
4610 },
4611 .confirm_rsp[11] = {
4612 .value = {
4613 0xa5, 0xbf, 0x00, 0x07, 0x48, 0xff, 0x30, 0x36,
4614 0x20, 0x83, 0xd7, 0xd6, 0xd0, 0x90, 0x46, 0x03,
4615 },
4616 },
4617 .random_req[11] = {
4618 .value = {
4619 0x75, 0x99, 0x9a, 0xa3, 0xad, 0x9a, 0xe5, 0x9d,
4620 0x2f, 0x21, 0xdb, 0x72, 0x2f, 0xaf, 0xb8, 0x79,
4621 },
4622 },
4623 .random_rsp[11] = {
4624 .value = {
4625 0xa3, 0xb7, 0xb7, 0x46, 0x39, 0x99, 0xc2, 0x82,
4626 0xe9, 0x31, 0x8d, 0xc2, 0x28, 0x1b, 0x86, 0x91,
4627 },
4628 },
4629 .confirm_req[12] = {
4630 .value = {
4631 0x46, 0x2f, 0xc8, 0x0e, 0x2c, 0x70, 0x3a, 0xdb,
4632 0x25, 0x2f, 0xce, 0xe6, 0x15, 0x1f, 0x9a, 0x06,
4633 },
4634 },
4635 .confirm_rsp[12] = {
4636 .value = {
4637 0x9a, 0xa4, 0xe0, 0x03, 0x3a, 0xb5, 0x43, 0x75,
4638 0x8e, 0x93, 0x35, 0x25, 0xe6, 0x5e, 0x9d, 0x7f,
4639 },
4640 },
4641 .random_req[12] = {
4642 .value = {
4643 0x1f, 0x01, 0x32, 0x56, 0x64, 0x45, 0xc5, 0x20,
4644 0xd4, 0xad, 0x13, 0x8f, 0xbe, 0x82, 0xc8, 0x01,
4645 },
4646 },
4647 .random_rsp[12] = {
4648 .value = {
4649 0xd4, 0x3f, 0xa4, 0xc9, 0xe9, 0x2e, 0x62, 0x77,
4650 0x4e, 0x21, 0x55, 0xd8, 0xde, 0x31, 0xf5, 0xea,
4651 },
4652 },
4653 .confirm_req[13] = {
4654 .value = {
4655 0x4e, 0x48, 0x88, 0x4e, 0x4f, 0x74, 0x7e, 0xec,
4656 0x99, 0x5d, 0xb1, 0xcb, 0x84, 0x88, 0x80, 0xe9,
4657 },
4658 },
4659 .confirm_rsp[13] = {
4660 .value = {
4661 0x1a, 0x84, 0xfa, 0x2f, 0xd7, 0x3c, 0x5f, 0xee,
4662 0x3e, 0x81, 0xc0, 0x4b, 0x35, 0x4b, 0x7e, 0x98,
4663 },
4664 },
4665 .random_req[13] = {
4666 .value = {
4667 0xe3, 0x3a, 0xc5, 0x2f, 0x9f, 0x91, 0x93, 0xfb,
4668 0xcb, 0xd8, 0x53, 0x63, 0xab, 0xc4, 0xa5, 0x85,
4669 },
4670 },
4671 .random_rsp[13] = {
4672 .value = {
4673 0xa0, 0xcf, 0xad, 0x30, 0x2d, 0xec, 0xea, 0x81,
4674 0xfd, 0x7f, 0xcf, 0x7c, 0x70, 0xc9, 0x89, 0x7b,
4675 },
4676 },
4677 .confirm_req[14] = {
4678 .value = {
4679 0xe1, 0x64, 0x22, 0x19, 0x41, 0x44, 0x37, 0x2b,
4680 0x92, 0x60, 0xa4, 0x1f, 0xd6, 0x53, 0xe0, 0xa0,
4681 },
4682 },
4683 .confirm_rsp[14] = {
4684 .value = {
4685 0x08, 0xfa, 0xa4, 0xf8, 0x04, 0x08, 0xb8, 0x9f,
4686 0x61, 0xb5, 0x68, 0xaf, 0x31, 0x12, 0x8d, 0x3f,
4687 },
4688 },
4689 .random_req[14] = {
4690 .value = {
4691 0xad, 0x76, 0xc3, 0x1a, 0x4c, 0x64, 0x2c, 0x11,
4692 0x5e, 0x48, 0x6d, 0x41, 0xf5, 0x77, 0xc2, 0x40,
4693 },
4694 },
4695 .random_rsp[14] = {
4696 .value = {
4697 0x1b, 0xec, 0x78, 0x2b, 0xd9, 0xbe, 0x93, 0xbd,
4698 0x0b, 0x03, 0xf1, 0xd8, 0x31, 0xe8, 0x60, 0x67,
4699 },
4700 },
4701 .confirm_req[15] = {
4702 .value = {
4703 0x5e, 0x22, 0x44, 0x09, 0x97, 0xf9, 0xc5, 0xc7,
4704 0x23, 0xc7, 0x74, 0x51, 0xe5, 0x9d, 0x5c, 0xed,
4705 },
4706 },
4707 .confirm_rsp[15] = {
4708 .value = {
4709 0xfe, 0xb2, 0x90, 0xa7, 0x06, 0xaf, 0xdd, 0x6a,
4710 0x83, 0x26, 0x3c, 0x78, 0x66, 0xe0, 0x9d, 0xd9,
4711 },
4712 },
4713 .random_req[15] = {
4714 .value = {
4715 0xb2, 0xa0, 0x75, 0x6f, 0x77, 0xc1, 0x0b, 0x4e,
4716 0x99, 0xfa, 0x9a, 0x02, 0xf6, 0xe4, 0x66, 0x27,
4717 },
4718 },
4719 .random_rsp[15] = {
4720 .value = {
4721 0xf9, 0xdd, 0x69, 0xae, 0xc8, 0x66, 0xa9, 0xab,
4722 0xb8, 0x01, 0x38, 0xc3, 0x2a, 0x6b, 0x94, 0x66,
4723 },
4724 },
4725 .confirm_req[16] = {
4726 .value = {
4727 0x17, 0xc9, 0xf7, 0x2d, 0xe6, 0xb7, 0x99, 0x77,
4728 0x65, 0xf7, 0x62, 0xc8, 0x0d, 0x7d, 0xbd, 0x81,
4729 },
4730 },
4731 .confirm_rsp[16] = {
4732 .value = {
4733 0x39, 0xef, 0xbf, 0x39, 0xfa, 0x79, 0xc3, 0x7b,
4734 0x71, 0x40, 0x3c, 0x1f, 0x67, 0xe5, 0x60, 0xe5,
4735 },
4736 },
4737 .random_req[16] = {
4738 .value = {
4739 0x32, 0xab, 0x8b, 0xed, 0x90, 0x04, 0x5e, 0x17,
4740 0xd2, 0x5e, 0xa8, 0x91, 0xf7, 0x77, 0xe3, 0xd7,
4741 },
4742 },
4743 .random_rsp[16] = {
4744 .value = {
4745 0x6c, 0xc7, 0x14, 0x13, 0xdf, 0xfb, 0xc6, 0xed,
4746 0xa3, 0x9c, 0xa7, 0x90, 0xae, 0x4c, 0x61, 0x47,
4747 },
4748 },
4749 .confirm_req[17] = {
4750 .value = {
4751 0xc5, 0x17, 0x07, 0x35, 0x34, 0xbf, 0xc1, 0x4d,
4752 0xc4, 0x57, 0xc0, 0xd9, 0xfd, 0xe9, 0x10, 0x08,
4753 },
4754 },
4755 .confirm_rsp[17] = {
4756 .value = {
4757 0xbb, 0xcf, 0x41, 0xd2, 0x94, 0xea, 0xbe, 0x2f,
4758 0xde, 0xb2, 0xb4, 0x20, 0x72, 0x1c, 0xf8, 0x35,
4759 },
4760 },
4761 .random_req[17] = {
4762 .value = {
4763 0x59, 0x20, 0xb5, 0xdc, 0xaf, 0xc3, 0x8b, 0x32,
4764 0xe6, 0x40, 0x0f, 0x02, 0x67, 0x45, 0x49, 0x1f,
4765 },
4766 },
4767 .random_rsp[17] = {
4768 .value = {
4769 0xf5, 0x95, 0x60, 0x4c, 0x5f, 0x39, 0x54, 0xbf,
4770 0x62, 0x9e, 0x85, 0xca, 0x31, 0x9a, 0x95, 0xee,
4771 },
4772 },
4773 .confirm_req[18] = {
4774 .value = {
4775 0x36, 0x50, 0x78, 0x6b, 0x0f, 0x11, 0xe3, 0xa9,
4776 0x79, 0x3a, 0xa6, 0x9d, 0xd4, 0x8b, 0x13, 0x3f,
4777 },
4778 },
4779 .confirm_rsp[18] = {
4780 .value = {
4781 0xa5, 0x34, 0x5d, 0x5e, 0x43, 0x01, 0xf2, 0xe1,
4782 0x3f, 0xf2, 0x1c, 0x8b, 0x13, 0xf7, 0x17, 0x3e,
4783 },
4784 },
4785 .random_req[18] = {
4786 .value = {
4787 0x77, 0xa1, 0xbe, 0xbf, 0x49, 0xb8, 0x74, 0x73,
4788 0x47, 0x78, 0x2a, 0xf8, 0x66, 0x6b, 0xff, 0xd2,
4789 },
4790 },
4791 .random_rsp[18] = {
4792 .value = {
4793 0xa2, 0x05, 0x69, 0x65, 0x3f, 0xd4, 0xb4, 0xcd,
4794 0xed, 0x8c, 0x36, 0x6d, 0x51, 0x6a, 0xbb, 0xef,
4795 },
4796 },
4797 .confirm_req[19] = {
4798 .value = {
4799 0xda, 0xd8, 0x96, 0xfd, 0x1c, 0x0d, 0x1e, 0x56,
4800 0xe2, 0x62, 0xed, 0x18, 0x4b, 0xd3, 0x46, 0x48,
4801 },
4802 },
4803 .confirm_rsp[19] = {
4804 .value = {
4805 0xeb, 0x79, 0x5e, 0x52, 0x70, 0x25, 0xa7, 0x41,
4806 0x33, 0xfa, 0xac, 0xd3, 0x27, 0x35, 0xfc, 0x5f,
4807 },
4808 },
4809 .random_req[19] = {
4810 .value = {
4811 0xa8, 0x9c, 0xb9, 0xcd, 0x13, 0xb8, 0xdd, 0xd2,
4812 0x09, 0xd6, 0xc8, 0x12, 0xc3, 0x69, 0x9a, 0x64,
4813 },
4814 },
4815 .random_rsp[19] = {
4816 .value = {
4817 0x06, 0xe3, 0x8a, 0xef, 0xe4, 0x42, 0xae, 0x86,
4818 0xef, 0x58, 0x80, 0xe8, 0xe3, 0xa2, 0x09, 0x44,
4819 },
4820 },
4821 .dhkey_check_req = {
4822 .value = {
4823 0x6f, 0xa5, 0x37, 0x06, 0x4a, 0x89, 0x98, 0x39,
4824 0xf6, 0x69, 0x48, 0x56, 0x17, 0x6d, 0x44, 0x7c,
4825 },
4826 },
4827 .dhkey_check_rsp = {
4828 .value = {
4829 0x82, 0x48, 0xd4, 0x9e, 0xb8, 0x3c, 0xb4, 0xdc,
4830 0x44, 0xcb, 0x19, 0xdb, 0xcb, 0xa2, 0x00, 0x5d,
4831 },
4832 },
4833 .id_info_req = {
4834 .irk = {
4835 0x79, 0x12, 0x88, 0x97, 0xd9, 0x1c, 0x62, 0x0d,
4836 0x26, 0x43, 0x7d, 0x25, 0x86, 0x79, 0xc7, 0x07,
4837 },
4838 },
4839 .id_addr_info_req = {
4840 .addr_type = 0,
4841 .bd_addr = {
4842 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07,
4843 },
4844 },
4845 .id_info_rsp = {
4846 .irk = {
4847 0xda, 0x6b, 0x27, 0xa0, 0xac, 0x71, 0xf0, 0xc3,
4848 0x75, 0x51, 0xf6, 0x21, 0x94, 0xec, 0x81, 0x92,
4849 },
4850 },
4851 .id_addr_info_rsp = {
4852 .addr_type = 0,
4853 .bd_addr = {
4854 0x06, 0x05, 0x04, 0x03, 0x02, 0x01,
4855 },
4856 },
4857 .sign_info_rsp = {
4858 .sig_key = {
4859 0x49, 0x5b, 0x11, 0xb3, 0x4c, 0x1a, 0x23, 0x5c,
4860 0x61, 0x4f, 0xe3, 0x08, 0xf9, 0x47, 0x8b, 0xdc,
4861 },
4862 },
4863 .ltk = {
4864 0x5a, 0x49, 0x28, 0xf0, 0x11, 0x3b, 0x6f, 0x6b,
4865 0x3a, 0x69, 0x6d, 0xdd, 0xb2, 0xe5, 0xa8, 0x97,
4866 },
4867 .pair_alg = BLE_SM_PAIR_ALG_PASSKEY,
4868 .authenticated = 1,
4869 .passkey_info = {
4870 .passkey = {
4871 .action = BLE_SM_IOACT_INPUT,
4872 .passkey = 4915,
4873 },
4874 },
4875 };
4876 ble_sm_test_util_us_sc_good(¶ms);
4877 }
4878
TEST_SUITE(ble_sm_sc_test_suite)4879 TEST_SUITE(ble_sm_sc_test_suite)
4880 {
4881 tu_suite_set_post_test_cb(ble_hs_test_util_post_test, NULL);
4882
4883 /*** No privacy. */
4884
4885 /* Peer as initiator. */
4886 ble_sm_sc_peer_jw_iio3_rio3_b1_iat0_rat0_ik5_rk7();
4887 ble_sm_sc_peer_pk_iio0_rio2_b1_iat0_rat0_ik5_rk7();
4888 ble_sm_sc_peer_pk_iio2_rio0_b1_iat0_rat0_ik5_rk7();
4889 ble_sm_sc_peer_nc_iio1_rio1_b1_iat0_rat0_ik5_rk7();
4890
4891 /* Us as initiator. */
4892 ble_sm_sc_us_jw_iio3_rio4_b1_iat0_rat0_ik7_rk5();
4893 ble_sm_sc_us_pk_iio2_rio4_b1_iat0_rat0_ik7_rk5();
4894 ble_sm_sc_us_pk_iio0_rio4_b1_iat0_rat0_ik7_rk5();
4895 ble_sm_sc_us_nc_iio1_rio4_b1_iat0_rat0_ik7_rk5();
4896
4897 /*** Privacy (id = public). */
4898 // FIXME: needs to be fixed due to fix for address type used
4899 #if 0
4900 /* Peer as initiator. */
4901 ble_sm_sc_peer_jw_iio3_rio3_b1_iat2_rat2_ik7_rk7();
4902 ble_sm_sc_peer_nc_iio1_rio1_b1_iat2_rat2_ik3_rk3();
4903 ble_sm_sc_peer_pk_iio2_rio0_b1_iat2_rat2_ik7_rk3();
4904
4905 /* Us as initiator. */
4906 ble_sm_sc_us_jw_iio3_rio3_b1_iat2_rat2_ik3_rk3();
4907 ble_sm_sc_us_nc_iio1_rio1_b1_iat2_rat2_ik3_rk3();
4908 ble_sm_sc_us_pk_iio2_rio0_b1_iat2_rat2_ik7_rk3();
4909 #endif
4910 }
4911
4912 #endif /* NIMBLE_BLE_SM */
4913