Skip to main content
Associate II
July 14, 2025
Question

How to Get LTK (Long Term Key)

  • July 14, 2025
  • 2 replies
  • 342 views

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

ST Employee
July 14, 2025

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

ST Employee
July 15, 2025

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