I try to connect a Bluetooth device to several android apps. I want to use the same long term key(LTK) for all apps (AES256) and derive session keys from that LTK in each app to establish a secure communication tunnel. I use shared preference in private mode which allows the apps with the same bundle ID to access the same data, but unfortunately, the shared preference is not secure enough and the data is also available for other root access level requests. I am using the Android Keystore to storing the LTK, but I need to improve the solution for two scenarios: 1. Apps with the same bundle ID. and 2. Apps with the different bundle IDs using the same SDK.
I am looking for a secure way to store the LTK in the android device which is accessible by those specific apps.
Is there a solution similar to the Apple keychain available for Android now? (I think the Android key chain works differently. I prefer a solution like the Apple key chain to transfer the security trustworthy and challenges to the OS level.) OR, should I use shared preference and secure it by myself? In this regard, if I should use Android Keystore to generate and store that LTK, is the Android Keystore allow me to access the same key from different apps with different bundle IDs? please describe the different options and limitations.