PSA_ALG_HKDF_EXPAND macro
Macro to build an HKDF-Expand algorithm. For example, `PSA_ALG_HKDF_EXPAND(PSA_ALG_SHA_256)` is HKDF-Expand using HMAC-SHA-256. This key derivation algorithm uses the following inputs: - PSA_KEY_DERIVATION_INPUT_SECRET is the pseudorandom key (PRK). - PSA_KEY_DERIVATION_INPUT_INFO is the info string. The inputs are mandatory and must be passed in the order above. Each input may only be passed once. \warning HKDF-Expand is not meant to be used on its own. `PSA_ALG_HKDF` should be used instead if possible. `PSA_ALG_HKDF_EXPAND` is provided as a separate algorithm for the sake of protocols that use it as a building block. It may also be a slight performance optimization in applications that use HKDF with the same salt and key but many different info strings.
Syntax
#define PSA_ALG_HKDF_EXPAND(hash_alg) \
(PSA_ALG_HKDF_EXPAND_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))
Arguments
hash_alg
A hash algorithm (\c PSA_ALG_XXX value such that #PSA_ALG_IS_HASH(\p hash_alg) is true).
Return value
The corresponding HKDF-Expand algorithm. Unspecified if \p hash_alg is not a supported hash algorithm.
![]()
#define PSA_ALG_HKDF_EXPAND(hash_alg) \