Add option for Bluetooth security - #2483
Open
DavisNT wants to merge 1 commit into
Open
Conversation
|
Build size and comparison to main:
|
Under settings - Bluetooth add BT Security with settings: * Secured - enable Bluetooth security (watch is rebooted on change); * Pairable - temporary make watch discoverable and accept new pairings. The Secured setting: * requests encryption and authentication for BLE characteristics; * allows only encrypted, authenticated (by PIN) and bonded pairing; * allows new pairing only when Pairable setting is enabled; * enables Bluetooth MAC address randomization (BLE RPA with random IRK); * removes all data fields from advertisements after pairing; * uses cryptographically strong RNG for pairing/bonding PIN; * explicitly verifies connection security for sensitive-services; * ensures the watch is bonded with no more than 1 single device; * watch gets rebooted when the Secured setting is changed. The Pairable setting: * temporary sends full advertisements and allows new pairing/bonding; * gets automatically disabled when leaving BT Security screen. This PR maintains compatibility with insecure companion apps. When the Secured setting is disabled the only behavior change is verification by the sensitive-services that Bluetooth is Enabled. The sensitive-services are: * DfuService (allows to compromise watch) * FSService (allows to compromise watch) * HeartRateService (provides data about watch user) * MotionService (provides data about watch user)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is 1. part for #1814 (comment) 🔐
This PR needs corresponding change in InfiniSim: InfiniTimeOrg/InfiniSim#204
These changes should facilitate move towards secured Bluetooth connection while maintaining compatibility with older/insecure companion apps.
Testing (especially security/penetration testing 🕵️) and feedback is very welcome!
Under settings - Bluetooth add BT Security with settings:
The Secured setting:
The Pairable setting:
This PR maintains compatibility with insecure companion apps. When the Secured setting is disabled the only behavior change is verification by the sensitive-services that Bluetooth is Enabled.
The sensitive-services are: