Skip to content

Commit 39c8ef7

Browse files
RcColesadeaarm
authored andcommitted
RSE: Minimize size of builtin key slots
Use only required size. Change-Id: I1d972f16f78c0adb89621f3a7d4332961b0040ef Signed-off-by: Raef Coles <[email protected]>
1 parent 2bee3b7 commit 39c8ef7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

platform/ext/target/arm/rse/common/platform_builtin_key_loader_ids.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99
#define __PLATFORM_BUILTIN_KEY_LOADER_IDS_H__
1010

1111
#include "rse_rotpk_config.h"
12+
#include "rse_otp_config.h"
1213

1314
#ifdef __cplusplus
1415
extern "C" {
1516
#endif
1617

17-
#define TFM_BUILTIN_MAX_KEY_LEN 96
18+
#define TFM_BUILTIN_MAX_KEY_LEN RSE_OTP_ROTPK_MAX_SIZE
1819

1920
enum psa_drv_slot_number_t {
2021
TFM_BUILTIN_KEY_SLOT_HUK = 0,

platform/ext/target/arm/rse/common/subplatform_pal_default_config/rse_otp_config.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@
5656
#define RSE_OTP_CONFIG_PROVISIONING_DM_SIGN_KEY_CM_ROTPK_HASH_ALG_SIZE (0)
5757
#endif /* RSE_PROVISIONING_DM_SIGN_KEY_CM_ROTPK_HASH_ALG */
5858

59+
#define RSE_OTP_ROTPK_MAX_SIZE \
60+
(RSE_OTP_CONFIG_MAX_SIZE_OF_THREE(RSE_OTP_CM_ROTPK_SIZE, RSE_OTP_DM_ROTPK_SIZE, 0))
61+
5962
#define RSE_OTP_CM_ROTPK_SIZE \
6063
(RSE_OTP_CONFIG_MAX_SIZE_OF_THREE( \
6164
RSE_OTP_CONFIG_TFM_BL1_2_ROTPK_HASH_ALG_SIZE, RSE_OTP_CONFIG_MCUBOOT_ROTPK_HASH_ALG_SIZE, \

0 commit comments

Comments
 (0)