Lines Matching refs:u8

88 	u8			local_pk[64];
89 u8 local_rand[16];
101 u8 preq[7]; /* SMP Pairing Request */
102 u8 prsp[7]; /* SMP Pairing Response */
103 u8 prnd[16]; /* SMP Pairing Random (local) */
104 u8 rrnd[16]; /* SMP Pairing Random (remote) */
105 u8 pcnf[16]; /* SMP Pairing Confirm */
106 u8 tk[16]; /* SMP Temporary Key */
107 u8 rr[16]; /* Remote OOB ra/rb value */
108 u8 lr[16]; /* Local OOB ra/rb value */
109 u8 enc_key_size;
110 u8 remote_key_dist;
112 u8 id_addr_type;
113 u8 irk[16];
119 u8 *link_key;
121 u8 method;
122 u8 passkey_round;
125 u8 local_pk[64];
126 u8 remote_pk[64];
127 u8 dhkey[32];
128 u8 mackey[16];
138 static const u8 debug_pk[64] = {
150 static const u8 debug_sk[32] = {
157 static inline void swap_buf(const u8 *src, u8 *dst, size_t len) in swap_buf()
169 static int aes_cmac(struct crypto_shash *tfm, const u8 k[16], const u8 *m, in aes_cmac()
170 size_t len, u8 mac[16]) in aes_cmac()
209 static int smp_f4(struct crypto_shash *tfm_cmac, const u8 u[32], in smp_f4()
210 const u8 v[32], const u8 x[16], u8 z, u8 res[16]) in smp_f4()
212 u8 m[65]; in smp_f4()
232 static int smp_f5(struct crypto_shash *tfm_cmac, const u8 w[32], in smp_f5()
233 const u8 n1[16], const u8 n2[16], const u8 a1[7], in smp_f5()
234 const u8 a2[7], u8 mackey[16], u8 ltk[16]) in smp_f5()
242 const u8 btle[4] = { 0x65, 0x6c, 0x74, 0x62 }; in smp_f5()
243 const u8 salt[16] = { 0xbe, 0x83, 0x60, 0x5a, 0xdb, 0x0b, 0x37, 0x60, in smp_f5()
245 const u8 length[2] = { 0x00, 0x01 }; in smp_f5()
246 u8 m[53], t[16]; in smp_f5()
285 static int smp_f6(struct crypto_shash *tfm_cmac, const u8 w[16], in smp_f6()
286 const u8 n1[16], const u8 n2[16], const u8 r[16], in smp_f6()
287 const u8 io_cap[3], const u8 a1[7], const u8 a2[7], in smp_f6()
288 u8 res[16]) in smp_f6()
290 u8 m[65]; in smp_f6()
313 static int smp_g2(struct crypto_shash *tfm_cmac, const u8 u[32], const u8 v[32], in smp_g2()
314 const u8 x[16], const u8 y[16], u32 *val) in smp_g2()
316 u8 m[80], tmp[16]; in smp_g2()
339 static int smp_h6(struct crypto_shash *tfm_cmac, const u8 w[16], in smp_h6()
340 const u8 key_id[4], u8 res[16]) in smp_h6()
355 static int smp_h7(struct crypto_shash *tfm_cmac, const u8 w[16], in smp_h7()
356 const u8 salt[16], u8 res[16]) in smp_h7()
375 static int smp_e(const u8 *k, u8 *r) in smp_e()
406 static int smp_c1(const u8 k[16], in smp_c1()
407 const u8 r[16], const u8 preq[7], const u8 pres[7], u8 _iat, in smp_c1()
408 const bdaddr_t *ia, u8 _rat, const bdaddr_t *ra, u8 res[16]) in smp_c1()
410 u8 p1[16], p2[16]; in smp_c1()
455 static int smp_s1(const u8 k[16], in smp_s1()
456 const u8 r1[16], const u8 r2[16], u8 _r[16]) in smp_s1()
471 static int smp_ah(const u8 irk[16], const u8 r[3], u8 res[3]) in smp_ah()
473 u8 _res[16]; in smp_ah()
497 bool smp_irk_matches(struct hci_dev *hdev, const u8 irk[16], in smp_irk_matches()
501 u8 hash[3]; in smp_irk_matches()
516 int smp_generate_rpa(struct hci_dev *hdev, const u8 irk[16], bdaddr_t *rpa) in smp_generate_rpa()
538 int smp_generate_oob(struct hci_dev *hdev, u8 hash[16], u8 rand[16]) in smp_generate_oob()
589 static void smp_send_cmd(struct l2cap_conn *conn, u8 code, u16 len, void *data) in smp_send_cmd()
622 static u8 authreq_to_seclevel(u8 authreq) in authreq_to_seclevel()
655 u8 local_dist = 0, remote_dist = 0, oob_flag = SMP_OOB_NOT_PRESENT; in build_pairing_cmd()
674 u8 bdaddr_type; in build_pairing_cmd()
723 static u8 check_enc_key_size(struct l2cap_conn *conn, __u8 max_key_size) in check_enc_key_size()
796 static void smp_failure(struct l2cap_conn *conn, u8 reason) in smp_failure()
819 static const u8 gen_method[5][5] = {
827 static const u8 sc_method[5][5] = {
835 static u8 get_auth_method(struct smp_chan *smp, u8 local_io, u8 remote_io) in get_auth_method()
850 static int tk_request(struct l2cap_conn *conn, u8 remote_oob, u8 auth, in tk_request()
851 u8 local_io, u8 remote_io) in tk_request()
948 static u8 smp_confirm(struct smp_chan *smp) in smp_confirm()
975 static u8 smp_random(struct smp_chan *smp) in smp_random()
979 u8 confirm[16]; in smp_random()
999 u8 stk[16]; in smp_random()
1012 u8 stk[16], auth; in smp_random()
1107 u8 type; in smp_notify_keys()
1136 u8 key_type, auth; in sc_add_ltk()
1156 const u8 lebr[4] = { 0x72, 0x62, 0x65, 0x6c }; in sc_generate_link_key()
1164 const u8 salt[16] = { 0x31, 0x70, 0x6d, 0x74 }; in sc_generate_link_key()
1173 const u8 tmp1[4] = { 0x31, 0x70, 0x6d, 0x74 }; in sc_generate_link_key()
1206 const u8 brle[4] = { 0x65, 0x6c, 0x72, 0x62 }; in sc_generate_ltk()
1222 const u8 salt[16] = { 0x32, 0x70, 0x6d, 0x74 }; in sc_generate_ltk()
1228 const u8 tmp2[4] = { 0x32, 0x70, 0x6d, 0x74 }; in sc_generate_ltk()
1285 u8 authenticated; in smp_distribute_keys()
1425 static int sc_mackey_and_ltk(struct smp_chan *smp, u8 mackey[16], u8 ltk[16]) in sc_mackey_and_ltk()
1428 u8 *na, *nb, a[7], b[7]; in sc_mackey_and_ltk()
1450 u8 a[7], b[7], *local_addr, *remote_addr; in sc_dhkey_check()
1451 u8 io_cap[3], r[16]; in sc_dhkey_check()
1482 static u8 sc_passkey_send_confirm(struct smp_chan *smp) in sc_passkey_send_confirm()
1487 u8 r; in sc_passkey_send_confirm()
1503 static u8 sc_passkey_round(struct smp_chan *smp, u8 smp_op) in sc_passkey_round()
1508 u8 cfm[16], r; in sc_passkey_round()
1594 u8 smp_op; in sc_user_reply()
1687 u8 rsp = smp_confirm(smp); in smp_user_confirm_reply()
1703 u8 local_dist = 0, remote_dist = 0; in build_bredr_pairing_cmd()
1739 static u8 smp_cmd_pairing_req(struct l2cap_conn *conn, struct sk_buff *skb) in smp_cmd_pairing_req()
1745 u8 key_size, auth, sec_level; in smp_cmd_pairing_req()
1831 u8 method; in smp_cmd_pairing_req()
1875 static u8 sc_send_public_key(struct smp_chan *smp) in sc_send_public_key()
1928 static u8 smp_cmd_pairing_rsp(struct l2cap_conn *conn, struct sk_buff *skb) in smp_cmd_pairing_rsp()
1934 u8 key_size, auth; in smp_cmd_pairing_rsp()
1991 u8 method; in smp_cmd_pairing_rsp()
2028 static u8 sc_check_confirm(struct smp_chan *smp) in sc_check_confirm()
2056 u8 auth; in fixup_sc_false_positive()
2087 static u8 smp_cmd_pairing_confirm(struct l2cap_conn *conn, struct sk_buff *skb) in smp_cmd_pairing_confirm()
2133 static u8 smp_cmd_pairing_random(struct l2cap_conn *conn, struct sk_buff *skb) in smp_cmd_pairing_random()
2138 u8 *pkax, *pkbx, *na, *nb, confirm_hint; in smp_cmd_pairing_random()
2178 u8 cfm[16]; in smp_cmd_pairing_random()
2245 static bool smp_ltk_encrypt(struct l2cap_conn *conn, u8 sec_level) in smp_ltk_encrypt()
2269 bool smp_sufficient_security(struct hci_conn *hcon, u8 sec_level, in smp_sufficient_security()
2310 static u8 smp_cmd_security_req(struct l2cap_conn *conn, struct sk_buff *skb) in smp_cmd_security_req()
2316 u8 sec_level, auth; in smp_cmd_security_req()
2458 u8 addr_type) in smp_cancel_and_remove_pairing()
2541 u8 authenticated; in smp_cmd_initiator_ident()
2698 static u8 sc_select_method(struct smp_chan *smp) in sc_select_method()
2701 u8 local_mitm, remote_mitm, local_io, remote_io, method; in sc_select_method()
2887 u8 a[7], b[7], *local_addr, *remote_addr; in smp_cmd_dhkey_check()
2888 u8 io_cap[3], r[16], e[16]; in smp_cmd_dhkey_check()
3354 u8 bdaddr_type; in smp_add_cid()
3492 u8 pk[64]; in test_debug_key()
3511 const u8 irk[16] = { in test_ah()
3514 const u8 r[3] = { 0x94, 0x81, 0x70 }; in test_ah()
3515 const u8 exp[3] = { 0xaa, 0xfb, 0x0d }; in test_ah()
3516 u8 res[3]; in test_ah()
3531 const u8 k[16] = { in test_c1()
3534 const u8 r[16] = { in test_c1()
3537 const u8 preq[7] = { 0x01, 0x01, 0x00, 0x00, 0x10, 0x07, 0x07 }; in test_c1()
3538 const u8 pres[7] = { 0x02, 0x03, 0x00, 0x00, 0x08, 0x00, 0x05 }; in test_c1()
3539 const u8 _iat = 0x01; in test_c1()
3540 const u8 _rat = 0x00; in test_c1()
3543 const u8 exp[16] = { in test_c1()
3546 u8 res[16]; in test_c1()
3561 const u8 k[16] = { in test_s1()
3564 const u8 r1[16] = { in test_s1()
3566 const u8 r2[16] = { in test_s1()
3568 const u8 exp[16] = { in test_s1()
3571 u8 res[16]; in test_s1()
3586 const u8 u[32] = { in test_f4()
3591 const u8 v[32] = { in test_f4()
3596 const u8 x[16] = { in test_f4()
3599 const u8 z = 0x00; in test_f4()
3600 const u8 exp[16] = { in test_f4()
3603 u8 res[16]; in test_f4()
3618 const u8 w[32] = { in test_f5()
3623 const u8 n1[16] = { in test_f5()
3626 const u8 n2[16] = { in test_f5()
3629 const u8 a1[7] = { 0xce, 0xbf, 0x37, 0x37, 0x12, 0x56, 0x00 }; in test_f5()
3630 const u8 a2[7] = { 0xc1, 0xcf, 0x2d, 0x70, 0x13, 0xa7, 0x00 }; in test_f5()
3631 const u8 exp_ltk[16] = { in test_f5()
3634 const u8 exp_mackey[16] = { in test_f5()
3637 u8 mackey[16], ltk[16]; in test_f5()
3655 const u8 w[16] = { in test_f6()
3658 const u8 n1[16] = { in test_f6()
3661 const u8 n2[16] = { in test_f6()
3664 const u8 r[16] = { in test_f6()
3667 const u8 io_cap[3] = { 0x02, 0x01, 0x01 }; in test_f6()
3668 const u8 a1[7] = { 0xce, 0xbf, 0x37, 0x37, 0x12, 0x56, 0x00 }; in test_f6()
3669 const u8 a2[7] = { 0xc1, 0xcf, 0x2d, 0x70, 0x13, 0xa7, 0x00 }; in test_f6()
3670 const u8 exp[16] = { in test_f6()
3673 u8 res[16]; in test_f6()
3688 const u8 u[32] = { in test_g2()
3693 const u8 v[32] = { in test_g2()
3698 const u8 x[16] = { in test_g2()
3701 const u8 y[16] = { in test_g2()
3720 const u8 w[16] = { in test_h6()
3723 const u8 key_id[4] = { 0x72, 0x62, 0x65, 0x6c }; in test_h6()
3724 const u8 exp[16] = { in test_h6()
3727 u8 res[16]; in test_h6()