You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: doc/nrf/protocols/bt/bt_mesh/configuring.rst
+41
Original file line number
Diff line number
Diff line change
@@ -246,3 +246,44 @@ Using the :ref:`bluetooth_mesh_sensor_server` sample as an example, configured a
246
246
* Ambient light level gain
247
247
248
248
Adding up all entries, it is worth setting the cache size to minimum 71.
249
+
250
+
Security toolbox
251
+
----------------
252
+
253
+
Zephyr's Mesh security toolbox implementation uses third-party crypto libraries APIs (such as CMAC, AES-CCM, and HMAC-SHA-256) for implementing encryption and authentication functionality.
254
+
255
+
* The following options are available:
256
+
257
+
* :kconfig:option:`CONFIG_BT_MESH_USES_MBEDTLS_PSA` - Enables use of the `Mbed TLS`_ PSA API based security toolbox (default option).
258
+
* :kconfig:option:`CONFIG_BT_MESH_USES_TFM_PSA` - Enables use of the `Trusted Firmware M`_ PSA API based security toolbox (default option for platforms that support TF-M).
259
+
* :kconfig:option:`CONFIG_BT_MESH_USES_TINYCRYPT` - Enables use of Tinycrypt-based security toolbox.
260
+
Zephyr's Mesh operates with open key values, including storing them in the persistent memory.
261
+
The Tinycrypt-based solution has worse security materials protection compared to others due to keeping keys in memory in open form. Therefore, usage of Tinycrypt is not recommended for future designs.
262
+
263
+
The Bluetooth Mesh security toolbox based on the `PSA Certified Crypto API`_ does not operate with open key values.
264
+
After Bluetooth Mesh receives an open key value, it immediately imports the key into the crypto library and receives the unique key identifier.
265
+
The key identifiers are used in the security toolbox and stored in the persistent memory.
266
+
The crypto library is responsible for storing of the open key values in the Internal Trusted Storage (`PSA Certified Secure Storage API 1.0`_).
267
+
Bluetooth Mesh data structures based on Tinycrypt and based on the PSA API, as well as images of these structures stored in the persistent memory, are not compatible due to different key representations.
268
+
When a provisioned device updates its firmware binary from the Tinycrypt-based toolbox to firmware binary that uses the PSA API based toolbox, a provisioned device must be unprovisioned first and reprovisioned after the update.
269
+
If not then a device cannot restore data from the persistent memory after firmware update.
270
+
If the image is changed over Mesh DFU, it is recommended to use :c:enumerator:`BT_MESH_DFU_EFFECT_UNPROV`.
271
+
272
+
However, a provisioned device can update its firmware image from the Tinycrypt-based toolbox to firmware image that uses the PSA API based toolbox without requiring to be unprovisioned by using key importer functionality.
273
+
The :kconfig:option:`CONFIG_BT_MESH_KEY_IMPORTER` Kconfig option enables the key importer functionality.
274
+
The key importer is an application initialization functionality that is called with kernel initialization priority before starting main.
275
+
This functionality reads out the persistently stored Bluetooth Mesh data and if it finds keys stored by the Tinycrypt-based security toolbox, it imports them over the PSA API into the crypto library and stores the key identifiers in a format based on the PSA API toolbox.
276
+
Once the new firmware image starts Bluetooth Mesh initialization, the persistent area already has the stored data in the correct format due to use of key importer functionality.
277
+
278
+
Using the key importer might make the device vulnerable for attacks.
279
+
If the device works with the key importer functionality enabled and the attacker writes arbitrary data in the persistent memory, fake keys might be stored and imported to PSA crypto library after the next device reset.
280
+
281
+
Complete the following steps to use the key importer functionality safely:
282
+
283
+
1. Update the images with the Tinycrypt-based toolbox and the PSA API based toolbox with the key importer feature enabled.
284
+
#. Reboot the device to perform the key import after the devices in the network have successfully updated their images.
285
+
#. Update the images with the PSA API based security toolbox with the key importer feature disabled.
286
+
287
+
Even if you have completed these steps, the Tinycrypt-based open key values can be extracted from the settings subsystem backend if there is access to it.
288
+
The keys might still be compromised.
289
+
Start the key refresh procedure according to the specification for all existing keys.
Copy file name to clipboardexpand all lines: doc/nrf/releases_and_maturity/migration/migration_guide_3.0.rst
+16
Original file line number
Diff line number
Diff line change
@@ -219,3 +219,19 @@ Download client
219
219
.. code-block:: C
220
220
221
221
err = downloader_deinit(&dl);
222
+
223
+
Protocols
224
+
=========
225
+
226
+
This section provides detailed lists of changes by :ref:`protocol <protocols>`.
227
+
228
+
Bluetooth Mesh
229
+
--------------
230
+
231
+
.. toggle::
232
+
233
+
* Support of Tinycrypt-based security toolbox (:kconfig:option:`CONFIG_BT_MESH_USES_TINYCRYPT`) started the deprecation procedure and is not recommended for future designs.
234
+
* For platforms that do not support the TF-M: The default security toolbox is based on the Mbed TLS PSA API (:kconfig:option:`CONFIG_BT_MESH_USES_MBEDTLS_PSA`).
235
+
* For platforms that support the TF-M: The default security toolbox is based on the TF-M PSA API (:kconfig:option:`CONFIG_BT_MESH_USES_TFM_PSA`).
236
+
237
+
The :ref:`ug_bt_mesh_configuring` page provides more information about the updating of the images based on different security toolboxes.
0 commit comments