Lines Matching defs:ltk
117 struct smp_ltk *ltk;
235 const u8 a2[7], u8 mackey[16], u8 ltk[16])
277 err = aes_cmac(tfm_cmac, t, m, sizeof(m), ltk);
281 SMP_DBG("ltk %16phN", ltk);
767 if (smp->ltk && smp->ltk->type == SMP_LTK_P256_DEBUG &&
769 list_del_rcu(&smp->ltk->list);
770 kfree_rcu(smp->ltk, rcu);
771 smp->ltk = NULL;
776 if (smp->ltk) {
777 list_del_rcu(&smp->ltk->list);
778 kfree_rcu(smp->ltk, rcu);
1096 if (smp->ltk) {
1097 smp->ltk->link_type = hcon->type;
1098 smp->ltk->bdaddr_type = hcon->dst_type;
1099 bacpy(&smp->ltk->bdaddr, &hcon->dst);
1100 mgmt_new_ltk(hdev, smp->ltk, persistent);
1155 smp->ltk = hci_add_ltk(hcon->hdev, &hcon->dst, hcon->dst_type,
1290 struct smp_ltk *ltk;
1299 get_random_bytes(enc.ltk, smp->enc_key_size);
1300 memset(enc.ltk + smp->enc_key_size, 0,
1301 sizeof(enc.ltk) - smp->enc_key_size);
1309 ltk = hci_add_ltk(hdev, &hcon->dst, hcon->dst_type,
1310 SMP_LTK_RESPONDER, authenticated, enc.ltk,
1312 smp->responder_ltk = ltk;
1431 static int sc_mackey_and_ltk(struct smp_chan *smp, u8 mackey[16], u8 ltk[16])
1449 return smp_f5(smp->tfm_cmac, smp->dhkey, na, nb, a, b, mackey, ltk);
2485 smp->ltk = NULL;
2515 rp->ltk)) {
2526 memcpy(smp->tk, rp->ltk, sizeof(smp->tk));
2538 struct smp_ltk *ltk;
2557 ltk = hci_add_ltk(hdev, &hcon->dst, hcon->dst_type, SMP_LTK,
2560 smp->ltk = ltk;
3628 u8 mackey[16], ltk[16];
3631 err = smp_f5(tfm_cmac, w, n1, n2, a1, a2, mackey, ltk);
3638 if (crypto_memneq(ltk, exp_ltk, 16))