Lines Matching refs:ltk
774 if (bt_crypto_h7(salt, conn->le.keys->ltk.val, ilk)) { in sc_derive_link_key()
782 if (bt_crypto_h6(conn->le.keys->ltk.val, tmp1, ilk)) { in sc_derive_link_key()
993 if (bt_crypto_h6(ilk, brle, keys->ltk.val)) { in smp_br_derive_ltk()
998 (void)memset(keys->ltk.ediv, 0, sizeof(keys->ltk.ediv)); in smp_br_derive_ltk()
999 (void)memset(keys->ltk.rand, 0, sizeof(keys->ltk.rand)); in smp_br_derive_ltk()
2051 memcpy(info->ltk, rand.key, keys->enc_size); in legacy_distribute_keys()
2052 if (keys->enc_size < sizeof(info->ltk)) { in legacy_distribute_keys()
2053 (void)memset(info->ltk + keys->enc_size, 0, in legacy_distribute_keys()
2054 sizeof(info->ltk) - keys->enc_size); in legacy_distribute_keys()
2536 memcpy(keys->ltk.val, req->ltk, 16); in smp_encrypt_info()
2561 memcpy(keys->ltk.ediv, req->ediv, sizeof(keys->ltk.ediv)); in smp_central_ident()
2562 memcpy(keys->ltk.rand, req->rand, sizeof(req->rand)); in smp_central_ident()
2782 bool bt_smp_request_ltk(struct bt_conn *conn, uint64_t rand, uint16_t ediv, uint8_t *ltk) in bt_smp_request_ltk() argument
2805 memcpy(ltk, smp->tk, enc_size); in bt_smp_request_ltk()
2807 (void)memset(ltk + enc_size, 0, in bt_smp_request_ltk()
2828 memcpy(ltk, conn->le.keys->ltk.val, enc_size); in bt_smp_request_ltk()
2830 (void)memset(ltk + enc_size, 0, in bt_smp_request_ltk()
2844 memcpy(ltk, conn->le.keys->periph_ltk.val, enc_size); in bt_smp_request_ltk()
2846 (void)memset(ltk + enc_size, 0, in bt_smp_request_ltk()
4160 if (bt_conn_le_start_encryption(conn, conn->le.keys->ltk.rand, in smp_security_request()
4161 conn->le.keys->ltk.ediv, in smp_security_request()
4162 conn->le.keys->ltk.val, in smp_security_request()
5228 uint8_t mackey[16], ltk[16]; in smp_f5_test() local
5231 err = bt_crypto_f5(w, n1, n2, &a1, &a2, mackey, ltk); in smp_f5_test()
5236 if (memcmp(mackey, exp_mackey, 16) || memcmp(ltk, exp_ltk, 16)) { in smp_f5_test()
5940 conn->le.keys->ltk.rand, in bt_smp_start_security()
5941 conn->le.keys->ltk.ediv, in bt_smp_start_security()
5942 conn->le.keys->ltk.val, in bt_smp_start_security()
6030 memcpy(conn->le.keys->ltk.val, smp->tk, in bt_smp_update_keys()
6031 sizeof(conn->le.keys->ltk.val)); in bt_smp_update_keys()
6032 (void)memset(conn->le.keys->ltk.rand, 0, in bt_smp_update_keys()
6033 sizeof(conn->le.keys->ltk.rand)); in bt_smp_update_keys()
6034 (void)memset(conn->le.keys->ltk.ediv, 0, in bt_smp_update_keys()
6035 sizeof(conn->le.keys->ltk.ediv)); in bt_smp_update_keys()
6037 uint8_t ltk[16]; in bt_smp_update_keys() local
6039 sys_memcpy_swap(ltk, smp->tk, conn->le.keys->enc_size); in bt_smp_update_keys()
6040 LOG_INF("SC LTK: 0x%s (No bonding)", bt_hex(ltk, conn->le.keys->enc_size)); in bt_smp_update_keys()