From f0e2853d4645f69fb6b63697a561d2c784d2064f Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 30 Nov 2020 17:51:14 +0100 Subject: [PATCH] Minimal update to mention unified-interface opaque drivers Signed-off-by: Gilles Peskine --- .../testing/driver-interface-test-strategy.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/architecture/testing/driver-interface-test-strategy.md b/docs/architecture/testing/driver-interface-test-strategy.md index 62ec3b8c4..57b1a237f 100644 --- a/docs/architecture/testing/driver-interface-test-strategy.md +++ b/docs/architecture/testing/driver-interface-test-strategy.md @@ -4,9 +4,19 @@ This document describes the test strategy for the driver interfaces in Mbed Cryp The driver interfaces are standardized through PSA Cryptography functional specifications. -## Secure element driver interface +## Secure element driver interface testing -The secure element driver interface (SE interface for short) is defined by [`psa/crypto_se_driver.h`](../../../include/psa/crypto_se_driver.h). This is an interface between Mbed Crypto and one or more third-party drivers. +### Secure element driver interfaces + +#### Opaque driver interface + +The [unified driver interface](../../proposed/psa-driver-interface.md) supports both transparent drivers (for accelerators) and opaque drivers (for secure elements). + +Drivers exposing this interface need to be registered at compile time by declaring their JSON description file. + +#### Dynamic secure element driver interface + +The dynamic secure element driver interface (SE interface for short) is defined by [`psa/crypto_se_driver.h`](../../../include/psa/crypto_se_driver.h). This is an interface between Mbed Crypto and one or more third-party drivers. The SE interface consists of one function provided by Mbed Crypto (`psa_register_se_driver`) and many functions that drivers must implement. To make a driver usable by Mbed Crypto, the initialization code must call `psa_register_se_driver` with a structure that describes the driver. The structure mostly contains function pointers, pointing to the driver's methods. All calls to a driver function are triggered by a call to a PSA crypto API function. @@ -18,6 +28,8 @@ Many SE driver interface unit tests could be covered by running the existing API #### SE driver registration +This applies to dynamic drivers only. + * Test `psa_register_se_driver` with valid and with invalid arguments. * Make at least one failing call to `psa_register_se_driver` followed by a successful call. * Make at least one test that successfully registers the maximum number of drivers and fails to register one more.