]>
git.proxmox.com Git - mirror_edk2.git/blob - CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs5Pbkdf2Null.c
2 PBKDF2 Key Derivation Function Wrapper Implementation which does not provide real
5 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #include "InternalCryptLib.h"
11 #include <openssl/evp.h>
12 #include <openssl/hmac.h>
15 Derives a key from a password using a salt and iteration count, based on PKCS#5 v2.0
16 password based encryption key derivation function PBKDF2, as specified in RFC 2898.
18 Return FALSE to indicate this interface is not supported.
20 @param[in] PasswordLength Length of input password in bytes.
21 @param[in] Password Pointer to the array for the password.
22 @param[in] SaltLength Size of the Salt in bytes.
23 @param[in] Salt Pointer to the Salt.
24 @param[in] IterationCount Number of iterations to perform. Its value should be
25 greater than or equal to 1.
26 @param[in] DigestSize Size of the message digest to be used (eg. SHA256_DIGEST_SIZE).
27 NOTE: DigestSize will be used to determine the hash algorithm.
28 Only SHA1_DIGEST_SIZE or SHA256_DIGEST_SIZE is supported.
29 @param[in] KeyLength Size of the derived key buffer in bytes.
30 @param[out] OutKey Pointer to the output derived key buffer.
32 @retval FALSE This interface is not supported.
38 IN UINTN PasswordLength
,
39 IN CONST CHAR8
*Password
,
42 IN UINTN IterationCount
,