Hi,
I am working on a product based on an nRF52832 (SDK 15.3, S112 6.1).
The device uses the Nordic UART service, modified to force access parameters to JUST_WORKS for now.
The device has a couple of switches but no keypad or display. I would like to integrate authentication in the following manner :
- The user (smartphone) connects to the device.
- The user tries to access the Nordic UART service.
- It then starts a pairing request to the device.
- The device enter a special "waiting for authentication mode" where the LED indicates to the user that he needs to do a particular series of actions with the buttons to confirm it's wish to authenticate.
- The user then press one button, and while keeping it presses a second button and release both (example of user actions)
- The device acknowledges the identity of the user and the pairing is accepted.
- Bonding info are stored for future encrypted connections
I know I won't get proper MITM protection that way but at least I should get something a bit better than Just Works : An attacker who does not have physical access to the device would not be able to confirm using the button presses and would then be rejected.
Is it something that is do-able ? If so how ?
I saw things on the forum related to using constant key with a keypress mode but haven't found any code example.
Regards.