TianoCore EDK2 master
Loading...
Searching...
No Matches
CryptHkdfNull.c File Reference

Go to the source code of this file.

Functions

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)
 

Detailed Description

HMAC-SHA256 KDF Wrapper Implementation which does not provide real capabilities.

Copyright (c) 2023, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file CryptHkdfNull.c.

Function Documentation

◆ HkdfSha256Expand()

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).

Parameters
[in]PrkPointer to the user-supplied key.
[in]PrkSizeKey size in bytes.
[in]InfoPointer to the application specific info.
[in]InfoSizeInfo size in bytes.
[out]OutPointer to buffer to receive hkdf value.
[in]OutSizeSize of hkdf bytes to generate.
Return values
TRUEHkdf generated successfully.
FALSEHkdf generation failed.

Definition at line 90 of file CryptHkdfNull.c.

◆ HkdfSha256Extract()

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).

Parameters
[in]KeyPointer to the user-supplied key.
[in]KeySizekey size in bytes.
[in]SaltPointer to the salt(non-secret) value.
[in]SaltSizesalt size in bytes.
[out]PrkOutPointer to buffer to receive hkdf value.
[in]PrkOutSizesize of hkdf bytes to generate.
Return values
trueHkdf generated successfully.
falseHkdf generation failed.

Definition at line 61 of file CryptHkdfNull.c.

◆ HkdfSha256ExtractAndExpand()

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 key data using HMAC-SHA256 based KDF.

Parameters
[in]KeyPointer to the user-supplied key.
[in]KeySizeKey size in bytes.
[in]SaltPointer to the salt(non-secret) value.
[in]SaltSizeSalt size in bytes.
[in]InfoPointer to the application specific info.
[in]InfoSizeInfo size in bytes.
[out]OutPointer to buffer to receive hkdf value.
[in]OutSizeSize of hkdf bytes to generate.
Return values
TRUEHkdf generated successfully.
FALSEHkdf generation failed.

Definition at line 30 of file CryptHkdfNull.c.

◆ HkdfSha384Expand()

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).

Parameters
[in]PrkPointer to the user-supplied key.
[in]PrkSizeKey size in bytes.
[in]InfoPointer to the application specific info.
[in]InfoSizeInfo size in bytes.
[out]OutPointer to buffer to receive hkdf value.
[in]OutSizeSize of hkdf bytes to generate.
Return values
TRUEHkdf generated successfully.
FALSEHkdf generation failed.

Definition at line 181 of file CryptHkdfNull.c.

◆ HkdfSha384Extract()

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).

Parameters
[in]KeyPointer to the user-supplied key.
[in]KeySizekey size in bytes.
[in]SaltPointer to the salt(non-secret) value.
[in]SaltSizesalt size in bytes.
[out]PrkOutPointer to buffer to receive hkdf value.
[in]PrkOutSizesize of hkdf bytes to generate.
Return values
trueHkdf generated successfully.
falseHkdf generation failed.

Definition at line 152 of file CryptHkdfNull.c.

◆ HkdfSha384ExtractAndExpand()

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).

Parameters
[in]KeyPointer to the user-supplied key.
[in]KeySizeKey size in bytes.
[in]SaltPointer to the salt(non-secret) value.
[in]SaltSizeSalt size in bytes.
[in]InfoPointer to the application specific info.
[in]InfoSizeInfo size in bytes.
[out]OutPointer to buffer to receive hkdf value.
[in]OutSizeSize of hkdf bytes to generate.
Return values
TRUEHkdf generated successfully.
FALSEHkdf generation failed.

Definition at line 121 of file CryptHkdfNull.c.