From 2cde2dcc7aa2c44786c084fbae9b9864aab60f34 Mon Sep 17 00:00:00 2001 From: Chandni Sabharwal Date: Fri, 17 May 2024 11:55:40 +1200 Subject: [PATCH] drivers: crypto: se05x: Add SCP03 keys for SE052F2 Add SCP03 default keys for SE052F2 to support OEFID 0xB501 Variant Identifier (OEF ID): B501 12NC : 9354 551 73118 Type Number : SE052F2HN2/Z019H Orderable Part Number : SE052F2HN2/Z019HJ Signed-off-by: Chandni Sabharwal Acked-by: Jorge Ramirez-Ortiz --- core/drivers/crypto/se050/adaptors/include/se050.h | 1 + .../drivers/crypto/se050/adaptors/utils/scp_config.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/core/drivers/crypto/se050/adaptors/include/se050.h b/core/drivers/crypto/se050/adaptors/include/se050.h index e5f8f662254..85b613bca7a 100644 --- a/core/drivers/crypto/se050/adaptors/include/se050.h +++ b/core/drivers/crypto/se050/adaptors/include/se050.h @@ -34,6 +34,7 @@ #define SE051C_ID 0xA8FA #define SE051W_ID 0xA739 #define SE050F_ID 0xA92A +#define SE052F2_ID 0xB501 TEE_Result se050_core_early_init(struct se050_scp_key *keys); diff --git a/core/drivers/crypto/se050/adaptors/utils/scp_config.c b/core/drivers/crypto/se050/adaptors/utils/scp_config.c index 493dede8419..fcdcf1a3ff0 100644 --- a/core/drivers/crypto/se050/adaptors/utils/scp_config.c +++ b/core/drivers/crypto/se050/adaptors/utils/scp_config.c @@ -43,6 +43,7 @@ static bool scp03_enabled; #define SE051C 12 #define SE051W 13 #define SE050F 14 +#define SE052F2 15 static const struct se050_scp_key se050_default_keys[] = { [SE050A1] = { @@ -165,6 +166,14 @@ static const struct se050_scp_key se050_default_keys[] = { .dek = { 0x86, 0x95, 0x93, 0x23, 0x98, 0x54, 0xDC, 0x0D, 0x86, 0x99, 0x00, 0x50, 0x0C, 0xA7, 0x9C, 0x15, }, }, + [SE052F2] = { + .enc = { 0x3a, 0xe4, 0x41, 0xc7, 0x47, 0xe3, 0x2e, 0xbc, + 0x16, 0xb3, 0xbb, 0x2d, 0x84, 0x3c, 0x6d, 0xd8 }, + .mac = { 0x6c, 0x18, 0xf3, 0xd0, 0x8f, 0xee, 0x1c, 0xb9, + 0x6a, 0x3c, 0x8d, 0xe5, 0xd3, 0x53, 0x8a, 0xaa }, + .dek = { 0xb0, 0xe6, 0xa5, 0x69, 0x7d, 0xbd, 0x92, 0x92, + 0x43, 0xa4, 0x82, 0xcf, 0x9e, 0x4d, 0x65, 0x22 }, + }, }; static sss_status_t get_id_from_ofid(uint32_t ofid, uint32_t *id) @@ -215,6 +224,9 @@ static sss_status_t get_id_from_ofid(uint32_t ofid, uint32_t *id) case SE050F_ID: *id = SE050F; break; + case SE052F2_ID: + *id = SE052F2; + break; default: return kStatus_SSS_Fail; }