Home
last modified time | relevance | path

Searched refs:ltk (Results 1 – 25 of 27) sorted by relevance

12

/system/bt/stack/crypto_toolbox/
Dcrypto_toolbox.cc77 uint8_t* a2, Octet16* mac_key, Octet16* ltk) { in f5() argument
94 *ltk = calculate_mac_key_or_ltk(t, 1, key_id, n1, n2, a1, a2, length); in f5()
97 DVLOG(2) << "ltk=" << HexEncode(ltk->data(), ltk->size()); in f5()
154 Octet16 ltk_to_link_key(const Octet16& ltk, bool use_h7) { in ltk_to_link_key() argument
159 ilk = h7(salt, ltk); in ltk_to_link_key()
163 ilk = h6(ltk, keyID_tmp1); in ltk_to_link_key()
Dcrypto_toolbox.h29 uint8_t* a1, uint8_t* a2, Octet16* mac_key, Octet16* ltk);
36 extern Octet16 ltk_to_link_key(const Octet16& ltk, bool use_h7);
/system/bt/stack/smp/
Dcrypto_toolbox.h31 Octet16* ltk);
37 extern Octet16 smp_calculate_ltk_to_link_key(const Octet16& ltk, bool use_h7);
Dsmp_keys.cc181 output = p_cb->ltk; in smp_generate_stk()
531 Octet16 ltk = aes_128(er, (uint8_t*)&p_cb->div, sizeof(uint16_t)); in smp_generate_ltk_cont() local
533 smp_mask_enc_key(p_cb->loc_enc_size, &ltk); in smp_generate_ltk_cont()
534 p_cb->ltk = ltk; in smp_generate_ltk_cont()
964 crypto_toolbox::ltk_to_link_key(p_cb->ltk, p_cb->key_derivation_h7_used); in smp_calculate_link_key_from_long_term_key()
1028 p_cb->ltk = crypto_toolbox::link_key_to_ltk(rev_link_key, in smp_calculate_long_term_key_from_link_key()
Dsmp_utils.cc538 ARRAY_TO_STREAM(p, p_cb->ltk, OCTET16_LEN); in smp_build_encrypt_info_cmd()
1477 lle_key.lenc_key.ltk = p_cb->ltk; in smp_save_secure_connections_long_term_key()
1486 ple_key.penc_key.ltk = p_cb->ltk; in smp_save_secure_connections_long_term_key()
1515 crypto_toolbox::f5(p_cb->dhkey, na, nb, a, b, &p_cb->mac_key, &p_cb->ltk); in smp_calculate_f5_mackey_and_long_term_key()
Dsmp_act.cc356 le_key.lenc_key.ltk = p_cb->ltk; in smp_send_enc_info()
945 STREAM_TO_ARRAY(p_cb->ltk.data(), p, OCTET16_LEN); in smp_proc_enc_info()
970 le_key.penc_key.ltk = p_cb->ltk; in smp_proc_master_id()
Dsmp_int.h316 Octet16 ltk; member
/system/bt/gd/security/
Dpairing_handler_le.cc112 Octet16 ltk = std::get<Octet16>(stage_2_result); in PairingMain() local
115 SendHciLeStartEncryption(i, i.connection_handle, {0}, {0}, ltk); in PairingMain()
179 if ((pairing_response.GetAuthReq() & AuthReqMaskSc) && distributed_keys.ltk.has_value()) { in PairingMain()
181 Octet16 link_key = crypto_toolbox::ltk_to_link_key(*(distributed_keys.ltk), use_h7); in PairingMain()
344 std::optional<Octet16> ltk; /* Legacy only */ in ReceiveKeys() local
358 ltk = std::get<EncryptionInformationView>(packet).GetLongTermKey(); in ReceiveKeys()
407 return DistributedKeys{.ltk = ltk, in ReceiveKeys()
415 …rLe::SendKeys(const InitialInformations& i, const uint8_t& keys_i_send, Octet16 ltk, uint16_t ediv, in SendKeys() argument
420 SendL2capPacket(i, EncryptionInformationBuilder::Create(ltk)); in SendKeys()
Dinitial_informations.h42 std::optional<crypto_toolbox::Octet16> ltk; member
Dpairing_handler_le.h137 const uint16_t& ediv, const Octet16& ltk) { in SendHciLeStartEncryption() argument
138 …rity_interface->EnqueueCommand(hci::LeStartEncryptionBuilder::Create(conn_handle, rand, ediv, ltk), in SendHciLeStartEncryption()
222 …void SendKeys(const InitialInformations& i, const uint8_t& keys_i_send, Octet16 ltk, uint16_t ediv,
Dpairing_handler_le_secure_connections.cc153 Octet16 ltk, mac_key; in DoSecureConnectionsStage2() local
154 crypto_toolbox::f5((uint8_t*)dhkey.data(), Na, Nb, a, b, &mac_key, &ltk); in DoSecureConnectionsStage2()
209 return ltk; in DoSecureConnectionsStage2()
Dpairing_handler_le_unittest.cc242 Octet16 ltk, mac_key; in TEST_F() local
243 crypto_toolbox::f5(dhkey.data(), Na, Nb, a, b, &mac_key, &ltk); in TEST_F()
/system/bt/stack/test/
Dcrypto_toolbox_test.cc209 Octet16 mac_key, ltk; in TEST() local
210 f5(dhkey_w.data(), n1, n2, a1.data(), a2.data(), &mac_key, &ltk); in TEST()
213 EXPECT_EQ(ltk, expected_ltk); in TEST()
338 extern Octet16 smp_calculate_ltk_to_link_key(const Octet16& ltk, bool use_h7);
381 Octet16 ltk = link_key_to_ltk(link_key, true); in TEST() local
382 EXPECT_EQ(expected_ltk, ltk); in TEST()
396 Octet16 ltk = link_key_to_ltk(link_key, false); in TEST() local
397 EXPECT_EQ(expected_ltk, ltk); in TEST()
/system/bt/gd/crypto_toolbox/
Dcrypto_toolbox_test.cc183 Octet16 mac_key, ltk; in TEST() local
184 f5(dhkey_w.data(), n1, n2, a1.data(), a2.data(), &mac_key, &ltk); in TEST()
187 EXPECT_EQ(ltk, expected_ltk); in TEST()
299 extern Octet16 smp_calculate_ltk_to_link_key(const Octet16& ltk, bool use_h7);
338 Octet16 ltk = link_key_to_ltk(link_key, true); in TEST() local
339 EXPECT_EQ(expected_ltk, ltk); in TEST()
351 Octet16 ltk = link_key_to_ltk(link_key, false); in TEST() local
352 EXPECT_EQ(expected_ltk, ltk); in TEST()
Dcrypto_toolbox.cc78 …, const Octet16& n1, const Octet16& n2, uint8_t* a1, uint8_t* a2, Octet16* mac_key, Octet16* ltk) { in f5() argument
93 *ltk = calculate_mac_key_or_ltk(t, 1, key_id, n1, n2, a1, a2, length); in f5()
139 Octet16 ltk_to_link_key(const Octet16& ltk, bool use_h7) { in ltk_to_link_key() argument
144 ilk = h7(salt, ltk); in ltk_to_link_key()
148 ilk = h6(ltk, keyID_tmp1); in ltk_to_link_key()
Dcrypto_toolbox.h42 …w, const Octet16& n1, const Octet16& n2, uint8_t* a1, uint8_t* a2, Octet16* mac_key, Octet16* ltk);
48 extern Octet16 ltk_to_link_key(const Octet16& ltk, bool use_h7);
/system/bt/vendor_libs/test_vendor_lib/packets/
Dlink_layer_packets.pdl231 ltk : 8[16],
237 ltk : 8[16],
/system/bt/gd/security/record/
Dsecurity_record.h131 std::optional<crypto_toolbox::Octet16> ltk; variable
/system/bt/stack/hcic/
Dhciblecmds.cc394 uint16_t ediv, const Octet16& ltk) { in btsnd_hcic_ble_start_enc() argument
407 ARRAY_TO_STREAM(pp, ltk.data(), HCIC_BLE_ENCRYT_KEY_SIZE); in btsnd_hcic_ble_start_enc()
412 void btsnd_hcic_ble_ltk_req_reply(uint16_t handle, const Octet16& ltk) { in btsnd_hcic_ble_ltk_req_reply() argument
423 ARRAY_TO_STREAM(pp, ltk.data(), HCIC_BLE_ENCRYT_KEY_SIZE); in btsnd_hcic_ble_ltk_req_reply()
/system/bt/vendor_libs/test_vendor_lib/model/controller/
Dlink_layer_controller.h169 uint16_t ediv, std::array<uint8_t, 16> ltk);
172 uint16_t ediv, std::array<uint8_t, 16> ltk);
Dlink_layer_controller.cc1946 std::array<uint8_t, 16> ltk) { in HandleLeEnableEncryption() argument
1954 connections_.GetAddress(handle).GetAddress(), rand, ediv, ltk)); in HandleLeEnableEncryption()
1960 std::array<uint8_t, 16> ltk) { in LeEnableEncryption() argument
1966 ScheduleTask(milliseconds(5), [this, handle, rand, ediv, ltk]() { in LeEnableEncryption()
1967 HandleLeEnableEncryption(handle, rand, ediv, ltk); in LeEnableEncryption()
/system/bt/stack/include/
Dhcimsgs.h792 uint16_t ediv, const Octet16& ltk);
794 extern void btsnd_hcic_ble_ltk_req_reply(uint16_t handle, const Octet16& ltk);
Dbt_types.h588 inline bool is_sample_ltk(const Octet16& ltk) { in is_sample_ltk() argument
589 return ltk == SAMPLE_LTK; in is_sample_ltk()
Dbtm_api_types.h1355 Octet16 ltk; member
1371 Octet16 ltk; member
/system/bt/stack/btm/
Dbtm_ble.cc1290 p_rec->ble.keys.pltk = p_keys->penc_key.ltk; in btm_sec_save_le_key()
1342 p_rec->ble.keys.lltk = p_keys->lenc_key.ltk; in btm_sec_save_le_key()

12