Lines Matching refs:ltk

116 	struct smp_ltk	*ltk;  member
234 const u8 a2[7], u8 mackey[16], u8 ltk[16]) in smp_f5()
276 err = aes_cmac(tfm_cmac, t, m, sizeof(m), ltk); in smp_f5()
280 SMP_DBG("ltk %16phN", ltk); in smp_f5()
766 if (smp->ltk && smp->ltk->type == SMP_LTK_P256_DEBUG && in smp_chan_destroy()
768 list_del_rcu(&smp->ltk->list); in smp_chan_destroy()
769 kfree_rcu(smp->ltk, rcu); in smp_chan_destroy()
770 smp->ltk = NULL; in smp_chan_destroy()
775 if (smp->ltk) { in smp_chan_destroy()
776 list_del_rcu(&smp->ltk->list); in smp_chan_destroy()
777 kfree_rcu(smp->ltk, rcu); in smp_chan_destroy()
1093 if (smp->ltk) { in smp_notify_keys()
1094 smp->ltk->bdaddr_type = hcon->dst_type; in smp_notify_keys()
1095 bacpy(&smp->ltk->bdaddr, &hcon->dst); in smp_notify_keys()
1096 mgmt_new_ltk(hdev, smp->ltk, persistent); in smp_notify_keys()
1148 smp->ltk = hci_add_ltk(hcon->hdev, &hcon->dst, hcon->dst_type, in sc_add_ltk()
1284 struct smp_ltk *ltk; in smp_distribute_keys() local
1293 get_random_bytes(enc.ltk, smp->enc_key_size); in smp_distribute_keys()
1294 memset(enc.ltk + smp->enc_key_size, 0, in smp_distribute_keys()
1295 sizeof(enc.ltk) - smp->enc_key_size); in smp_distribute_keys()
1303 ltk = hci_add_ltk(hdev, &hcon->dst, hcon->dst_type, in smp_distribute_keys()
1304 SMP_LTK_RESPONDER, authenticated, enc.ltk, in smp_distribute_keys()
1306 smp->responder_ltk = ltk; 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()
1443 return smp_f5(smp->tfm_cmac, smp->dhkey, na, nb, a, b, mackey, ltk); in sc_mackey_and_ltk()
2487 smp->ltk = NULL; in smp_cancel_and_remove_pairing()
2517 rp->ltk)) { in smp_cmd_encrypt_info()
2528 memcpy(smp->tk, rp->ltk, sizeof(smp->tk)); in smp_cmd_encrypt_info()
2540 struct smp_ltk *ltk; in smp_cmd_initiator_ident() local
2559 ltk = hci_add_ltk(hdev, &hcon->dst, hcon->dst_type, SMP_LTK, in smp_cmd_initiator_ident()
2562 smp->ltk = ltk; in smp_cmd_initiator_ident()
3637 u8 mackey[16], ltk[16]; in test_f5() local
3640 err = smp_f5(tfm_cmac, w, n1, n2, a1, a2, mackey, ltk); in test_f5()
3647 if (crypto_memneq(ltk, exp_ltk, 16)) in test_f5()