From b61484947af23d4301cc2c0d86df1753bd14a2d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 7 Aug 2023 11:32:51 +0200 Subject: [PATCH 1/4] Fix error in the guide to drivers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is no export_key entry point for transparent drivers. Signed-off-by: Manuel Pégourié-Gonnard --- docs/psa-driver-example-and-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/psa-driver-example-and-guide.md b/docs/psa-driver-example-and-guide.md index ff661245fb..ae3c04c64d 100644 --- a/docs/psa-driver-example-and-guide.md +++ b/docs/psa-driver-example-and-guide.md @@ -29,8 +29,8 @@ Auto-generation of the driver wrapper is supported for the operation entry point | Transparent Driver | Opaque Driver | |---------------------|---------------------| | `import_key` | `import_key` | -| `export_key` | `export_key` | | `export_public_key` | `export_public_key` | +| | `export_key` | | | `copy_key` | | | `get_builtin_key` | From de24ba6cfd4c704b0bc51f3c512907cac9596070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 7 Aug 2023 11:36:14 +0200 Subject: [PATCH 2/4] Add link to examples in relevant places MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some documents about driver describe a state of things that is ahead of the reality. They already contain a warning about it, but no way to know that the current reality is; add a pointer to a document that describes it. Signed-off-by: Manuel Pégourié-Gonnard --- docs/proposed/psa-driver-developer-guide.md | 1 + docs/proposed/psa-driver-integration-guide.md | 1 + docs/proposed/psa-driver-wrappers-codegen-migration-guide.md | 1 + 3 files changed, 3 insertions(+) diff --git a/docs/proposed/psa-driver-developer-guide.md b/docs/proposed/psa-driver-developer-guide.md index d004483f91..6b207c824a 100644 --- a/docs/proposed/psa-driver-developer-guide.md +++ b/docs/proposed/psa-driver-developer-guide.md @@ -2,6 +2,7 @@ PSA Cryptoprocessor driver developer's guide ============================================ **This is a specification of work in progress. The implementation is not yet merged into Mbed TLS.** +For a description of the current state of drivers Mbed TLS, see our [PSA Cryptoprocessor driver development examples](../psa-driver-example-and-guide.html). This document describes how to write drivers of cryptoprocessors such as accelerators and secure elements for the PSA cryptography subsystem of Mbed TLS. diff --git a/docs/proposed/psa-driver-integration-guide.md b/docs/proposed/psa-driver-integration-guide.md index 3d12ec66c8..8b3b4041c5 100644 --- a/docs/proposed/psa-driver-integration-guide.md +++ b/docs/proposed/psa-driver-integration-guide.md @@ -2,6 +2,7 @@ Building Mbed TLS with PSA cryptoprocessor drivers ================================================== **This is a specification of work in progress. The implementation is not yet merged into Mbed TLS.** +For a description of the current state of drivers Mbed TLS, see our [PSA Cryptoprocessor driver development examples](../psa-driver-example-and-guide.html). This document describes how to build Mbed TLS with additional cryptoprocessor drivers that follow the PSA cryptoprocessor driver interface. diff --git a/docs/proposed/psa-driver-wrappers-codegen-migration-guide.md b/docs/proposed/psa-driver-wrappers-codegen-migration-guide.md index 6144aada6a..84c311ca59 100644 --- a/docs/proposed/psa-driver-wrappers-codegen-migration-guide.md +++ b/docs/proposed/psa-driver-wrappers-codegen-migration-guide.md @@ -2,6 +2,7 @@ Migrating to an auto generated psa_crypto_driver_wrappers.c file ================================================================ **This is a specification of work in progress. The implementation is not yet merged into Mbed TLS.** +For a description of the current state of drivers Mbed TLS, see our [PSA Cryptoprocessor driver development examples](../psa-driver-example-and-guide.html). This document describes how to migrate to the auto generated psa_crypto_driver_wrappers.c file. It is meant to give the library user migration guidelines while the Mbed TLS project tides over multiple minor revs of version 1.0, after which this will be merged into psa-driver-interface.md. From 0b6d021069266a099bd83c34dc679ac687c2086c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 8 Aug 2023 09:37:11 +0200 Subject: [PATCH 3/4] Adjust presence of warning/link. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - the codegen migration document is already a migration document, so doesn't need the extra warning about work in progress; - the driver interface can use a link to the more practical guide too. Signed-off-by: Manuel Pégourié-Gonnard --- docs/proposed/psa-driver-interface.md | 2 ++ docs/proposed/psa-driver-wrappers-codegen-migration-guide.md | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/proposed/psa-driver-interface.md b/docs/proposed/psa-driver-interface.md index 41f90c9dda..1aa55b3cc3 100644 --- a/docs/proposed/psa-driver-interface.md +++ b/docs/proposed/psa-driver-interface.md @@ -5,6 +5,8 @@ This document describes an interface for cryptoprocessor drivers in the PSA cryp This specification is work in progress and should be considered to be in a beta stage. There is ongoing work to implement this interface in Mbed TLS, which is the reference implementation of the PSA Cryptography API. At this stage, Arm does not expect major changes, but minor changes are expected based on experience from the first implementation and on external feedback. +For a practical guide, with a description of the current state of drivers Mbed TLS, see our [PSA Cryptoprocessor driver development examples](../psa-driver-example-and-guide.html). + ## Introduction ### Purpose of the driver interface diff --git a/docs/proposed/psa-driver-wrappers-codegen-migration-guide.md b/docs/proposed/psa-driver-wrappers-codegen-migration-guide.md index 84c311ca59..67157e5f74 100644 --- a/docs/proposed/psa-driver-wrappers-codegen-migration-guide.md +++ b/docs/proposed/psa-driver-wrappers-codegen-migration-guide.md @@ -1,12 +1,11 @@ Migrating to an auto generated psa_crypto_driver_wrappers.c file ================================================================ -**This is a specification of work in progress. The implementation is not yet merged into Mbed TLS.** -For a description of the current state of drivers Mbed TLS, see our [PSA Cryptoprocessor driver development examples](../psa-driver-example-and-guide.html). - This document describes how to migrate to the auto generated psa_crypto_driver_wrappers.c file. It is meant to give the library user migration guidelines while the Mbed TLS project tides over multiple minor revs of version 1.0, after which this will be merged into psa-driver-interface.md. +For a practical guide with a description of the current state of drivers Mbed TLS, see our [PSA Cryptoprocessor driver development examples](../psa-driver-example-and-guide.html). + ## Introduction The design of the Driver Wrappers code generation is based on the design proposal https://github.com/Mbed-TLS/mbedtls/pull/5067 From 8550e0f746bdc4aa0b48bf48b083fb3e4dabe7b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 8 Aug 2023 09:39:39 +0200 Subject: [PATCH 4/4] Remove "export_key" from transparent driver json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Transparent drivers don't have this entry points. Other entry points that are only for opaque drivers are not listed here but only in the opaque_driver.json file, so this was likely a mistake. Signed-off-by: Manuel Pégourié-Gonnard --- .../driver_jsons/mbedtls_test_transparent_driver.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/data_files/driver_jsons/mbedtls_test_transparent_driver.json b/scripts/data_files/driver_jsons/mbedtls_test_transparent_driver.json index 9eb259f655..b9b2d6847e 100644 --- a/scripts/data_files/driver_jsons/mbedtls_test_transparent_driver.json +++ b/scripts/data_files/driver_jsons/mbedtls_test_transparent_driver.json @@ -7,7 +7,7 @@ { "_comment": "The Mbed TLS transparent driver supports import key/export key", "mbedtls/c_condition": "defined(PSA_CRYPTO_DRIVER_TEST)", - "entry_points": ["import_key", "export_key"], + "entry_points": ["import_key"], "fallback": true }, {