cancel
Showing results for 
Search instead for 
Did you mean: 

How to Get LTK (Long Term Key)

Jetson
Associate II

I am currently considering capturing and analyzing LE-Audio packets, but for that I need the LTK used for decryption.BLE Secure Connection pairing does not directly exchange LTK, so I do not know what it is, and I am having trouble.

Could you please tell me how to output an LTK log by modifying the user source code?

-------------------------------------------------------------------------------------------------------------

[Srouce]

https://github.com/STMicroelectronics/STM32CubeWBA.git

[Project]

Projects\STM32WBA55G-DK1\Applications\BLE\BLE_Audio_TMAP_Peripheral

Projects\STM32WBA55G-DK1\Applications\BLE\BLE_Audio_TMAP_Central

2 REPLIES 2
Jacob WOODRUFF
ST Employee

Hi All,

 

This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.

 

Regards,
Jake

ST Support

TMANE.1
ST Employee

Hello Jetson,

 

My first proposal is to use debug keys that are known by sniffer tools. For that, you can add at the end of Ble_Hci_Gap_Gatt_Init() function:

 

uint8_t a_sc_key_type[1];
a_sc_key_type[0] = 1;
aci_hal_write_config_data(CONFIG_DATA_SC_KEY_TYPE_OFFSET,1,a_sc_key_type);

 

best regards,

Théo