Lines Matching +full:16 +full:v

19 int bt_crypto_f4(const uint8_t *u, const uint8_t *v, const uint8_t *x, uint8_t z, uint8_t res[16])  in bt_crypto_f4()  argument
21 uint8_t xs[16]; in bt_crypto_f4()
26 LOG_DBG("v %s", bt_hex(v, 32)); in bt_crypto_f4()
27 LOG_DBG("x %s z 0x%x", bt_hex(x, 16), z); in bt_crypto_f4()
30 * U, V and Z are concatenated and used as input m to the function in bt_crypto_f4()
39 sys_memcpy_swap(m + 32, v, 32); in bt_crypto_f4()
42 sys_memcpy_swap(xs, x, 16); in bt_crypto_f4()
49 sys_mem_swap(res, 16); in bt_crypto_f4()
51 LOG_DBG("res %s", bt_hex(res, 16)); in bt_crypto_f4()
59 static const uint8_t salt[16] = {0x6c, 0x88, 0x83, 0x91, 0xaa, 0xf5, 0xa5, 0x38, in bt_crypto_f5()
70 uint8_t t[16], ws[32]; in bt_crypto_f5()
74 LOG_DBG("n1 %s", bt_hex(n1, 16)); in bt_crypto_f5()
75 LOG_DBG("n2 %s", bt_hex(n2, 16)); in bt_crypto_f5()
84 LOG_DBG("t %s", bt_hex(t, 16)); in bt_crypto_f5()
86 sys_memcpy_swap(m + 5, n1, 16); in bt_crypto_f5()
87 sys_memcpy_swap(m + 21, n2, 16); in bt_crypto_f5()
98 LOG_DBG("mackey %1s", bt_hex(mackey, 16)); in bt_crypto_f5()
100 sys_mem_swap(mackey, 16); in bt_crypto_f5()
110 LOG_DBG("ltk %s", bt_hex(ltk, 16)); in bt_crypto_f5()
112 sys_mem_swap(ltk, 16); in bt_crypto_f5()
121 uint8_t ws[16]; in bt_crypto_f6()
125 LOG_DBG("w %s", bt_hex(w, 16)); in bt_crypto_f6()
126 LOG_DBG("n1 %s", bt_hex(n1, 16)); in bt_crypto_f6()
127 LOG_DBG("n2 %s", bt_hex(n2, 16)); in bt_crypto_f6()
128 LOG_DBG("r %s", bt_hex(r, 16)); in bt_crypto_f6()
133 sys_memcpy_swap(m, n1, 16); in bt_crypto_f6()
134 sys_memcpy_swap(m + 16, n2, 16); in bt_crypto_f6()
135 sys_memcpy_swap(m + 32, r, 16); in bt_crypto_f6()
146 sys_memcpy_swap(ws, w, 16); in bt_crypto_f6()
153 LOG_DBG("res %s", bt_hex(check, 16)); in bt_crypto_f6()
155 sys_mem_swap(check, 16); in bt_crypto_f6()
160 int bt_crypto_g2(const uint8_t u[32], const uint8_t v[32], const uint8_t x[16], const uint8_t y[16], in bt_crypto_g2() argument
163 uint8_t m[80], xs[16]; in bt_crypto_g2()
167 LOG_DBG("v %s", bt_hex(v, 32)); in bt_crypto_g2()
168 LOG_DBG("x %s", bt_hex(x, 16)); in bt_crypto_g2()
169 LOG_DBG("y %s", bt_hex(y, 16)); in bt_crypto_g2()
172 sys_memcpy_swap(m + 32, v, 32); in bt_crypto_g2()
173 sys_memcpy_swap(m + 64, y, 16); in bt_crypto_g2()
175 sys_memcpy_swap(xs, x, 16); in bt_crypto_g2()
182 LOG_DBG("res %s", bt_hex(xs, 16)); in bt_crypto_g2()
192 int bt_crypto_h6(const uint8_t w[16], const uint8_t key_id[4], uint8_t res[16]) in bt_crypto_h6() argument
194 uint8_t ws[16]; in bt_crypto_h6()
198 LOG_DBG("w %s", bt_hex(w, 16)); in bt_crypto_h6()
201 sys_memcpy_swap(ws, w, 16); in bt_crypto_h6()
209 LOG_DBG("res %s", bt_hex(res, 16)); in bt_crypto_h6()
211 sys_mem_swap(res, 16); in bt_crypto_h6()
216 int bt_crypto_h7(const uint8_t salt[16], const uint8_t w[16], uint8_t res[16]) in bt_crypto_h7() argument
218 uint8_t ws[16]; in bt_crypto_h7()
219 uint8_t salt_s[16]; in bt_crypto_h7()
222 LOG_DBG("w %s", bt_hex(w, 16)); in bt_crypto_h7()
223 LOG_DBG("salt %s", bt_hex(salt, 16)); in bt_crypto_h7()
225 sys_memcpy_swap(ws, w, 16); in bt_crypto_h7()
226 sys_memcpy_swap(salt_s, salt, 16); in bt_crypto_h7()
228 err = bt_crypto_aes_cmac(salt_s, ws, 16, res); in bt_crypto_h7()
233 LOG_DBG("res %s", bt_hex(res, 16)); in bt_crypto_h7()
235 sys_mem_swap(res, 16); in bt_crypto_h7()
240 int bt_crypto_h8(const uint8_t k[16], const uint8_t s[16], const uint8_t key_id[4], uint8_t res[16]) in bt_crypto_h8() argument
243 uint8_t iks[16]; in bt_crypto_h8()
244 uint8_t ks[16]; in bt_crypto_h8()
245 uint8_t ss[16]; in bt_crypto_h8()
248 LOG_DBG("k %s", bt_hex(k, 16)); in bt_crypto_h8()
249 LOG_DBG("s %s", bt_hex(s, 16)); in bt_crypto_h8()
252 sys_memcpy_swap(ks, k, 16); in bt_crypto_h8()
253 sys_memcpy_swap(ss, s, 16); in bt_crypto_h8()
255 err = bt_crypto_aes_cmac(ss, ks, 16, iks); in bt_crypto_h8()
267 LOG_DBG("res %s", bt_hex(res, 16)); in bt_crypto_h8()
269 sys_mem_swap(res, 16); in bt_crypto_h8()