Which function is used to generate LTK key?
LTK generation is taken care of by the softdevice and hidden for the application. LTK will can be accessed when you receive the BLE_GAP_EVT_AUTH_STATUS event from the stack, see MSC here.