Skip to content

Commit 7e69444

Browse files
security manager doxygen overview updated
1 parent b845a9d commit 7e69444

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

features/FEATURE_BLE/ble/SecurityManager.h

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131
* and/or exchanging keys used for the current connection. Bonding means saving this information so that
3232
* it can later be used after reconnecting without having to pair again. This saves time and power.
3333
*
34-
* There are many ways to provide these at different levels of security depending on your requirements
34+
* @par Paring
35+
*
36+
* There are several ways to provide different levels of security during pairing depending on your requirements
3537
* and the facilities provided by the application. The process starts with initialising the SecurityManager
3638
* with default options for new connections. Some settings can later be changed per link or globally.
3739
*
@@ -43,6 +45,8 @@
4345
* You can change the IO capabilities after initialisation with setIoCapability(). This will take effect
4446
* for all subsequent pairings.
4547
*
48+
* @par Out of Band data used in pairing
49+
*
4650
* Sharing this information through IO capabilities means user interaction which limits the degree of
4751
* protection due to the limit of the amount of data that we can expect the user to transfer. Another
4852
* solution is using OOB (out of band) communication to transfer this data instead which can send much
@@ -57,7 +61,27 @@
5761
* it. If either side doesn't support it Legacy Pairing will be used. This is an older standard of pairing.
5862
* If higher security is required legacy pairing can be disabled by calling allowLegacyPairing(false);
5963
*
60-
* \par How to use
64+
* @par Signing
65+
*
66+
* Applications may require a level of security providing confidence that data transfers are coming
67+
* from a trusted source. This can be achieved by encrypting the link which also provides added confidentiality.
68+
* Encryption is a good choice when a device stays connected but introduces latency due to the need of encrypting the
69+
* link if the device only connects periodically to transfer data. If confidentiality is not required data GATT
70+
* server may allow writes to happen over an unencrypted link but authenticated by a signature present in each packet.
71+
* This signature relies on having sent a signing key to the peer during pairing prior to sending any signed packets.
72+
*
73+
* @par Persistence of Security information
74+
*
75+
* Security Manager stores all the data required for its operation on active links. Depending on resources
76+
* available on the device it will also attempt to store data for disconnected devices which have bonded to be
77+
* reused when reconnected.
78+
*
79+
* If the application has initialised a filesystem and the Security Manager has been provided with a
80+
* filepath during the init() call it may also provide data persistence across resets. This must be enabled by
81+
* calling preserveBondingStateOnReset(). Persistence is not guaranteed and may fail if abnormally terminated.
82+
* The Security Manager may also fall back to a non-persistent implementation if the resources are too limited.
83+
*
84+
* @par How to use
6185
*
6286
* First thing you need to do is to initialise the manager by calling init() with your chosen settings.
6387
*
@@ -87,7 +111,7 @@
87111
* accetPairing() or cancelPairing(). The result will be communicated on both peers through an event calling
88112
* pairingResult() in the EventHandler.
89113
*
90-
* \par Sequence diagrams
114+
* @par Sequence diagrams
91115
*
92116
* Sequence diagram "Just Works" pairing
93117
*
@@ -103,7 +127,7 @@
103127
* | | |<---[pairing complete]----->| | |
104128
* |<- pairingResult() <---------------| |----------------> pairingResult() -->|
105129
* | | | | | |
106-
* \endverbatim
130+
* @endverbatim
107131
*
108132
* @note the requestPairing() call isn't required to trigger pairing. Pairing will also be triggered
109133
* if you request encryption and authentication and no bonding information is available. The sequence will
@@ -121,7 +145,7 @@
121145
* | | |<-[encryption established]->| | |
122146
* |<- linkEncryptionResult() <--------| |---------> linkEncryptionResult() -->|
123147
* | | | | | |
124-
* \endverbatim
148+
* @endverbatim
125149
*
126150
* @note if bonding information is not available, pairing will be triggered
127151
*
@@ -149,7 +173,7 @@
149173
* | | |<---[pairing complete]----->| | |
150174
* |<- pairingResult() <---------------| |----------------> pairingResult() -->|
151175
* | | | | | |
152-
* \endverbatim
176+
* @endverbatim
153177
*
154178
*/
155179

0 commit comments

Comments
 (0)