From aa7d4d9c486ed63ac569c187201d52b16e95a78a Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Mon, 27 Jun 2016 17:12:51 +0200 Subject: [PATCH] sm: store non-truncated LTK in setup->sm_local_ltk for cross transport key derivation - see E6405 --- src/ble/sm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ble/sm.c b/src/ble/sm.c index c24438b28..a0ee0f882 100644 --- a/src/ble/sm.c +++ b/src/ble/sm.c @@ -1411,7 +1411,7 @@ static void sm_sc_cmac_done(uint8_t * hash){ // E6405 – Cross transport key derivation from a key of size less than 128 bits // Note: When the BR/EDR link key is being derived from the LTK, the derivation is done before the LTK gets masked." memcpy(setup->sm_ltk, hash, 16); - memcpy(setup->sm_local_ltk, 16); + memcpy(setup->sm_local_ltk, hash, 16); sm_truncate_key(setup->sm_ltk, sm_conn->sm_actual_encryption_key_size); sm_conn->sm_engine_state = SM_SC_W2_CALCULATE_F6_FOR_DHKEY_CHECK; break;