Merge pull request #9515 from anhu/salt_len_min

Note that HMAC_FIPS_MIN_KEY is also salt len min for HKDF
This commit is contained in:
Daniel Pouzzner
2025-12-11 13:03:06 -06:00
committed by GitHub
2 changed files with 4 additions and 3 deletions

View File

@@ -315,7 +315,7 @@ const char* wc_GetErrorString(int error)
return "Random Number Generator failed";
case HMAC_MIN_KEYLEN_E:
return "FIPS Mode HMAC Minimum Key Length error";
return "FIPS Mode HMAC Minimum Key or Salt Length error";
case RSA_PAD_E:
return "Rsa Padding error";

View File

@@ -66,8 +66,9 @@
#define WC_HMAC_INNER_HASH_KEYED_DEV 2
enum {
HMAC_FIPS_MIN_KEY = 14, /* 112 bit key length minimum */
HMAC_FIPS_MIN_KEY = 14, /* 112 bit key length minimum. Note that this
* minimum also applies to the salt length for
* HKDF. */
IPAD = 0x36,
OPAD = 0x5C,