From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web10.1582.1603910579343711241 for ; Wed, 28 Oct 2020 11:42:59 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: christopher.j.zurcher@intel.com) IronPort-SDR: GeFKA3w912E/QkT44HidPNTitZBAIC7CLbbM8njeai+5W1junIUgKT237nlGzY3ISSHw0ZNU4p 7IY+tSjEZYfg== X-IronPort-AV: E=McAfee;i="6000,8403,9788"; a="168416927" X-IronPort-AV: E=Sophos;i="5.77,427,1596524400"; d="scan'208";a="168416927" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2020 11:42:58 -0700 IronPort-SDR: 2RQsxbsIajEVe6UQXnXZdfgB9gq0wMq3UjLM2DwiMIc7iD5wT2vxgHLPBcjcxbrBwIdx0Xikrc A3mvOe7mJ3KA== X-IronPort-AV: E=Sophos;i="5.77,427,1596524400"; d="scan'208";a="526435486" Received: from cjzurch-desk.amr.corp.intel.com ([10.9.70.181]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2020 11:42:58 -0700 From: "Zurcher, Christopher J" To: devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Xiaoyu Lu , Guomin Jiang , Sung-Uk Bin , Ard Biesheuvel Subject: [PATCH 0/1] CryptoPkg/BaseCryptLib: Add EVP implementation for CryptAes.c Date: Wed, 28 Oct 2020 11:42:53 -0700 Message-Id: <20201028184254.6923-1-christopher.j.zurcher@intel.com> X-Mailer: git-send-email 2.28.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2507 This patch provides a drop-in replacement for CryptAes.c which utilizes the EVP interface to OpenSSL. This enables access to the assembly-optimized algorithms. This patch has been unit-tested in both VS and CLANG build environments using both an X64 assembly-optimized implementation of OpensslLib and the standard implementation. Usage of this file does not require an assembly-optimized implementation of OpensslLib to function; it does however require one to provide a speed improvement. The C-only AES implementation included by CryptAes.c is extremely small, and since this file includes the EVP interface, it will significantly increase the size of any module that includes it. As a result, I have not replaced the original CryptAes.c as a default in any of the CryptLib implementations. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Cc: Sung-Uk Bin Cc: Ard Biesheuvel Christopher J Zurcher (1): CryptoPkg/BaseCryptLib: Add EVP implementation for CryptAes.c CryptoPkg/Library/BaseCryptLib/Cipher/CryptAesEvp.c | 262 ++++++++++++++++++++ 1 file changed, 262 insertions(+) create mode 100644 CryptoPkg/Library/BaseCryptLib/Cipher/CryptAesEvp.c -- 2.28.0.windows.1