You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Agree @filip26 need to give either a recommendation or requirement here. Was just looking over my test vector code the other day and was wondering about this same issue.
The key for HMAC can be of any length (keys longer than B bytes are
first hashed using H). However, less than L bytes is strongly
discouraged as it would decrease the security strength of the
function. Keys longer than L bytes are acceptable but the extra
length would not significantly increase the function strength. (A
longer key may be advisable if the randomness of the key is
considered weak.)
We are using SHA-256 so L = 32 bytes (256 bits) and B = 64 bytes (512). Hence I would be inclined to cite RFC2104 and recommend a key size of 32 bytes.
Hi,
I've not found any mention about a recommended HMAC key length. Test vector Example 49 says
32
bytes. Is it the only allowed length?The text was updated successfully, but these errors were encountered: