feat.: add BLE security via 4-digit auth code#163
Conversation
… code is displayed on screen
There was a problem hiding this comment.
Sorry @Rampage270906, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
There was a problem hiding this comment.
Sorry @Rampage270906, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
weberval
left a comment
There was a problem hiding this comment.
This is a breaking change!
Not only the flutter app will be affected by this, but also the Rust, Go and Python libraries.
To lower the impact and enable other developers to incorporate the changes, I would like to see some documentation about the new protocol extension.
Also, to be backward compatible to the proprietary firmware, we would need a way to keep insecure pairing. Maybe by pressing a button in pairing mode?
|
Will look into this and add the following at the earliest.
|
Closes #72
The badge's BT-PAIRING mode accepted bitmap transfers from any nearby device i.e anyone running the app within BLE range could overwrite the display without the owner's knowledge or consent. Added an application-layer authentication gate on top of the existing BLE connection flow. When the badge enters BT-PAIRING mode, it generates a random 4-digit code and displays it on the LED matrix. Any device attempting to transfer data must first send the correct code before the badge will accept a 'wang' transfer and without it, all writes are rejected.
Reviewer's Guide:
fossasia/badgemagic-app#1783 (comment)
This feature is dependent on the app and requires the above PR to be merged in the badgmagic-app repo