-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stabilize BLE Security Implementation (#941)
* Refactor BLE broadcast encryption flags The original spec defines the flags that are used to indicate the keying material for BLE broadcasts: ... kBroadcastDataIsEncrypted = 1 << 3, kBroadcastKeyIsDeviceKey = 1 << 4, kBroadcastKeyIsUserKey = 1 << 5, ... Using this implementation only three states can be encoded: no encryption, encrypted with device key and encrypted with a user key. New implementation treats this three bytes like enum instead of seperate bools and introduce a new encryption state (encrypted with null key): kNoEncryption = 0, kEncryptedWithNullKey = 1, kEncryptedWithUserKey = 2, kEncryptedWithDeviceKey = 3, * Consolidate auth characteristics The BLE authentication flow is completely synchronous so there is no need for two separate characteristics for the client and the server. This commit unifies two authentication characteristics into one. * Modify Security Level 0 For security level 0, the root key is considered to be 32-bytes of zeros and authentication proceeds exactly the same as level 1 and 2 given that root key. * Stabilize flags/info ble characteristic Info characteristic holds 20 bytes 1 byte: version 2 byte: security flags 3-4 bytes: high flags 5-20 bytes: reserved flags Added RPC IN PROGRESS flag for tracking if the device handles a RPC and cannot handle another one * Distinguish password-based user-key and random data Introduce a 3rd AuthMethod and key: PasswordBasedAuthentication and PasswordBasedUserKey The primary benefit is that it distinguishes between when we are looking for a password that a user could enter from when we are looking for something that has to be stored in a server or key store somewhere. * Update comments in test_signed_list_report.py
- Loading branch information
1 parent
3150356
commit 1ed3db2
Showing
11 changed files
with
193 additions
and
102 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.