Skip to contentSkip to conversation

*** Fix RSA key generation issue for Corstone-1000 ***

PATCH Applied [email protected] 2 participants 3 messages Oct 13, 2023 – Oct 17, 2023

lore
Share & tools
lore
#0 lore raw

cover *** Fix RSA key generation issue for Corstone-1000 ***

From: Vikas Katariya <[email protected]>

This patch changes the default size for ITS_MAX_ASSET_SIZE on Trusted-firmware-m for Corstone-1000 platform

Vikas Katariya (1):
arm-bsp/corstone1000: Fix RSA key generation issue

 ...tone1000-increase-ITS-max-asset-size.patch | 29 +++++++++++++++++++
 .../trusted-firmware-m-1.7.0-corstone1000.inc |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0016-platform-corstone1000-increase-ITS-max-asset-size.patch
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/1 arm-bsp/corstone1000: Fix RSA key generation issue

From: Vikas Katariya <[email protected]>

This support is for Cassini distro using Corstone-1000 platform.

When running parsec test, it reports an error
PSA_ERROR_DATA_INVALID (-153).

This is related to ITS_MAX_ASSET_SIZE configuration which is been set to 512 on the secure enclave (TF-M), which defines the max asset size and it overflows when running the parsec tests.

The key is generated, but when it is asked to store via psa_its_set it returns PSA_ERROR_INVALID_ARGUMENT (-135), which then propagates to PSA_ERROR_DATA_INVALID (-153)

Increasing the ITS_MAX_ASSET_SIZE to 2048 solves this issue.

---
 ...tone1000-increase-ITS-max-asset-size.patch | 29 +++++++++++++++++++
 .../trusted-firmware-m-1.7.0-corstone1000.inc |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0016-platform-corstone1000-increase-ITS-max-asset-size.patch
meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0016-platform-corstone1000-increase-ITS-max-asset-size.patch new file +29 -0
new file mode 100644
index 000000000..4d146c226
@@ -0,0 +1,29 @@
+From ef97f7083279565dab45a550139935d741f159a9 Mon Sep 17 00:00:00 2001
+From: Emekcan Aras <[email protected]>
+Date: Fri, 29 Sep 2023 09:57:19 +0100
+Subject: [PATCH] platform: corstone1000: Increase ITS max asset size
+​
+Increases the max asset size for ITS to enable parsec services & tests
+​
+Upstream-Status: Pending
+Signed-off-by: Emekcan Aras <[email protected]>
+Signed-off-by: Vikas Katariya <[email protected]>
+---
+ platform/ext/target/arm/corstone1000/config_tfm_target.h | 5 +++++
+ 1 files changed, 5 insertions(+)
+​
+diff --git a/platform/ext/target/arm/corstone1000/config_tfm_target.h b/platform/ext/target/arm/corstone1000/config_tfm_target.h
+index e968366639..3f6e8477e5 100644
+--- a/platform/ext/target/arm/corstone1000/config_tfm_target.h
++++ b/platform/ext/target/arm/corstone1000/config_tfm_target.h
+@@ -24,4 +24,9 @@
+ #undef PS_NUM_ASSETS
+ #define PS_NUM_ASSETS        20
+
++/* The maximum size of asset to be stored in the Internal Trusted Storage area. */
++#undef ITS_MAX_ASSET_SIZE
++#define ITS_MAX_ASSET_SIZE        2048
++
++
+ #endif /* __CONFIG_TFM_TARGET_H__ */
+-- 
\ No newline at end of file
meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-1.7.0-corstone1000.inc +1 -0
index 23c8c127b..54efb4401 100644
@@ -52,6 +52,7 @@ SRC_URI:append:corstone1000 = " \
     file://0014-Platform-Corstone1000-Increase-BL2_DATA_SIZE.patch              \
     file://0015-Platform-Corstone1000-Calculate-the-new-CRC32-value-.patch      \
     file://corstone1000/rwx.patch                                               \
+    file://0016-platform-corstone1000-increase-ITS-max-asset-size.patch         \
     "
 
 # TF-M ships patches for external dependencies that needs to be applied
Signature · 1 line
2.25.1
Applied
#2 lore raw
In reply to [email protected]
Quoted 9 lines · On Fri, 13 Oct 2023 11:34:36 +0100, [email protected] wrote:

From: Vikas Katariya <[email protected]>

This patch changes the default size for ITS_MAX_ASSET_SIZE on Trusted-firmware-m for Corstone-1000 platform

Vikas Katariya (1):
arm-bsp/corstone1000: Fix RSA key generation issue

[...]

Applied, thanks!

[1/1] arm-bsp/corstone1000: Fix RSA key generation issue

      commit: 3ed13d25a065f29bd46ee725c708d12ebc3f175a

Best regards,

Signature · 1 line
Jon Mason <[email protected]>