Introducing MBEDTLS_PROMPTLESS and CUSTOM_MBEDTLS_CFG_FILE settings. The MBEDTLS_PROMPTLESS can be set to true whenever configuration of mbedTLS is done from a subsystem or module. Such an example is OpenThread, which selects mbedTLS for some predefined crypto settings using OPENTHREAD_MBEDTLS=y. Unfortunately, extensive use of select can easily cause stuck symbol syndrome making it harder than neccesarry for users to later reconfigure as they easily get stuck in incompatible configurations. Providing a MBEDTLS_PROMPTLESS allows such configurations to disable the MBEDTLS prompt itself when selected but avoid stuck symbol if user select another security configuration. Similar with CUSTOM_MBEDTLS_CFG_FILE which ensures that user must explicitly select this symbol before providing a custom mbedTLS config file. Today, other parts the Kconfig tree may set a default value for MBEDTLS_CFG_FILE but that value is stuck and thus changed Kconfig selections elsewhere in the tree will not adjust the value. Introducing CUSTOM_MBEDTLS_CFG_FILE ensures it is known when the user has provided the value. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no> Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no> |
||
|---|---|---|
| .. | ||
| src | ||
| CMakeLists.txt | ||
| prj_mtls_shim.conf | ||
| prj_nrf_ecb.conf | ||
| prj_stm32.conf | ||
| prj.conf | ||
| README.rst | ||
| sample.yaml | ||
.. _crypto_sample:
Crypto
######
Overview
********
An example to illustrate the usage of crypto APIs.
Building and Running
********************
This project outputs to the console. It can be built and executed
on QEMU as follows:
.. zephyr-app-commands::
:zephyr-app: samples/drivers/crypto
:host-os: unix
:board: qemu_x86
:goals: run
:compact:
Sample Output
=============
.. code-block:: console
[general] [INF] main: Encryption Sample
[general] [INF] cbc_mode: CBC Mode
[general] [INF] cbc_mode: cbc mode ENCRYPT - Match
[general] [INF] cbc_mode: cbc mode DECRYPT - Match
[general] [INF] ctr_mode: CTR Mode
[general] [INF] ctr_mode: ctr mode ENCRYPT - Match
[general] [INF] ctr_mode: ctr mode DECRYPT - Match
[general] [INF] ccm_mode: CCM Mode
[general] [INF] ccm_mode: CCM mode ENCRYPT - Match
[general] [INF] ccm_mode: CCM mode DECRYPT - Match
Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`.