Hello,
I have questions on implementing the security on my BLE application which uses CC2640R2 as SNP.
My use case requires a single BLE device to be controlled by multiple devices (mobile app). This is achieved by implementing security on application layer (on top of GATT value) which uses 256-bits symmetric key.
Here is my previous thread question & other reference that relates to this use case:
https://e2e.ti.com/support/wireless_connectivity/bluetooth_low_energy/f/538/p/613046/2257490#2257490
https://devzone.nordicsemi.com/b/blog/posts/intro-to-application-level-security-using-the-ecb-
As I develop my application, the problem that I found is on provisioning the key when setup the BLE device before it can be used. I decide to let the SNP generate the key by using its RNG. This key should be retrieved by mobile app and be synchronized to cloud because this key will be distributed to other mobile app that is authenticated to the cloud and have privilege to control the BLE device.
To retrieve the key means the mobile app should be paired to BLE device and I am still finding a way to secure this connection. My questions are:
- Is it enough if I only use Just Works mechanism?
- How I can enable the BLE provided pairing method with encryption (Just Works) on SNP API? Pardon me as I do not see the example from Simplelink BLE SDK plugin that demonstrates how to use the SNP Set Security or SNP Send Security Request.
- Assume that I use Just Works, I plan to implement a command such as test command that would blink the LED on BLE device. This command is triggered by user consent (via button) on mobile app.
Does it provide a better security since adversary needs to physically present and observe the user who configure the device? - Other thing that I can think of is to generate a setup key (256-bits) on device production and encode it in QR code on a sticker or a card. Each device would have unique setup key and mobile app should scan the QR code first before it can communicate securely. This setup key is different than generated key because it is fixed and will never be changed, that is why I limit the usage for setup only and let the user keep the QR code whenever they factory reset the device and needs to setup again. However I think this is quite complicated on the production line so I do not make it a priority.
Thank you for your attention
Kind regards,
Pranata