Home
last modified time | relevance | path

Searched refs:OCTET16_LEN (Results 1 – 21 of 21) sorted by relevance

/system/bt/gd/crypto_toolbox/
Daes_cmac.cc52 for (i = 0; i < OCTET16_LEN; i++) { in xor_128()
81 for (i = length; i < OCTET16_LEN; i++) p[OCTET16_LEN - i - 1] = (i == length) ? 0x80 : 0; in padding()
88 for (i = 0; i < OCTET16_LEN; i++) { in leftshift_onebit()
104 xor_128((Octet16*)&cmac_cb.text[(cmac_cb.round - i) * OCTET16_LEN], x); in cmac_aes_k_calculate()
106 output = aes_128(key, &cmac_cb.text[(cmac_cb.round - i) * OCTET16_LEN], OCTET16_LEN); in cmac_aes_k_calculate()
122 flag = ((cmac_cb.len % OCTET16_LEN) == 0 && cmac_cb.len != 0) ? true : false; in cmac_prepare_last_block()
139 Octet16 p = aes_128(key, zero.data(), OCTET16_LEN); in cmac_generate_subkey()
145 if ((pp[OCTET16_LEN - 1] & 0x80) != 0) { in cmac_generate_subkey()
153 if ((k1[OCTET16_LEN - 1] & 0x80) != 0) { in cmac_generate_subkey()
172 uint16_t n = (length + OCTET16_LEN - 1) / OCTET16_LEN; in aes_cmac()
[all …]
Dcrypto_toolbox.cc62 constexpr size_t msg_len = 1 /* Counter size */ + 4 /* keyID size */ + OCTET16_LEN /* N1 size */ + in calculate_mac_key_or_ltk()
63OCTET16_LEN /* N2 size */ + 7 /* A1 size*/ + 7 /* A2 size*/ + 2 /* Length size */; in calculate_mac_key_or_ltk()
101 …const uint8_t msg_len = OCTET16_LEN /* N1 size */ + OCTET16_LEN /* N2 size */ + OCTET16_LEN /* R s… in f6()
122 + OCTET16_LEN /* Y size */; in g2()
189 for (uint8_t i = 0; i < OCTET16_LEN; i++) { in c1()
202 for (uint8_t i = 0; i < OCTET16_LEN; i++) { in c1()
Dcrypto_toolbox.h24 constexpr int OCTET16_LEN = 16; variable
25 using Octet16 = std::array<uint8_t, OCTET16_LEN>;
66 uint8_t* p_mac = signature.data() + (OCTET16_LEN - tlen); in aes_cmac()
Dcrypto_toolbox_test.cc44 EXPECT_TRUE(memcmp(output, aes_cmac_k_m, OCTET16_LEN) == 0); in TEST()
/system/bt/stack/crypto_toolbox/
Daes_cmac.cc55 for (i = 0; i < OCTET16_LEN; i++) { in xor_128()
84 for (i = length; i < OCTET16_LEN; i++) in padding()
85 p[OCTET16_LEN - i - 1] = (i == length) ? 0x80 : 0; in padding()
93 for (i = 0; i < OCTET16_LEN; i++) { in leftshift_onebit()
111 xor_128((Octet16*)&cmac_cb.text[(cmac_cb.round - i) * OCTET16_LEN], x); in cmac_aes_k_calculate()
113 output = aes_128(key, &cmac_cb.text[(cmac_cb.round - i) * OCTET16_LEN], in cmac_aes_k_calculate()
114 OCTET16_LEN); in cmac_aes_k_calculate()
131 flag = ((cmac_cb.len % OCTET16_LEN) == 0 && cmac_cb.len != 0) ? true : false; in cmac_prepare_last_block()
152 Octet16 p = aes_128(key, zero.data(), OCTET16_LEN); in cmac_generate_subkey()
158 if ((pp[OCTET16_LEN - 1] & 0x80) != 0) { in cmac_generate_subkey()
[all …]
Dcrypto_toolbox.cc60 OCTET16_LEN /* N1 size */ + in calculate_mac_key_or_ltk()
61 OCTET16_LEN /* N2 size */ + 7 /* A1 size*/ + in calculate_mac_key_or_ltk()
102 const uint8_t msg_len = OCTET16_LEN /* N1 size */ + in f6()
103 OCTET16_LEN /* N2 size */ + OCTET16_LEN /* R size */ + in f6()
130 + OCTET16_LEN /* Y size */; in g2()
Dcrypto_toolbox.h44 CHECK(length <= OCTET16_LEN) << "you tried aes_128 more than 16 bytes!"; in aes_128()
56 uint8_t* p_mac = signature.data() + (OCTET16_LEN - tlen); in aes_cmac()
/system/bt/stack/test/
Dstack_smp_test.cc96 for (unsigned int i = 0; i < OCTET16_LEN; ++i) { in dump_uint128()
104 for (int i = (int)(OCTET16_LEN - 1); i >= 0; --i) { in dump_uint128_reverse()
112 for (unsigned int i = 0; i < OCTET16_LEN; ++i) { in print_uint128()
120 for (unsigned int count = 0; count < OCTET16_LEN; count++) { in parse_uint128()
169 char p2_str[2 * OCTET16_LEN + 1]; in TEST_F()
184 char p1_str[2 * OCTET16_LEN + 1]; in TEST_F()
190 char p1_xor_r_str[2 * OCTET16_LEN + 1]; in TEST_F()
193 Octet16 output = crypto_toolbox::aes_128(p_cb_.tk, p1.data(), OCTET16_LEN); in TEST_F()
195 char p1_prime_str[2 * OCTET16_LEN + 1]; in TEST_F()
207 char confirm_str[2 * OCTET16_LEN + 1]; in TEST_F()
Dcrypto_toolbox_test.cc49 EXPECT_THAT(output, ElementsAreArray(aes_cmac_k_m, OCTET16_LEN)); in TEST()
/system/bt/stack/smp/
Dsmp_utils.cc41 #define SMP_CONFIRM_CMD_SIZE (OCTET16_LEN + 1)
42 #define SMP_RAND_CMD_SIZE (OCTET16_LEN + 1)
43 #define SMP_INIT_CMD_SIZE (OCTET16_LEN + 1)
44 #define SMP_ENC_INFO_SIZE (OCTET16_LEN + 1)
46 #define SMP_ID_INFO_SIZE (OCTET16_LEN + 1)
48 #define SMP_SIGN_INFO_SIZE (OCTET16_LEN + 1)
52 #define SMP_PAIR_COMMITM_SIZE (1 /* opcode */ + OCTET16_LEN /*Commitment*/)
54 (1 /* opcode */ + OCTET16_LEN /*DHKey \
489 ARRAY_TO_STREAM(p, p_cb->confirm, OCTET16_LEN); in smp_build_confirm_cmd()
513 ARRAY_TO_STREAM(p, p_cb->rand, OCTET16_LEN); in smp_build_rand_cmd()
[all …]
Dsmp_act.cc620 STREAM_TO_ARRAY(p_cb->rconfirm.data(), p, OCTET16_LEN); in smp_proc_confirm()
641 STREAM_TO_ARRAY(p_cb->rrand.data(), p, OCTET16_LEN); in smp_proc_init()
661 STREAM_TO_ARRAY(p_cb->rrand.data(), p, OCTET16_LEN); in smp_proc_rand()
723 STREAM_TO_ARRAY(p_cb->remote_commitment.data(), p, OCTET16_LEN); in smp_process_pairing_commitment()
744 STREAM_TO_ARRAY(p_cb->remote_dhkey_check.data(), p, OCTET16_LEN); in smp_process_dhkey_check()
945 STREAM_TO_ARRAY(p_cb->ltk.data(), p, OCTET16_LEN); in smp_proc_enc_info()
995 STREAM_TO_ARRAY(p_cb->tk.data(), p, OCTET16_LEN); /* reuse TK for IRK */ in smp_proc_id_info()
1053 OCTET16_LEN); in smp_proc_srk_info()
1070 if (!memcmp(p_cb->rconfirm.data(), p_data->key.p_data, OCTET16_LEN)) { in smp_proc_compare()
1707 OCTET16_LEN)) { in smp_match_dhkey_checks()
[all …]
Dsmp_api.cc440 if (len > OCTET16_LEN) len = OCTET16_LEN; in SMP_OobDataReply()
Dsmp_keys.cc315 memset(p, 0, OCTET16_LEN); in smp_gen_p2_4_confirm()
917 OCTET16_LEN); in smp_calculate_peer_dhkey_check()
/system/bt/gd/hci/facade/
Dle_initiator_address_facade.cc61 if (request_irk_length == crypto_toolbox::OCTET16_LEN) { in SetPrivacyPolicyForInitiatorAddress()
63 std::copy_n(irk_data.begin(), crypto_toolbox::OCTET16_LEN, irk.begin()); in SetPrivacyPolicyForInitiatorAddress()
/system/bt/stack/include/
Dsmp_api_types.h260 uint8_t param_buf[OCTET16_LEN];
Dbt_types.h578 constexpr int OCTET16_LEN = 16; variable
579 typedef std::array<uint8_t, OCTET16_LEN> Octet16;
581 constexpr int LINK_KEY_LEN = OCTET16_LEN;
Dbtm_ble_api_types.h262 uint8_t param_buf[OCTET16_LEN];
/system/bt/gd/security/
Dfacade.cc190 if (request_irk_length == crypto_toolbox::OCTET16_LEN) { in SetLeInitiatorAddressPolicy()
192 std::copy_n(irk_data.begin(), crypto_toolbox::OCTET16_LEN, irk.begin()); in SetLeInitiatorAddressPolicy()
/system/bt/btif/src/
Dbtif_dm.cc2784 memcpy(oob_cb.oob_data.c192, c.data(), OCTET16_LEN); in btif_dm_proc_loc_oob()
2785 memcpy(oob_cb.oob_data.r192, r.data(), OCTET16_LEN); in btif_dm_proc_loc_oob()
2800 fwrite(c.data(), 1, OCTET16_LEN, fp); in btif_dm_proc_loc_oob()
2801 fwrite(r.data(), 1, OCTET16_LEN, fp); in btif_dm_proc_loc_oob()
2895 fread(p_c->data(), 1, OCTET16_LEN, fp); in btif_dm_proc_rmt_oob()
2896 fread(p_r->data(), 1, OCTET16_LEN, fp); in btif_dm_proc_rmt_oob()
/system/bt/stack/btm/
Dbtm_ble.cc490 memcpy(&oob.peer_oob_data.randomizer, p_r, OCTET16_LEN); in BTM_BleSecureConnectionOobDataReply()
491 memcpy(&oob.peer_oob_data.commitment, p_c, OCTET16_LEN); in BTM_BleSecureConnectionOobDataReply()
1176 params.param_len = OCTET16_LEN; in btm_ble_rand_enc_complete()
Dbtm_ble_privacy.cc751 ARRAY_TO_STREAM(p, p_dev_rec->ble.keys.irk, OCTET16_LEN); in btm_ble_resolving_list_load_dev()