Skip to content

Commit 9201b4e

Browse files
authored
Merge pull request #9515 from anhu/salt_len_min
Note that HMAC_FIPS_MIN_KEY is also salt len min for HKDF
2 parents ebbfc2e + cd4f969 commit 9201b4e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

wolfcrypt/src/error.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ const char* wc_GetErrorString(int error)
315315
return "Random Number Generator failed";
316316

317317
case HMAC_MIN_KEYLEN_E:
318-
return "FIPS Mode HMAC Minimum Key Length error";
318+
return "FIPS Mode HMAC Minimum Key or Salt Length error";
319319

320320
case RSA_PAD_E:
321321
return "Rsa Padding error";

wolfssl/wolfcrypt/hmac.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@
6666
#define WC_HMAC_INNER_HASH_KEYED_DEV 2
6767

6868
enum {
69-
HMAC_FIPS_MIN_KEY = 14, /* 112 bit key length minimum */
70-
69+
HMAC_FIPS_MIN_KEY = 14, /* 112 bit key length minimum. Note that this
70+
* minimum also applies to the salt length for
71+
* HKDF. */
7172
IPAD = 0x36,
7273
OPAD = 0x5C,
7374

0 commit comments

Comments
 (0)