From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.12769.1656515272206163448 for ; Wed, 29 Jun 2022 08:07:52 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pierre.gondois@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 27EFC1764; Wed, 29 Jun 2022 08:07:52 -0700 (PDT) Received: from pierre123.arm.com (unknown [10.57.42.208]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1164B3F792; Wed, 29 Jun 2022 08:07:49 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Leif Lindholm , Ard Biesheuvel , Rebecca Cran , Michael D Kinney , Liming Gao , Edward Pickup Subject: [PATCH v1 0/7] Add AesLib and ArmAesLib Date: Wed, 29 Jun 2022 17:07:06 +0200 Message-Id: <20220629150713.2600465-1-Pierre.Gondois@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Pierre Gondois Bugzilla: Bug 3970 (https://bugzilla.tianocore.org/show_bug.cgi?id=3D3970= ) To fasten AES encryption/decryption process or create a Deterministic Random Bits Generator (Drbg), add a library using Arm's AES instructions (AESE AESD, AESMC, AESIMC). The test vectors available in the CTR_DRBG_AES256 sections of https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Standards-and-Gui= delines/documents/examples/CTR_DRBG_noDF.pdf were used for validation. Indeed, the Drbg implementation in a following patch-set relies on the AES encryption. This patch-set can seen at: https://github.com/PierreARM/edk2/tree/Arm_Aes_v1 This patch has the following dependency: - [PATCH v3 00/22] Add Raw algorithm support using Arm FW-TRNG interface https://edk2.groups.io/g/devel/message/90845 Pierre Gondois (7): ArmPkg: Update Armpkg.ci.yaml ArmPkg/ArmDisassemblerLib: Replace RotateRight() ArmPkg/ArmLib: Add ArmReadIdIsaR5() helper ArmPkg/ArmLib: Add ArmHasAesExt() MdePkg/AesLib: Definition for AES library class interface MdePkg/AesLib: Add NULL instance of AesLib ArmPkg/ArmAesLib: Add ArmAesLib ArmPkg/ArmPkg.ci.yaml | 1 + ArmPkg/ArmPkg.dsc | 3 +- ArmPkg/Include/Library/ArmLib.h | 12 +- .../Library/ArmAesLib/AArch64/AArch64AesLib.S | 183 ++++++++++++ ArmPkg/Library/ArmAesLib/Arm/ArmAesLib.S | 183 ++++++++++++ ArmPkg/Library/ArmAesLib/ArmAesLib.c | 261 ++++++++++++++++++ ArmPkg/Library/ArmAesLib/ArmAesLib.h | 96 +++++++ ArmPkg/Library/ArmAesLib/ArmAesLib.inf | 34 +++ .../ArmDisassemblerLib/ArmDisassembler.c | 11 +- ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c | 13 + ArmPkg/Library/ArmLib/AArch64/AArch64Lib.h | 1 + ArmPkg/Library/ArmLib/Arm/ArmLibSupport.S | 7 +- ArmPkg/Library/ArmLib/Arm/ArmV7Lib.c | 13 + ArmPkg/Library/ArmLib/Arm/ArmV7Lib.h | 13 + MdePkg/Include/Library/AesLib.h | 104 +++++++ MdePkg/Library/AesLibNull/AesLibNull.c | 87 ++++++ MdePkg/Library/AesLibNull/AesLibNull.inf | 24 ++ MdePkg/MdePkg.dec | 4 + MdePkg/MdePkg.dsc | 1 + 19 files changed, 1038 insertions(+), 13 deletions(-) create mode 100644 ArmPkg/Library/ArmAesLib/AArch64/AArch64AesLib.S create mode 100644 ArmPkg/Library/ArmAesLib/Arm/ArmAesLib.S create mode 100644 ArmPkg/Library/ArmAesLib/ArmAesLib.c create mode 100644 ArmPkg/Library/ArmAesLib/ArmAesLib.h create mode 100644 ArmPkg/Library/ArmAesLib/ArmAesLib.inf create mode 100644 MdePkg/Include/Library/AesLib.h create mode 100644 MdePkg/Library/AesLibNull/AesLibNull.c create mode 100644 MdePkg/Library/AesLibNull/AesLibNull.inf --=20 2.25.1