From patchwork Tue Feb 21 14:50:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: mohamed.omarasaker@arm.com X-Patchwork-Id: 19936 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB59AC636D7 for ; Tue, 21 Feb 2023 14:51:17 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.43787.1676991072272960705 for ; Tue, 21 Feb 2023 06:51:12 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: mohamed.omarasaker@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C1225106F; Tue, 21 Feb 2023 06:51:54 -0800 (PST) Received: from e126544.cambridge.arm.com (unknown [10.1.199.74]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 357CB3F703; Tue, 21 Feb 2023 06:51:11 -0800 (PST) From: mohamed.omarasaker@arm.com To: meta-arm@lists.yoctoproject.org, Ross.Burton@arm.com Cc: nd@arm.com, Mohamed Omar Asaker Subject: [PATCH 3/3] arm-bsp/trusted-services: corstone1000: Disable SHA512/384 Date: Tue, 21 Feb 2023 14:50:56 +0000 Message-Id: <20230221145056.278981-4-mohamed.omarasaker@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230221145056.278981-1-mohamed.omarasaker@arm.com> References: <20230221145056.278981-1-mohamed.omarasaker@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 21 Feb 2023 14:51:17 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/4432 From: Mohamed Omar Asaker corstone1000 cryptocell (the HW accelerator) doesn't support SHA384/SHA512 Note: TF-Mv1.7 disables the software fallback Signed-off-by: Mohamed Omar Asaker --- ...0003-corstone1000-Disable-SHA512-384.patch | 32 +++++++++++++++++++ .../trusted-services/ts-psa-api-test.inc | 1 + 2 files changed, 33 insertions(+) create mode 100644 meta-arm-bsp/recipes-security/trusted-services/corstone1000/psa-apitest/0003-corstone1000-Disable-SHA512-384.patch diff --git a/meta-arm-bsp/recipes-security/trusted-services/corstone1000/psa-apitest/0003-corstone1000-Disable-SHA512-384.patch b/meta-arm-bsp/recipes-security/trusted-services/corstone1000/psa-apitest/0003-corstone1000-Disable-SHA512-384.patch new file mode 100644 index 00000000..a16bf3e2 --- /dev/null +++ b/meta-arm-bsp/recipes-security/trusted-services/corstone1000/psa-apitest/0003-corstone1000-Disable-SHA512-384.patch @@ -0,0 +1,32 @@ +From abdea43f1de61a0e76b13890cb403f7955998b02 Mon Sep 17 00:00:00 2001 +From: Mohamed Omar Asaker +Date: Thu, 9 Feb 2023 21:06:22 +0000 +Subject: [PATCH] corstone1000: Disable SHA512/384 + +SHA512 and SHA384 is not available on Cryptocell (hardware accelerator) + +Signed-off-by: Mohamed Omar Asaker +Upstream-Status: Inappropriate [Discussions of having these configs + in a separate target is ongoing] +--- + .../targets/tgt_dev_apis_linux/nspe/pal_crypto_config.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/api-tests/platform/targets/tgt_dev_apis_linux/nspe/pal_crypto_config.h b/api-tests/platform/targets/tgt_dev_apis_linux/nspe/pal_crypto_config.h +index 1d9b356..d6d552a 100755 +--- a/api-tests/platform/targets/tgt_dev_apis_linux/nspe/pal_crypto_config.h ++++ b/api-tests/platform/targets/tgt_dev_apis_linux/nspe/pal_crypto_config.h +@@ -272,8 +272,8 @@ + #define ARCH_TEST_SHA256 + #ifndef TF_M_PROFILE_SMALL + #ifndef TF_M_PROFILE_MEDIUM +-#define ARCH_TEST_SHA384 +-#define ARCH_TEST_SHA512 ++// #define ARCH_TEST_SHA384 ++// #define ARCH_TEST_SHA512 + #endif + #endif + //#define ARCH_TEST_SHA512_224 +-- +2.25.1 + diff --git a/meta-arm-bsp/recipes-security/trusted-services/ts-psa-api-test.inc b/meta-arm-bsp/recipes-security/trusted-services/ts-psa-api-test.inc index 261d8e1a..c9b1c784 100644 --- a/meta-arm-bsp/recipes-security/trusted-services/ts-psa-api-test.inc +++ b/meta-arm-bsp/recipes-security/trusted-services/ts-psa-api-test.inc @@ -5,4 +5,5 @@ include ts-arm-platforms.inc SRC_URI:append:corstone1000 = " \ file://0001-corstone1000-port-crypto-config.patch;patchdir=../psatest \ file://0002-corstone1000-Disable-obsolete-algorithms.patch;patchdir=../psatest \ + file://0003-corstone1000-Disable-SHA512-384.patch;patchdir=../psatest \ "