mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-09 06:46:36 +00:00
sm: calculate DHKey earlier in sm_sc_prepare_dhkey_check
This commit is contained in:
parent
daabb8b879
commit
3fc45ec760
@ -1586,10 +1586,6 @@ static void sm_sc_calculate_dhkey(sm_key256_t dhkey){
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void f5_calculate_salt(sm_connection_t * sm_conn){
|
static void f5_calculate_salt(sm_connection_t * sm_conn){
|
||||||
// calculate DHKEY
|
|
||||||
sm_key256_t dhkey;
|
|
||||||
sm_sc_calculate_dhkey(dhkey);
|
|
||||||
|
|
||||||
// calculate salt for f5
|
// calculate salt for f5
|
||||||
const uint16_t message_len = 32;
|
const uint16_t message_len = 32;
|
||||||
sm_cmac_connection = sm_conn;
|
sm_cmac_connection = sm_conn;
|
||||||
@ -1717,6 +1713,10 @@ static void sm_sc_calculate_remote_confirm(sm_connection_t * sm_conn){
|
|||||||
|
|
||||||
static void sm_sc_prepare_dhkey_check(sm_connection_t * sm_conn){
|
static void sm_sc_prepare_dhkey_check(sm_connection_t * sm_conn){
|
||||||
sm_conn->sm_engine_state = SM_SC_W2_CALCULATE_F5_SALT;
|
sm_conn->sm_engine_state = SM_SC_W2_CALCULATE_F5_SALT;
|
||||||
|
|
||||||
|
// calculate DHKEY
|
||||||
|
sm_key256_t dhkey;
|
||||||
|
sm_sc_calculate_dhkey(dhkey);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sm_sc_calculate_f6_for_dhkey_check(sm_connection_t * sm_conn){
|
static void sm_sc_calculate_f6_for_dhkey_check(sm_connection_t * sm_conn){
|
||||||
|
Loading…
Reference in New Issue
Block a user