]> git.proxmox.com Git - mirror_edk2.git/blob - CryptoPkg/Library/BaseCryptLib/Kdf/CryptHkdfNull.c
CryptoPkg/BaseCryptLib: Wrap OpenSSL HKDF algorithm
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / Kdf / CryptHkdfNull.c
1 /** @file
2 HMAC-SHA256 KDF Wrapper Implementation which does not provide real capabilities.
3
4 Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #include <Library/BaseCryptLib.h>
10 #include <Library/DebugLib.h>
11
12 /**
13 Derive key data using HMAC-SHA256 based KDF.
14
15 @param[in] Key Pointer to the user-supplied key.
16 @param[in] KeySize Key size in bytes.
17 @param[in] Salt Pointer to the salt(non-secret) value.
18 @param[in] SaltSize Salt size in bytes.
19 @param[in] Info Pointer to the application specific info.
20 @param[in] InfoSize Info size in bytes.
21 @param[Out] Out Pointer to buffer to receive hkdf value.
22 @param[in] OutSize Size of hkdf bytes to generate.
23
24 @retval TRUE Hkdf generated successfully.
25 @retval FALSE Hkdf generation failed.
26
27 **/
28 BOOLEAN
29 EFIAPI
30 HkdfSha256ExtractAndExpand (
31 IN CONST UINT8 *Key,
32 IN UINTN KeySize,
33 IN CONST UINT8 *Salt,
34 IN UINTN SaltSize,
35 IN CONST UINT8 *Info,
36 IN UINTN InfoSize,
37 OUT UINT8 *Out,
38 IN UINTN OutSize
39 )
40 {
41 ASSERT (FALSE);
42 return FALSE;
43 }