Lines Matching defs:ltk
116 struct smp_ltk *ltk;
234 const u8 a2[7], u8 mackey[16], u8 ltk[16])
276 err = aes_cmac(tfm_cmac, t, m, sizeof(m), ltk);
280 SMP_DBG("ltk %16phN", ltk);
766 if (smp->ltk && smp->ltk->type == SMP_LTK_P256_DEBUG &&
768 list_del_rcu(&smp->ltk->list);
769 kfree_rcu(smp->ltk, rcu);
770 smp->ltk = NULL;
775 if (smp->ltk) {
776 list_del_rcu(&smp->ltk->list);
777 kfree_rcu(smp->ltk, rcu);
1090 if (smp->ltk) {
1091 smp->ltk->link_type = hcon->type;
1092 smp->ltk->bdaddr_type = hcon->dst_type;
1093 bacpy(&smp->ltk->bdaddr, &hcon->dst);
1094 mgmt_new_ltk(hdev, smp->ltk, persistent);
1149 smp->ltk = hci_add_ltk(hcon->hdev, &hcon->dst, hcon->dst_type,
1284 struct smp_ltk *ltk;
1293 get_random_bytes(enc.ltk, smp->enc_key_size);
1294 memset(enc.ltk + smp->enc_key_size, 0,
1295 sizeof(enc.ltk) - smp->enc_key_size);
1303 ltk = hci_add_ltk(hdev, &hcon->dst, hcon->dst_type,
1304 SMP_LTK_RESPONDER, authenticated, enc.ltk,
1306 smp->responder_ltk = ltk;
1425 static int sc_mackey_and_ltk(struct smp_chan *smp, u8 mackey[16], u8 ltk[16])
1443 return smp_f5(smp->tfm_cmac, smp->dhkey, na, nb, a, b, mackey, ltk);
2479 smp->ltk = NULL;
2509 rp->ltk)) {
2520 memcpy(smp->tk, rp->ltk, sizeof(smp->tk));
2532 struct smp_ltk *ltk;
2551 ltk = hci_add_ltk(hdev, &hcon->dst, hcon->dst_type, SMP_LTK,
2554 smp->ltk = ltk;
3662 u8 mackey[16], ltk[16];
3665 err = smp_f5(tfm_cmac, w, n1, n2, a1, a2, mackey, ltk);
3672 if (crypto_memneq(ltk, exp_ltk, 16))