From nobody Mon Feb 9 23:39:09 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+108123+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+108123+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1693381956; cv=none; d=zohomail.com; s=zohoarc; b=NdyPXk8KYvEDzUwTNhgkCbEccLWVb0AbxF38BCi6iCzhOAH74QZJeDmPgOTCCJHAhxiWc82GkhpwO+qFdF0onUPUlx5Bx1pzHBRIUgIUkC2lVAvla4m+flhr6R/ZgT9lZLk28xTJJR+IfqMVbV49SZ1ll+wGocWCmcvqiDFpRSs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693381956; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=L7OMsvvhe6JpoaxsIsgvjU0c1a/5qoD5jQrim2bihmk=; b=SkPiNIv23RD5hz1NufF22dY3VzYCFuVP9iYFWHccVvwYD5KuOMoOGNmeOXrAL17t89fWOIFu4aFA5Xa05/cMGXwR8k0JupkK2c9PL4vMTiecuM3fOVcGlnjpti5WqVzsLV/3+kHU5omHaKVfzuQ5C0JZnsOOF6F047gKA+WojM4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+108123+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1693381956761313.9993872452317; Wed, 30 Aug 2023 00:52:36 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=JhBeexAYqe+wkZxCdk2YgNlR+zvWpjCrCmzAUSpnHWA=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1693381956; v=1; b=EnATU5lDnHEtB4noT3LL3Ot26omoAvsUeOjZDQrb12WwjpdzwwWUmvYn28sV2ZbCTNxcQP/a zKnZLEhOoOA4+aokmRAKi78synxh2BO5RyvRd7yVudpygIu1cN6v785NAdDrZC5OWKReMG2/W+c oyxACvq0oiEYI0n1gJ1+NaX4= X-Received: by 127.0.0.2 with SMTP id bQD0YY1788612xWrJSO8kWhR; Wed, 30 Aug 2023 00:52:36 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.9013.1693381945374772998 for ; Wed, 30 Aug 2023 00:52:35 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10817"; a="378289191" X-IronPort-AV: E=Sophos;i="6.02,212,1688454000"; d="scan'208";a="378289191" X-Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2023 00:52:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10817"; a="742139756" X-IronPort-AV: E=Sophos;i="6.02,212,1688454000"; d="scan'208";a="742139756" X-Received: from shwdejointd777.ccr.corp.intel.com ([10.239.58.116]) by fmsmga007.fm.intel.com with ESMTP; 30 Aug 2023 00:52:29 -0700 From: "Wenxing Hou" To: devel@edk2.groups.io Cc: Jiewen Yao , Yi Li , Xiaoyu Lu , Guomin Jiang Subject: [edk2-devel] [edk2/add_mbedtls PATCH 4/9] CryptoPkg: Add HKDF functions based on Mbedtls Date: Wed, 30 Aug 2023 15:52:15 +0800 Message-Id: <20230830075220.2070-5-wenxing.hou@intel.com> In-Reply-To: <20230830075220.2070-1-wenxing.hou@intel.com> References: <20230830075220.2070-1-wenxing.hou@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,wenxing.hou@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: jhIl92eWG3gs4RXsbg5yXYQTx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1693381957576100001 Content-Type: text/plain; charset="utf-8" Add HKDF APIs. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4177 Cc: Jiewen Yao cc: Yi Li Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Wenxing Hou --- .../BaseCryptLibMbedTls/Kdf/CryptHkdf.c | 372 ++++++++++++++++++ .../BaseCryptLibMbedTls/Kdf/CryptHkdfNull.c | 192 +++++++++ 2 files changed, 564 insertions(+) create mode 100644 CryptoPkg/Library/BaseCryptLibMbedTls/Kdf/CryptHkdf.c create mode 100644 CryptoPkg/Library/BaseCryptLibMbedTls/Kdf/CryptHkdfNull= .c diff --git a/CryptoPkg/Library/BaseCryptLibMbedTls/Kdf/CryptHkdf.c b/Crypto= Pkg/Library/BaseCryptLibMbedTls/Kdf/CryptHkdf.c new file mode 100644 index 0000000000..5bc632deb9 --- /dev/null +++ b/CryptoPkg/Library/BaseCryptLibMbedTls/Kdf/CryptHkdf.c @@ -0,0 +1,372 @@ +/** @file + HMAC-SHA256 KDF Wrapper Implementation over MbedTLS. + + RFC 5869: HMAC-based Extract-and-Expand Key Derivation Function (HKDF) + +Copyright (c) 2023, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include "InternalCryptLib.h" +#include + +/** + Derive HMAC-based Extract-and-Expand Key Derivation Function (HKDF). + + @param[in] MdType Message Digest Type. + @param[in] Key Pointer to the user-supplied key. + @param[in] KeySize Key size in bytes. + @param[in] Salt Pointer to the salt(non-secret) value. + @param[in] SaltSize Salt size in bytes. + @param[in] Info Pointer to the application specific info. + @param[in] InfoSize Info size in bytes. + @param[out] Out Pointer to buffer to receive hkdf value. + @param[in] OutSize Size of hkdf bytes to generate. + + @retval TRUE Hkdf generated successfully. + @retval FALSE Hkdf generation failed. + +**/ +STATIC +BOOLEAN +HkdfMdExtractAndExpand ( + IN mbedtls_md_type_t MdType, + IN CONST UINT8 *Key, + IN UINTN KeySize, + IN CONST UINT8 *Salt, + IN UINTN SaltSize, + IN CONST UINT8 *Info, + IN UINTN InfoSize, + OUT UINT8 *Out, + IN UINTN OutSize + ) +{ + const mbedtls_md_info_t *md; + INT32 Ret; + + if ((Key =3D=3D NULL) || (Salt =3D=3D NULL) || (Info =3D=3D NULL) || (Ou= t =3D=3D NULL) || + (KeySize > INT_MAX) || (SaltSize > INT_MAX) || (InfoSize > INT_MAX) = || (OutSize > INT_MAX)) + { + return FALSE; + } + + md =3D mbedtls_md_info_from_type (MdType); + ASSERT (md !=3D NULL); + + Ret =3D mbedtls_hkdf (md, Salt, (UINT32)SaltSize, Key, (UINT32)KeySize, = Info, (UINT32)InfoSize, Out, (UINT32)OutSize); + if (Ret !=3D 0) { + return FALSE; + } + + return TRUE; +} + +/** + Derive HMAC-based Extract Key Derivation Function (HKDF). + + @param[in] MdType Message Digest Type. + @param[in] Key Pointer to the user-supplied key. + @param[in] KeySize Key size in bytes. + @param[in] Salt Pointer to the salt(non-secret) value. + @param[in] SaltSize Salt size in bytes. + @param[out] PrkOut Pointer to buffer to receive hkdf value. + @param[in] PrkOutSize Size of hkdf bytes to generate. + + @retval TRUE Hkdf generated successfully. + @retval FALSE Hkdf generation failed. + +**/ +STATIC +BOOLEAN +HkdfMdExtract ( + IN mbedtls_md_type_t MdType, + IN CONST UINT8 *Key, + IN UINTN KeySize, + IN CONST UINT8 *Salt, + IN UINTN SaltSize, + OUT UINT8 *PrkOut, + IN UINTN PrkOutSize + ) +{ + const mbedtls_md_info_t *md; + INT32 Ret; + UINTN MdSize; + + if ((Key =3D=3D NULL) || (Salt =3D=3D NULL) || (PrkOut =3D=3D NULL) || + (KeySize > INT_MAX) || (SaltSize > INT_MAX) || (PrkOutSize > INT_MAX= )) + { + return FALSE; + } + + MdSize =3D 0; + switch (MdType) { + case MBEDTLS_MD_SHA256: + MdSize =3D SHA256_DIGEST_SIZE; + break; + case MBEDTLS_MD_SHA384: + MdSize =3D SHA384_DIGEST_SIZE; + break; + case MBEDTLS_MD_SHA512: + MdSize =3D SHA512_DIGEST_SIZE; + break; + default: + return FALSE; + } + + if (PrkOutSize !=3D MdSize) { + return FALSE; + } + + md =3D mbedtls_md_info_from_type (MdType); + ASSERT (md !=3D NULL); + + Ret =3D mbedtls_hkdf_extract (md, Salt, (UINT32)SaltSize, Key, (UINT32)K= eySize, PrkOut); + if (Ret !=3D 0) { + return FALSE; + } + + return TRUE; +} + +/** + Derive HMAC-based Expand Key Derivation Function (HKDF). + + @param[in] MdType Message Digest Type. + @param[in] Prk Pointer to the user-supplied key. + @param[in] PrkSize Key size in bytes. + @param[in] Info Pointer to the application specific info. + @param[in] InfoSize Info size in bytes. + @param[out] Out Pointer to buffer to receive hkdf value. + @param[in] OutSize Size of hkdf bytes to generate. + + @retval TRUE Hkdf generated successfully. + @retval FALSE Hkdf generation failed. + +**/ +STATIC +BOOLEAN +HkdfMdExpand ( + IN mbedtls_md_type_t MdType, + IN CONST UINT8 *Prk, + IN UINTN PrkSize, + IN CONST UINT8 *Info, + IN UINTN InfoSize, + OUT UINT8 *Out, + IN UINTN OutSize + ) +{ + const mbedtls_md_info_t *md; + INT32 Ret; + UINTN MdSize; + + if ((Prk =3D=3D NULL) || (Info =3D=3D NULL) || (Out =3D=3D NULL) || + (PrkSize > INT_MAX) || (InfoSize > INT_MAX) || (OutSize > INT_MAX)) + { + return FALSE; + } + + switch (MdType) { + case MBEDTLS_MD_SHA256: + MdSize =3D SHA256_DIGEST_SIZE; + break; + case MBEDTLS_MD_SHA384: + MdSize =3D SHA384_DIGEST_SIZE; + break; + case MBEDTLS_MD_SHA512: + MdSize =3D SHA512_DIGEST_SIZE; + break; + default: + return FALSE; + } + + if (PrkSize !=3D MdSize) { + return FALSE; + } + + md =3D mbedtls_md_info_from_type (MdType); + ASSERT (md !=3D NULL); + + Ret =3D mbedtls_hkdf_expand (md, Prk, (UINT32)PrkSize, Info, (UINT32)Inf= oSize, Out, (UINT32)OutSize); + if (Ret !=3D 0) { + return FALSE; + } + + return TRUE; +} + +/** + Derive SHA256 HMAC-based Extract-and-Expand Key Derivation Function (HKD= F). + + @param[in] Key Pointer to the user-supplied key. + @param[in] KeySize Key size in bytes. + @param[in] Salt Pointer to the salt(non-secret) value. + @param[in] SaltSize Salt size in bytes. + @param[in] Info Pointer to the application specific info. + @param[in] InfoSize Info size in bytes. + @param[out] Out Pointer to buffer to receive hkdf value. + @param[in] OutSize Size of hkdf bytes to generate. + + @retval TRUE Hkdf generated successfully. + @retval FALSE Hkdf generation failed. + +**/ +BOOLEAN +EFIAPI +HkdfSha256ExtractAndExpand ( + IN CONST UINT8 *Key, + IN UINTN KeySize, + IN CONST UINT8 *Salt, + IN UINTN SaltSize, + IN CONST UINT8 *Info, + IN UINTN InfoSize, + OUT UINT8 *Out, + IN UINTN OutSize + ) +{ + return HkdfMdExtractAndExpand (MBEDTLS_MD_SHA256, Key, KeySize, Salt, Sa= ltSize, Info, InfoSize, Out, OutSize); +} + +/** + Derive SHA256 HMAC-based Extract Key Derivation Function (HKDF). + + @param[in] Key Pointer to the user-supplied key. + @param[in] KeySize Key size in bytes. + @param[in] Salt Pointer to the salt(non-secret) value. + @param[in] SaltSize Salt size in bytes. + @param[out] PrkOut Pointer to buffer to receive hkdf value. + @param[in] PrkOutSize Size of hkdf bytes to generate. + + @retval TRUE Hkdf generated successfully. + @retval FALSE Hkdf generation failed. + +**/ +BOOLEAN +EFIAPI +HkdfSha256Extract ( + IN CONST UINT8 *Key, + IN UINTN KeySize, + IN CONST UINT8 *Salt, + IN UINTN SaltSize, + OUT UINT8 *PrkOut, + IN UINTN PrkOutSize + ) +{ + return HkdfMdExtract (MBEDTLS_MD_SHA256, Key, KeySize, Salt, SaltSize, P= rkOut, PrkOutSize); +} + +/** + Derive SHA256 HMAC-based Expand Key Derivation Function (HKDF). + + @param[in] Prk Pointer to the user-supplied key. + @param[in] PrkSize Key size in bytes. + @param[in] Info Pointer to the application specific info. + @param[in] InfoSize Info size in bytes. + @param[out] Out Pointer to buffer to receive hkdf value. + @param[in] OutSize Size of hkdf bytes to generate. + + @retval TRUE Hkdf generated successfully. + @retval FALSE Hkdf generation failed. + +**/ +BOOLEAN +EFIAPI +HkdfSha256Expand ( + IN CONST UINT8 *Prk, + IN UINTN PrkSize, + IN CONST UINT8 *Info, + IN UINTN InfoSize, + OUT UINT8 *Out, + IN UINTN OutSize + ) +{ + return HkdfMdExpand (MBEDTLS_MD_SHA256, Prk, PrkSize, Info, InfoSize, Ou= t, OutSize); +} + +/** + Derive SHA384 HMAC-based Extract-and-Expand Key Derivation Function (HKD= F). + + @param[in] Key Pointer to the user-supplied key. + @param[in] KeySize Key size in bytes. + @param[in] Salt Pointer to the salt(non-secret) value. + @param[in] SaltSize Salt size in bytes. + @param[in] Info Pointer to the application specific info. + @param[in] InfoSize Info size in bytes. + @param[out] Out Pointer to buffer to receive hkdf value. + @param[in] OutSize Size of hkdf bytes to generate. + + @retval TRUE Hkdf generated successfully. + @retval FALSE Hkdf generation failed. + +**/ +BOOLEAN +EFIAPI +HkdfSha384ExtractAndExpand ( + IN CONST UINT8 *Key, + IN UINTN KeySize, + IN CONST UINT8 *Salt, + IN UINTN SaltSize, + IN CONST UINT8 *Info, + IN UINTN InfoSize, + OUT UINT8 *Out, + IN UINTN OutSize + ) +{ + return HkdfMdExtractAndExpand (MBEDTLS_MD_SHA384, Key, KeySize, Salt, Sa= ltSize, Info, InfoSize, Out, OutSize); +} + +/** + Derive SHA384 HMAC-based Extract Key Derivation Function (HKDF). + + @param[in] Key Pointer to the user-supplied key. + @param[in] KeySize Key size in bytes. + @param[in] Salt Pointer to the salt(non-secret) value. + @param[in] SaltSize Salt size in bytes. + @param[out] PrkOut Pointer to buffer to receive hkdf value. + @param[in] PrkOutSize Size of hkdf bytes to generate. + + @retval TRUE Hkdf generated successfully. + @retval FALSE Hkdf generation failed. + +**/ +BOOLEAN +EFIAPI +HkdfSha384Extract ( + IN CONST UINT8 *Key, + IN UINTN KeySize, + IN CONST UINT8 *Salt, + IN UINTN SaltSize, + OUT UINT8 *PrkOut, + IN UINTN PrkOutSize + ) +{ + return HkdfMdExtract (MBEDTLS_MD_SHA384, Key, KeySize, Salt, SaltSize, P= rkOut, PrkOutSize); +} + +/** + Derive SHA384 HMAC-based Expand Key Derivation Function (HKDF). + + @param[in] Prk Pointer to the user-supplied key. + @param[in] PrkSize Key size in bytes. + @param[in] Info Pointer to the application specific info. + @param[in] InfoSize Info size in bytes. + @param[out] Out Pointer to buffer to receive hkdf value. + @param[in] OutSize Size of hkdf bytes to generate. + + @retval TRUE Hkdf generated successfully. + @retval FALSE Hkdf generation failed. + +**/ +BOOLEAN +EFIAPI +HkdfSha384Expand ( + IN CONST UINT8 *Prk, + IN UINTN PrkSize, + IN CONST UINT8 *Info, + IN UINTN InfoSize, + OUT UINT8 *Out, + IN UINTN OutSize + ) +{ + return HkdfMdExpand (MBEDTLS_MD_SHA384, Prk, PrkSize, Info, InfoSize, Ou= t, OutSize); +} diff --git a/CryptoPkg/Library/BaseCryptLibMbedTls/Kdf/CryptHkdfNull.c b/Cr= yptoPkg/Library/BaseCryptLibMbedTls/Kdf/CryptHkdfNull.c new file mode 100644 index 0000000000..8ec29b314a --- /dev/null +++ b/CryptoPkg/Library/BaseCryptLibMbedTls/Kdf/CryptHkdfNull.c @@ -0,0 +1,192 @@ +/** @file + HMAC-SHA256 KDF Wrapper Implementation which does not provide real capab= ilities. + +Copyright (c) 2023, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include + +/** + Derive key data using HMAC-SHA256 based KDF. + + @param[in] Key Pointer to the user-supplied key. + @param[in] KeySize Key size in bytes. + @param[in] Salt Pointer to the salt(non-secret) value. + @param[in] SaltSize Salt size in bytes. + @param[in] Info Pointer to the application specific info. + @param[in] InfoSize Info size in bytes. + @param[out] Out Pointer to buffer to receive hkdf value. + @param[in] OutSize Size of hkdf bytes to generate. + + @retval TRUE Hkdf generated successfully. + @retval FALSE Hkdf generation failed. + +**/ +BOOLEAN +EFIAPI +HkdfSha256ExtractAndExpand ( + IN CONST UINT8 *Key, + IN UINTN KeySize, + IN CONST UINT8 *Salt, + IN UINTN SaltSize, + IN CONST UINT8 *Info, + IN UINTN InfoSize, + OUT UINT8 *Out, + IN UINTN OutSize + ) +{ + ASSERT (FALSE); + return FALSE; +} + +/** + Derive SHA256 HMAC-based Extract key Derivation Function (HKDF). + + @param[in] Key Pointer to the user-supplied key. + @param[in] KeySize key size in bytes. + @param[in] Salt Pointer to the salt(non-secret) value. + @param[in] SaltSize salt size in bytes. + @param[out] PrkOut Pointer to buffer to receive hkdf value. + @param[in] PrkOutSize size of hkdf bytes to generate. + + @retval true Hkdf generated successfully. + @retval false Hkdf generation failed. + +**/ +BOOLEAN +EFIAPI +HkdfSha256Extract ( + IN CONST UINT8 *Key, + IN UINTN KeySize, + IN CONST UINT8 *Salt, + IN UINTN SaltSize, + OUT UINT8 *PrkOut, + UINTN PrkOutSize + ) +{ + ASSERT (FALSE); + return FALSE; +} + +/** + Derive SHA256 HMAC-based Expand Key Derivation Function (HKDF). + + @param[in] Prk Pointer to the user-supplied key. + @param[in] PrkSize Key size in bytes. + @param[in] Info Pointer to the application specific info. + @param[in] InfoSize Info size in bytes. + @param[out] Out Pointer to buffer to receive hkdf value. + @param[in] OutSize Size of hkdf bytes to generate. + + @retval TRUE Hkdf generated successfully. + @retval FALSE Hkdf generation failed. + +**/ +BOOLEAN +EFIAPI +HkdfSha256Expand ( + IN CONST UINT8 *Prk, + IN UINTN PrkSize, + IN CONST UINT8 *Info, + IN UINTN InfoSize, + OUT UINT8 *Out, + IN UINTN OutSize + ) +{ + ASSERT (FALSE); + return FALSE; +} + +/** + Derive SHA384 HMAC-based Extract-and-Expand Key Derivation Function (HKD= F). + + @param[in] Key Pointer to the user-supplied key. + @param[in] KeySize Key size in bytes. + @param[in] Salt Pointer to the salt(non-secret) value. + @param[in] SaltSize Salt size in bytes. + @param[in] Info Pointer to the application specific info. + @param[in] InfoSize Info size in bytes. + @param[out] Out Pointer to buffer to receive hkdf value. + @param[in] OutSize Size of hkdf bytes to generate. + + @retval TRUE Hkdf generated successfully. + @retval FALSE Hkdf generation failed. + +**/ +BOOLEAN +EFIAPI +HkdfSha384ExtractAndExpand ( + IN CONST UINT8 *Key, + IN UINTN KeySize, + IN CONST UINT8 *Salt, + IN UINTN SaltSize, + IN CONST UINT8 *Info, + IN UINTN InfoSize, + OUT UINT8 *Out, + IN UINTN OutSize + ) +{ + ASSERT (FALSE); + return FALSE; +} + +/** + Derive SHA384 HMAC-based Extract key Derivation Function (HKDF). + + @param[in] Key Pointer to the user-supplied key. + @param[in] KeySize key size in bytes. + @param[in] Salt Pointer to the salt(non-secret) value. + @param[in] SaltSize salt size in bytes. + @param[out] PrkOut Pointer to buffer to receive hkdf value. + @param[in] PrkOutSize size of hkdf bytes to generate. + + @retval true Hkdf generated successfully. + @retval false Hkdf generation failed. + +**/ +BOOLEAN +EFIAPI +HkdfSha384Extract ( + IN CONST UINT8 *Key, + IN UINTN KeySize, + IN CONST UINT8 *Salt, + IN UINTN SaltSize, + OUT UINT8 *PrkOut, + UINTN PrkOutSize + ) +{ + ASSERT (FALSE); + return FALSE; +} + +/** + Derive SHA384 HMAC-based Expand Key Derivation Function (HKDF). + + @param[in] Prk Pointer to the user-supplied key. + @param[in] PrkSize Key size in bytes. + @param[in] Info Pointer to the application specific info. + @param[in] InfoSize Info size in bytes. + @param[out] Out Pointer to buffer to receive hkdf value. + @param[in] OutSize Size of hkdf bytes to generate. + + @retval TRUE Hkdf generated successfully. + @retval FALSE Hkdf generation failed. + +**/ +BOOLEAN +EFIAPI +HkdfSha384Expand ( + IN CONST UINT8 *Prk, + IN UINTN PrkSize, + IN CONST UINT8 *Info, + IN UINTN InfoSize, + OUT UINT8 *Out, + IN UINTN OutSize + ) +{ + ASSERT (FALSE); + return FALSE; +} --=20 2.26.2.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108123): https://edk2.groups.io/g/devel/message/108123 Mute This Topic: https://groups.io/mt/101048099/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-