Home
last modified time | relevance | path

Searched refs:Octet16 (Results 1 – 25 of 67) sorted by relevance

123

/system/bt/gd/crypto_toolbox/
Dcrypto_toolbox.h25 using Octet16 = std::array<uint8_t, OCTET16_LEN>; variable
27 Octet16 c1(
28 const Octet16& k,
29 const Octet16& r,
36 Octet16 s1(const Octet16& k, const Octet16& r1, const Octet16& r2);
38 extern Octet16 aes_128(const Octet16& key, const Octet16& message);
39 extern Octet16 aes_cmac(const Octet16& key, const uint8_t* message, uint16_t length);
40 extern Octet16 f4(uint8_t* u, uint8_t* v, const Octet16& x, uint8_t z);
42 …uint8_t* w, const Octet16& n1, const Octet16& n2, uint8_t* a1, uint8_t* a2, Octet16* mac_key, Octe…
43 extern Octet16 f6(
[all …]
Daes_cmac.cc42 Octet16 const_Rb{0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00…
47 static void xor_128(Octet16* a, const Octet16& b) { in xor_128()
59 Octet16 aes_128(const Octet16& key, const Octet16& message) { in aes_128()
60 Octet16 key_reversed; in aes_128()
61 Octet16 message_reversed; in aes_128()
62 Octet16 output; in aes_128()
78 static void padding(Octet16* dest, uint8_t length) { in padding()
97 static Octet16 cmac_aes_k_calculate(const Octet16& key) { in cmac_aes_k_calculate()
98 Octet16 output; in cmac_aes_k_calculate()
99 Octet16 x{0}; // zero initialized in cmac_aes_k_calculate()
[all …]
Dcrypto_toolbox.cc30 Octet16 h6(const Octet16& w, std::array<uint8_t, 4> keyid) { in h6()
34 Octet16 h7(const Octet16& salt, const Octet16& w) { in h7()
38 Octet16 f4(uint8_t* u, uint8_t* v, const Octet16& x, uint8_t z) { in f4()
53 static Octet16 calculate_mac_key_or_ltk( in calculate_mac_key_or_ltk()
54 const Octet16& t, in calculate_mac_key_or_ltk()
57 const Octet16& n1, in calculate_mac_key_or_ltk()
58 const Octet16& n2, in calculate_mac_key_or_ltk()
78 void f5(uint8_t* w, const Octet16& n1, const Octet16& n2, uint8_t* a1, uint8_t* a2, Octet16* mac_ke… in f5()
83 …const Octet16 salt{0xBE, 0x83, 0x60, 0x5A, 0xDB, 0x0B, 0x37, 0x60, 0x38, 0xA5, 0xF5, 0xAA, 0x91, 0… in f5()
84 Octet16 t = aes_cmac(salt, w, OCTET32_LEN); in f5()
[all …]
Dcrypto_toolbox_test.cc54Octet16 k{0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f… in TEST()
56Octet16 aes_cmac_k_m{0xbb, 0x1d, 0x69, 0x29, 0xe9, 0x59, 0x37, 0x28, 0x7f, 0xa3, 0x7d, 0x12, 0x9b,… in TEST()
62 Octet16 output = aes_cmac(k, nullptr /* empty message */, 0); in TEST()
74Octet16 k{0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f… in TEST()
76Octet16 m = {0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0… in TEST()
78Octet16 aes_cmac_k_m{0x07, 0x0a, 0x16, 0xb4, 0x6b, 0x4d, 0x41, 0x44, 0xf7, 0x9b, 0xdd, 0x9d, 0xd0,… in TEST()
85 Octet16 output = aes_cmac(k, m); in TEST()
98Octet16 k{0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f… in TEST()
104Octet16 aes_cmac_k_m{0xdf, 0xa6, 0x67, 0x47, 0xde, 0x9a, 0xe6, 0x30, 0x30, 0xca, 0x32, 0x61, 0x14,… in TEST()
111 Octet16 output = aes_cmac(k, m, sizeof(m)); in TEST()
[all …]
/system/bt/stack/crypto_toolbox/
Dcrypto_toolbox.h23 extern Octet16 aes_128(const Octet16& key, const Octet16& message);
24 extern Octet16 aes_cmac(const Octet16& key, const uint8_t* message,
26 extern Octet16 f4(const uint8_t* u, const uint8_t* v, const Octet16& x,
28 extern void f5(const uint8_t* w, const Octet16& n1, const Octet16& n2,
29 uint8_t* a1, uint8_t* a2, Octet16* mac_key, Octet16* ltk);
30 extern Octet16 f6(const Octet16& w, const Octet16& n1, const Octet16& n2,
31 const Octet16& r, uint8_t* iocap, uint8_t* a1, uint8_t* a2);
32 extern Octet16 h6(const Octet16& w, std::array<uint8_t, 4> keyid);
33 extern Octet16 h7(const Octet16& salt, const Octet16& w);
34 extern uint32_t g2(const uint8_t* u, const uint8_t* v, const Octet16& x,
[all …]
Daes_cmac.cc44 Octet16 const_Rb{0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
50 static void xor_128(Octet16* a, const Octet16& b) { in xor_128()
62 Octet16 aes_128(const Octet16& key, const Octet16& message) { in aes_128()
63 Octet16 key_reversed; in aes_128()
64 Octet16 message_reversed; in aes_128()
65 Octet16 output; in aes_128()
81 static void padding(Octet16* dest, uint8_t length) { in padding()
102 static Octet16 cmac_aes_k_calculate(const Octet16& key) { in cmac_aes_k_calculate()
103 Octet16 output; in cmac_aes_k_calculate()
104 Octet16 x{0}; // zero initialized in cmac_aes_k_calculate()
[all …]
Dcrypto_toolbox.cc29 Octet16 h6(const Octet16& w, std::array<uint8_t, 4> keyid) { in h6()
33 Octet16 h7(const Octet16& salt, const Octet16& w) { in h7()
37 Octet16 f4(const uint8_t* u, const uint8_t* v, const Octet16& x, uint8_t z) { in f4()
55 static Octet16 calculate_mac_key_or_ltk(const Octet16& t, uint8_t counter, in calculate_mac_key_or_ltk()
56 uint8_t* key_id, const Octet16& n1, in calculate_mac_key_or_ltk()
57 const Octet16& n2, uint8_t* a1, in calculate_mac_key_or_ltk()
76 void f5(const uint8_t* w, const Octet16& n1, const Octet16& n2, uint8_t* a1, in f5()
77 uint8_t* a2, Octet16* mac_key, Octet16* ltk) { in f5()
83 const Octet16 salt{0xBE, 0x83, 0x60, 0x5A, 0xDB, 0x0B, 0x37, 0x60, in f5()
85 Octet16 t = aes_cmac(salt, w, BT_OCTET32_LEN); in f5()
[all …]
/system/bt/stack/smp/
Dcrypto_toolbox.h25 extern Octet16 smp_calculate_f4(uint8_t* u, uint8_t* v, const Octet16& x,
27 extern uint32_t smp_calculate_g2(uint8_t* u, uint8_t* v, const Octet16& x,
28 const Octet16& y);
29 extern void smp_calculate_f5(uint8_t* w, const Octet16& n1, const Octet16& n2,
30 uint8_t* a1, uint8_t* a2, Octet16* mac_key,
31 Octet16* ltk);
32 extern Octet16 smp_calculate_f6(const Octet16& w, const Octet16& n1,
33 const Octet16& n2, const Octet16& r,
35 extern Octet16 smp_calculate_h6(const Octet16& w, std::array<uint8_t, 4> keyid);
36 extern Octet16 smp_calculate_h7(const Octet16& salt, const Octet16& w);
[all …]
Dsmp_int.h273 Octet16 confirm;
274 Octet16 rconfirm;
275 Octet16 rrand; /* for SC this is peer nonce */
276 Octet16 rand; /* for SC this is local nonce */
279 Octet16 commitment;
280 Octet16 remote_commitment;
281 Octet16 local_random; /* local randomizer - passkey or OOB randomizer */
282 Octet16 peer_random; /* peer randomizer - passkey or OOB randomizer */
283 Octet16 dhkey_check;
284 Octet16 remote_dhkey_check;
[all …]
Dsmp_keys.cc51 static void smp_process_stk(tSMP_CB* p_cb, Octet16* p);
52 static Octet16 smp_calculate_legacy_short_term_key(tSMP_CB* p_cb);
80 inline void smp_debug_print_nbyte_little_endian(const Octet16& p, in smp_debug_print_nbyte_little_endian()
175 Octet16 output; in smp_generate_stk()
200 const Octet16& er = BTM_GetDeviceEncRoot(); in smp_compute_csrk()
275 Octet16 smp_gen_p1_4_confirm(tSMP_CB* p_cb, in smp_gen_p1_4_confirm()
278 Octet16 p1; in smp_gen_p1_4_confirm()
310 Octet16 smp_gen_p2_4_confirm(tSMP_CB* p_cb, const RawAddress& remote_bda) { in smp_gen_p2_4_confirm()
312 Octet16 p2{0}; in smp_gen_p2_4_confirm()
340 tSMP_STATUS smp_calculate_comfirm(tSMP_CB* p_cb, const Octet16& rand, in smp_calculate_comfirm()
[all …]
/system/bt/stack/test/
Dcrypto_toolbox_test.cc59 Octet16 k{0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, in TEST()
62 Octet16 aes_cmac_k_m{0xbb, 0x1d, 0x69, 0x29, 0xe9, 0x59, 0x37, 0x28, in TEST()
69 Octet16 output = aes_cmac(k, nullptr /* empty message */, 0); in TEST()
81 Octet16 k{0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, in TEST()
84 Octet16 m = {0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, in TEST()
87 Octet16 aes_cmac_k_m{0x07, 0x0a, 0x16, 0xb4, 0x6b, 0x4d, 0x41, 0x44, in TEST()
95 Octet16 output = aes_cmac(k, m); in TEST()
108 Octet16 k{0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, in TEST()
116 Octet16 aes_cmac_k_m{0xdf, 0xa6, 0x67, 0x47, 0xde, 0x9a, 0xe6, 0x30, in TEST()
124 Octet16 output = aes_cmac(k, m, sizeof(m)); in TEST()
[all …]
Dstack_smp_test.cc84 extern Octet16 smp_gen_p1_4_confirm(tSMP_CB* p_cb,
87 extern Octet16 smp_gen_p2_4_confirm(tSMP_CB* p_cb,
90 extern tSMP_STATUS smp_calculate_comfirm(tSMP_CB* p_cb, const Octet16& rand,
91 Octet16* output);
95 void dump_uint128(const Octet16& a, char* buffer) { in dump_uint128()
103 void dump_uint128_reverse(const Octet16& a, char* buffer) { in dump_uint128_reverse()
111 void print_uint128(const Octet16& a) { in print_uint128()
118 Octet16 parse_uint128(const char* input) { in parse_uint128()
119 Octet16 output{0}; in parse_uint128()
131 Octet16 rand_{0x57, 0x83, 0xD5, 0x21, 0x56, 0xAD, 0x6F, 0x0E,
[all …]
/system/bt/gd/security/
Dinitial_informations.h42 std::optional<crypto_toolbox::Octet16> ltk;
46 std::optional<crypto_toolbox::Octet16> irk;
47 std::optional<crypto_toolbox::Octet16> signature_key;
50 std::optional<crypto_toolbox::Octet16> link_key;
68 crypto_toolbox::Octet16 c;
69 crypto_toolbox::Octet16 r;
97 crypto_toolbox::Octet16 le_sc_c; /* LE Secure Connections Confirmation Value */
98 crypto_toolbox::Octet16 le_sc_r; /* LE Secure Connections Random Value */
100 crypto_toolbox::Octet16 security_manager_tk_value; /* OOB data for LE Legacy Pairing */
Dpairing_handler_le_legacy.cc70 return Octet16{0}; in LegacyJustWorks()
108 Octet16 tk{0}; in LegacyPasskeyEntry()
123 … const PairingResponseView& pairing_response, const Octet16& tk) { in DoLegacyStage2()
128 Octet16 mrand, srand; in DoLegacyStage2()
137 Octet16 mconfirm = crypto_toolbox::c1( in DoLegacyStage2()
157 Octet16 sconfirm = std::get<PairingConfirmView>(sconfirm_pkt).GetConfirmValue(); in DoLegacyStage2()
171 Octet16 sconfirm_generated = crypto_toolbox::c1( in DoLegacyStage2()
193 Octet16 sconfirm = crypto_toolbox::c1( in DoLegacyStage2()
208 Octet16 mconfirm = std::get<PairingConfirmView>(mconfirm_pkt).GetConfirmValue(); in DoLegacyStage2()
220 Octet16 mconfirm_generated = crypto_toolbox::c1( in DoLegacyStage2()
Dpairing_handler_le.cc112 Octet16 ltk = std::get<Octet16>(stage_2_result); in PairingMain()
129 Octet16 tk = std::get<Octet16>(stage1result); in PairingMain()
137 Octet16 stk = std::get<Octet16>(stage2result); in PairingMain()
181 Octet16 link_key = crypto_toolbox::ltk_to_link_key(*(distributed_keys.ltk), use_h7); in PairingMain()
310 Octet16 my_ltk = {0}; in DistributeKeys()
314 Octet16 my_irk = {0x01}; in DistributeKeys()
317 Octet16 my_signature_key{0}; in DistributeKeys()
344 std::optional<Octet16> ltk; /* Legacy only */ in ReceiveKeys()
348 std::optional<Octet16> irk; in ReceiveKeys()
349 std::optional<Octet16> signature_key; in ReceiveKeys()
[all …]
Dpairing_handler_le.h60 using crypto_toolbox::Octet16;
90 using Stage1Result = std::tuple<Octet16, Octet16, Octet16, Octet16>;
92 using Stage2ResultOrFailure = std::variant<PairingFailure, Octet16 /* LTK */>;
95 using LegacyStage1Result = Octet16 /*TK*/;
97 using StkOrFailure = std::variant<PairingFailure, Octet16 /* STK */>;
137 const uint16_t& ediv, const Octet16& ltk) { in SendHciLeStartEncryption()
220 const PairingResponseView& pairing_response, const Octet16& tk);
222 …void SendKeys(const InitialInformations& i, const uint8_t& keys_i_send, Octet16 ltk, uint16_t ediv,
223 … std::array<uint8_t, 8> rand, Octet16 irk, Address identity_address, AddrType identity_addres_type,
224 Octet16 signature_key);
Dpairing_handler_le_secure_connections.cc153 Octet16 ltk, mac_key; in DoSecureConnectionsStage2()
174 Octet16 Ea = crypto_toolbox::f6(mac_key, Na, Nb, rb, iocapA.data(), a, b); in DoSecureConnectionsStage2()
176 Octet16 Eb = crypto_toolbox::f6(mac_key, Nb, Na, ra, iocapB.data(), b, a); in DoSecureConnectionsStage2()
218 Octet16 zeros{0}; in SecureConnectionsOutOfBand()
219Octet16 localR = (remote_oob_flag == OobDataFlag::PRESENT && i.my_oob_data) ? i.my_oob_data->r : z… in SecureConnectionsOutOfBand()
220 Octet16 remoteR; in SecureConnectionsOutOfBand()
228 Octet16 remoteC = i.remote_oob_data->le_sc_c; in SecureConnectionsOutOfBand()
230 Octet16 remoteC2; in SecureConnectionsOutOfBand()
243 Octet16 Na, Nb, ra, rb; in SecureConnectionsOutOfBand()
280 Octet16 Na, Nb, ra{0}, rb{0}; in SecureConnectionsPasskeyEntry()
[all …]
/system/bt/btif/include/
Dbtif_dm.h64 void btif_dm_proc_loc_oob(bool valid, const Octet16& c, const Octet16& r);
65 bool btif_dm_proc_rmt_oob(const RawAddress& bd_addr, Octet16* p_c,
66 Octet16* p_r);
101 Octet16* p_er,
/system/bt/btif/co/
Dbta_dm_co.cc140 void bta_dm_co_loc_oob(bool valid, const Octet16& c, const Octet16& r) { in bta_dm_co_loc_oob()
161 Octet16 c; in bta_dm_co_rmt_oob()
162 Octet16 r; in bta_dm_co_rmt_oob()
215 Octet16* p_er, in bta_dm_co_ble_load_local_keys()
/system/bt/bta/include/
Dbta_dm_co.h108 extern void bta_dm_co_loc_oob(bool valid, const Octet16& c, const Octet16& r);
210 tBTA_DM_BLE_LOCAL_KEY_MASK* p_key_mask, Octet16* p_er,
Dbta_dm_ci.h58 const Octet16& c, const Octet16& r);
/system/bt/bta/dm/
Dbta_dm_ci.cc64 void bta_dm_ci_rmt_oob(bool accept, const RawAddress& bd_addr, const Octet16& c, in bta_dm_ci_rmt_oob()
65 const Octet16& r) { in bta_dm_ci_rmt_oob()
/system/bt/gd/security/record/
Dsecurity_record.h131 std::optional<crypto_toolbox::Octet16> ltk;
134 std::optional<crypto_toolbox::Octet16> irk;
135 std::optional<crypto_toolbox::Octet16> signature_key;
/system/bt/stack/include/
Dsmp_api_types.h223 Octet16 randomizer;
224 Octet16 commitment;
237 Octet16 randomizer;
238 Octet16 commitment;
/system/bt/gd/hci/
Dle_address_manager_test.cc24 using ::bluetooth::crypto_toolbox::Octet16;
203Octet16 irk = {0xec, 0x02, 0x34, 0xa3, 0x57, 0xc8, 0xad, 0x05, 0x34, 0x10, 0x10, 0xa6, 0x0a, 0x39,… in TEST_F()
225 Octet16 irk = {}; in TEST_F()
249Octet16 irk = {0xec, 0x02, 0x34, 0xa3, 0x57, 0xc8, 0xad, 0x05, 0x34, 0x10, 0x10, 0xa6, 0x0a, 0x39,… in TEST_F()
285Octet16 irk = {0xec, 0x02, 0x34, 0xa3, 0x57, 0xc8, 0xad, 0x05, 0x34, 0x10, 0x10, 0xa6, 0x0a, 0x39,… in SetUp()
372Octet16 peer_irk = {0xec, 0x02, 0x34, 0xa3, 0x57, 0xc8, 0xad, 0x05, 0x34, 0x10, 0x10, 0xa6, 0x0a, … in TEST_F()
373Octet16 local_irk = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,… in TEST_F()
392Octet16 peer_irk = {0xec, 0x02, 0x34, 0xa3, 0x57, 0xc8, 0xad, 0x05, 0x34, 0x10, 0x10, 0xa6, 0x0a, … in TEST_F()
393Octet16 local_irk = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,… in TEST_F()
414Octet16 peer_irk = {0xec, 0x02, 0x34, 0xa3, 0x57, 0xc8, 0xad, 0x05, 0x34, 0x10, 0x10, 0xa6, 0x0a, … in TEST_F()
[all …]

123