Skip to content

Add option for Bluetooth security - #2483

Open
DavisNT wants to merge 1 commit into
InfiniTimeOrg:mainfrom
DavisNT:blesec
Open

Add option for Bluetooth security#2483
DavisNT wants to merge 1 commit into
InfiniTimeOrg:mainfrom
DavisNT:blesec

Conversation

@DavisNT

@DavisNT DavisNT commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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:

  • 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)

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Build size and comparison to main:

Section Size Difference
text 382824B 2820B
data 936B 0B
bss 22952B 16B

Run in InfiniEmu

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant