TianoCore EDK2 master
|
#include "InternalCryptLib.h"
#include <openssl/evp.h>
#include <openssl/kdf.h>
Go to the source code of this file.
Functions | |
STATIC BOOLEAN | HkdfMdExtractAndExpand (IN CONST EVP_MD *Md, 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) |
STATIC BOOLEAN | HkdfMdExtract (IN CONST EVP_MD *Md, IN CONST UINT8 *Key, IN UINTN KeySize, IN CONST UINT8 *Salt, IN UINTN SaltSize, OUT UINT8 *PrkOut, UINTN PrkOutSize) |
STATIC BOOLEAN | HkdfMdExpand (IN CONST EVP_MD *Md, IN CONST UINT8 *Prk, IN UINTN PrkSize, IN CONST UINT8 *Info, IN UINTN InfoSize, OUT UINT8 *Out, IN UINTN OutSize) |
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) |
BOOLEAN EFIAPI | HkdfSha256Extract (IN CONST UINT8 *Key, IN UINTN KeySize, IN CONST UINT8 *Salt, IN UINTN SaltSize, OUT UINT8 *PrkOut, UINTN PrkOutSize) |
BOOLEAN EFIAPI | HkdfSha256Expand (IN CONST UINT8 *Prk, IN UINTN PrkSize, IN CONST UINT8 *Info, IN UINTN InfoSize, OUT UINT8 *Out, IN UINTN OutSize) |
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) |
BOOLEAN EFIAPI | HkdfSha384Extract (IN CONST UINT8 *Key, IN UINTN KeySize, IN CONST UINT8 *Salt, IN UINTN SaltSize, OUT UINT8 *PrkOut, UINTN PrkOutSize) |
BOOLEAN EFIAPI | HkdfSha384Expand (IN CONST UINT8 *Prk, IN UINTN PrkSize, IN CONST UINT8 *Info, IN UINTN InfoSize, OUT UINT8 *Out, IN UINTN OutSize) |
HMAC-SHA256 KDF Wrapper Implementation over OpenSSL.
Copyright (c) 2018 - 2022, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file CryptHkdf.c.
STATIC BOOLEAN HkdfMdExpand | ( | IN CONST EVP_MD * | Md, |
IN CONST UINT8 * | Prk, | ||
IN UINTN | PrkSize, | ||
IN CONST UINT8 * | Info, | ||
IN UINTN | InfoSize, | ||
OUT UINT8 * | Out, | ||
IN UINTN | OutSize | ||
) |
Derive SHA256 HMAC-based Expand Key Derivation Function (HKDF).
[in] | Md | Message Digest. |
[in] | Prk | Pointer to the user-supplied key. |
[in] | PrkSize | Key size in bytes. |
[in] | Info | Pointer to the application specific info. |
[in] | InfoSize | Info size in bytes. |
[out] | Out | Pointer to buffer to receive hkdf value. |
[in] | OutSize | Size of hkdf bytes to generate. |
TRUE | Hkdf generated successfully. |
FALSE | Hkdf generation failed. |
Definition at line 181 of file CryptHkdf.c.
STATIC BOOLEAN HkdfMdExtract | ( | IN CONST EVP_MD * | Md, |
IN CONST UINT8 * | Key, | ||
IN UINTN | KeySize, | ||
IN CONST UINT8 * | Salt, | ||
IN UINTN | SaltSize, | ||
OUT UINT8 * | PrkOut, | ||
UINTN | PrkOutSize | ||
) |
Derive HMAC-based Extract key Derivation Function (HKDF).
[in] | Md | message digest. |
[in] | Key | Pointer to the user-supplied key. |
[in] | KeySize | key size in bytes. |
[in] | Salt | Pointer to the salt(non-secret) value. |
[in] | SaltSize | salt size in bytes. |
[out] | PrkOut | Pointer to buffer to receive hkdf value. |
[in] | PrkOutSize | size of hkdf bytes to generate. |
true | Hkdf generated successfully. |
false | Hkdf generation failed. |
Definition at line 101 of file CryptHkdf.c.
STATIC BOOLEAN HkdfMdExtractAndExpand | ( | IN CONST EVP_MD * | Md, |
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 | ||
) |
Derive HMAC-based Extract-and-Expand Key Derivation Function (HKDF).
[in] | Md | Message Digest. |
[in] | Key | Pointer to the user-supplied key. |
[in] | KeySize | Key size in bytes. |
[in] | Salt | Pointer to the salt(non-secret) value. |
[in] | SaltSize | Salt size in bytes. |
[in] | Info | Pointer to the application specific info. |
[in] | InfoSize | Info size in bytes. |
[out] | Out | Pointer to buffer to receive hkdf value. |
[in] | OutSize | Size of hkdf bytes to generate. |
TRUE | Hkdf generated successfully. |
FALSE | Hkdf generation failed. |
Definition at line 32 of file CryptHkdf.c.
BOOLEAN EFIAPI HkdfSha256Expand | ( | IN CONST UINT8 * | Prk, |
IN UINTN | PrkSize, | ||
IN CONST UINT8 * | Info, | ||
IN UINTN | InfoSize, | ||
OUT UINT8 * | Out, | ||
IN UINTN | OutSize | ||
) |
Derive SHA256 HMAC-based Expand Key Derivation Function (HKDF).
[in] | Prk | Pointer to the user-supplied key. |
[in] | PrkSize | Key size in bytes. |
[in] | Info | Pointer to the application specific info. |
[in] | InfoSize | Info size in bytes. |
[out] | Out | Pointer to buffer to receive hkdf value. |
[in] | OutSize | Size of hkdf bytes to generate. |
TRUE | Hkdf generated successfully. |
FALSE | Hkdf generation failed. |
Definition at line 315 of file CryptHkdf.c.
BOOLEAN EFIAPI HkdfSha256Extract | ( | IN CONST UINT8 * | Key, |
IN UINTN | KeySize, | ||
IN CONST UINT8 * | Salt, | ||
IN UINTN | SaltSize, | ||
OUT UINT8 * | PrkOut, | ||
UINTN | PrkOutSize | ||
) |
Derive SHA256 HMAC-based Extract key Derivation Function (HKDF).
[in] | Key | Pointer to the user-supplied key. |
[in] | KeySize | key size in bytes. |
[in] | Salt | Pointer to the salt(non-secret) value. |
[in] | SaltSize | salt size in bytes. |
[out] | PrkOut | Pointer to buffer to receive hkdf value. |
[in] | PrkOutSize | size of hkdf bytes to generate. |
true | Hkdf generated successfully. |
false | Hkdf generation failed. |
Definition at line 279 of file CryptHkdf.c.
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 | ||
) |
Derive HMAC-based Extract-and-Expand Key Derivation Function (HKDF).
[in] | Key | Pointer to the user-supplied key. |
[in] | KeySize | Key size in bytes. |
[in] | Salt | Pointer to the salt(non-secret) value. |
[in] | SaltSize | Salt size in bytes. |
[in] | Info | Pointer to the application specific info. |
[in] | InfoSize | Info size in bytes. |
[out] | Out | Pointer to buffer to receive hkdf value. |
[in] | OutSize | Size of hkdf bytes to generate. |
TRUE | Hkdf generated successfully. |
FALSE | Hkdf generation failed. |
Definition at line 249 of file CryptHkdf.c.
BOOLEAN EFIAPI HkdfSha384Expand | ( | IN CONST UINT8 * | Prk, |
IN UINTN | PrkSize, | ||
IN CONST UINT8 * | Info, | ||
IN UINTN | InfoSize, | ||
OUT UINT8 * | Out, | ||
IN UINTN | OutSize | ||
) |
Derive SHA384 HMAC-based Expand Key Derivation Function (HKDF).
[in] | Prk | Pointer to the user-supplied key. |
[in] | PrkSize | Key size in bytes. |
[in] | Info | Pointer to the application specific info. |
[in] | InfoSize | Info size in bytes. |
[out] | Out | Pointer to buffer to receive hkdf value. |
[in] | OutSize | Size of hkdf bytes to generate. |
TRUE | Hkdf generated successfully. |
FALSE | Hkdf generation failed. |
Definition at line 411 of file CryptHkdf.c.
BOOLEAN EFIAPI HkdfSha384Extract | ( | IN CONST UINT8 * | Key, |
IN UINTN | KeySize, | ||
IN CONST UINT8 * | Salt, | ||
IN UINTN | SaltSize, | ||
OUT UINT8 * | PrkOut, | ||
UINTN | PrkOutSize | ||
) |
Derive SHA384 HMAC-based Extract key Derivation Function (HKDF).
[in] | Key | Pointer to the user-supplied key. |
[in] | KeySize | key size in bytes. |
[in] | Salt | Pointer to the salt(non-secret) value. |
[in] | SaltSize | salt size in bytes. |
[out] | PrkOut | Pointer to buffer to receive hkdf value. |
[in] | PrkOutSize | size of hkdf bytes to generate. |
true | Hkdf generated successfully. |
false | Hkdf generation failed. |
Definition at line 375 of file CryptHkdf.c.
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 | ||
) |
Derive SHA384 HMAC-based Extract-and-Expand Key Derivation Function (HKDF).
[in] | Key | Pointer to the user-supplied key. |
[in] | KeySize | Key size in bytes. |
[in] | Salt | Pointer to the salt(non-secret) value. |
[in] | SaltSize | Salt size in bytes. |
[in] | Info | Pointer to the application specific info. |
[in] | InfoSize | Info size in bytes. |
[out] | Out | Pointer to buffer to receive hkdf value. |
[in] | OutSize | Size of hkdf bytes to generate. |
TRUE | Hkdf generated successfully. |
FALSE | Hkdf generation failed. |
Definition at line 345 of file CryptHkdf.c.