Lines Matching refs:driver
1 # PSA Cryptoprocessor driver development examples
3 …driver and the method for integrating a driver with Mbed TLS will vary depending on the operation …
5 …driver system. The [PSA Driver Interface](https://github.com/Mbed-TLS/mbedtls/blob/development/doc…
6 …driver-developer-guide.md) Guide describes the deliverables for writing a driver that can be used …
16 … called *Multi-Part Operations*. Single-part operations implemented by a driver will have one entr…
19 …hey are typically used for hardware **accelerators**. When a transparent driver is available for a…
20 …driver is invoked for the specific [key location](https://github.com/Mbed-TLS/mbedtls/blob/develop…
22 …driver dispatch layer** (also called a driver wrapper layer). For each cryptographic operation tha…
24 …ong-term goal is for the driver dispatch layer to be auto-generated using a JSON driver descriptio…
25 …rt auto-generation of the driver wrapper, developers will have to manually edit the driver dispatc…
27 …driver wrapper is supported for the operation entry points specified in the table below. Certain o…
39 …driver is accelerating operations whose entry points are in the above table, the instructions in t…
41 There are three deliverables for creating such a driver. These are:
42 - A driver description file (in JSON format).
43 …s defining the types required by the driver description. The names of these header files are decla…
44 …- An object file compiled for the target platform defining the functions required by the driver de…
46 …driver tests for the aforementioned entry points provide examples of how these deliverables can be…
50 …driver is accelerating operations whose entry points are not present in the table, a different pro…
52 **1. Choose a driver prefix and a macro name that indicates whether the driver is enabled** \
53 …driver prefix is simply a word (often the name of the driver) that all functions/macros associated…
55 **2. Include the following in one of the driver header files:**
67 **3. Conditionally include header files required by the driver**
68 …ed by the driver in `psa_crypto_driver_wrappers.h`, placing the `#include` statements within an `#…
76 **4. For each operation being accelerated, locate the function in the driver dispatch layer that co…
77 …driver wrapper functions. For the entry points that have driver wrapper auto-generation implemente…
79 **5. If a driver entry point function has been provided then ensure it has the same signature as th…
80 …driver prefix, followed by transparent/opaque (depending on driver type), and end with the entry p…
83 … correct, but the driver does not support the operation. If a transparent driver returns this then…
86 **6. Modify the driver wrapper function** \
87 …driver wrapper function contains a `switch` statement which checks the location of the key. If the…
88 …* **Transparent drivers:** Calls to driver entry points go under `case PSA_KEY_LOCATION_LOCAL_STOR…
89 …* **Opaque Drivers** Calls to driver entry points go in a separate `case` block corresponding to t…
92 …shows the layout of a driver wrapper function which can dispatch to two transparent drivers `Foo` …
98 | ├── case PSA_KEY_LOCATION_LOCAL_STORAGE //transparent driver
101 | | | | ├── if(//conditions for foo driver capibilities)
102 | | | | ├── foo_driver_transparent_xxx() //call to driver entry point
106 | | | | ├── if(//conditions for bar driver capibilities)
107 | | | | ├── bar_driver_transparent_xxx() //call to driver entry point
112 | ├── case SECURE_ELEMENT_LOCATION //opaque driver
115 | | | | ├── if(//conditions for baz driver capibilities)
116 | | | | ├── baz_driver_opaque_xxx() //call to driver entry point
123 …driver calls within each `case` must be contained between `#if defined(PSA_CRYPTO_ACCELERATOR_DRIV…
125 **7. Build Mbed TLS with the driver**
126 … TLS from source alongside your project. If building with a driver present, the chosen driver macr…
137 …that is significantly different to the default. Define the macro for the driver, along with any ot…
141 …as been integrated in Mbed TLS as a PSA transparent driver. The source code of p256-m and the driv…
149 …he documentation of `MBEDTLS_PSA_P256M_DRIVER_ENABLED` and [`driver-only-builds.md`](driver-only-b…
151 The driver prefix for p256-m is `P256`/`p256`.
152 The p256-m driver implements the following entry points: `"import_key"`, `"export_public_key"`, `"g…
154 …driver entry point functions can be found in `p256m_driver_entrypoints.[hc]`. These functions act …
156 …driver wrapper functions in `psa_crypto_driver_wrappers.h.jinja` for all four entry points have al…