Crypto: Refactor the tfm_builtin_key_loader and HAL interaction
This patch refactors the entry points of the tfm_builtin_key_loader
driver to simplify its interaction with crypto keys HAL layer and
the rest of the TF-M Crypto service and PSA Crypto core layer.
* Decouple as much as possible each module from mbed TLS specific
types, and makes sure all library interactions are abstracted in
the crypto_library module of the crypto service
* Simplify the HAL requirements to provide platform builtin keys
as described in tfm_plat_crypto_keys.h
* Update the documentation to reflect the design change
* Fix minor issues and typos, include paths, etc
* Regenerate mbed TLS patches on top of 3.3.0 tag to be applied
Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
Change-Id: Id26ff0b88da87075490d17a4c8af8f209bb34a08
diff --git a/lib/ext/mbedcrypto/0003-Driver-wrapper-entry-points-for-CC3XX.patch b/lib/ext/mbedcrypto/0003-Driver-wrapper-entry-points-for-CC3XX.patch
index 95cc8e7..db124cb 100644
--- a/lib/ext/mbedcrypto/0003-Driver-wrapper-entry-points-for-CC3XX.patch
+++ b/lib/ext/mbedcrypto/0003-Driver-wrapper-entry-points-for-CC3XX.patch
@@ -1,4 +1,4 @@
-From 6c54899b07c7cc9615e98eba30781500f4b906c6 Mon Sep 17 00:00:00 2001
+From 89b0a57e9c29fde64572c62dbd4c3d75adde30a1 Mon Sep 17 00:00:00 2001
From: Antonio de Angelis <Antonio.deAngelis@arm.com>
Date: Fri, 15 Jul 2022 12:41:34 +0100
Subject: [PATCH 3/6] Driver wrapper entry points for CC3XX
@@ -20,7 +20,7 @@
3 files changed, 452 insertions(+), 52 deletions(-)
diff --git a/include/psa/crypto_driver_contexts_composites.h b/include/psa/crypto_driver_contexts_composites.h
-index 3f1c8af4..2fdf9561 100644
+index 3f1c8af4b..2fdf9561f 100644
--- a/include/psa/crypto_driver_contexts_composites.h
+++ b/include/psa/crypto_driver_contexts_composites.h
@@ -41,6 +41,9 @@
@@ -54,7 +54,7 @@
#endif /* PSA_CRYPTO_DRIVER_CONTEXTS_COMPOSITES_H */
diff --git a/include/psa/crypto_driver_contexts_primitives.h b/include/psa/crypto_driver_contexts_primitives.h
-index 2bb01ed4..2bc0bda7 100644
+index 2bb01ed43..2bc0bda70 100644
--- a/include/psa/crypto_driver_contexts_primitives.h
+++ b/include/psa/crypto_driver_contexts_primitives.h
@@ -40,6 +40,9 @@
@@ -88,7 +88,7 @@
#endif /* PSA_CRYPTO_DRIVER_CONTEXTS_PRIMITIVES_H */
diff --git a/library/psa_crypto_driver_wrappers.c b/library/psa_crypto_driver_wrappers.c
-index 19819413..e822eef0 100644
+index 198194139..e822eef01 100644
--- a/library/psa_crypto_driver_wrappers.c
+++ b/library/psa_crypto_driver_wrappers.c
@@ -48,6 +48,16 @@