Skip to content

Commit

Permalink
Update PBKDF, HKDF, and HKDF_expand indicators for truncated SHA2-512
Browse files Browse the repository at this point in the history
  • Loading branch information
skmcgrail committed Oct 24, 2024
1 parent 0ac9a50 commit 28ef550
Show file tree
Hide file tree
Showing 2 changed files with 314 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crypto/fipsmodule/service_indicator/service_indicator.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@ void HKDF_verify_service_indicator(const EVP_MD *evp_md, const uint8_t *salt,
case NID_sha256:
case NID_sha384:
case NID_sha512:
case NID_sha512_224:
case NID_sha512_256:
FIPS_service_indicator_update_state();
break;
default:
Expand All @@ -465,6 +467,8 @@ void HKDFExpand_verify_service_indicator(const EVP_MD *evp_md) {
case NID_sha256:
case NID_sha384:
case NID_sha512:
case NID_sha512_224:
case NID_sha512_256:
FIPS_service_indicator_update_state();
break;
default:
Expand Down Expand Up @@ -492,6 +496,8 @@ void PBKDF2_verify_service_indicator(const EVP_MD *evp_md, size_t password_len,
case NID_sha256:
case NID_sha384:
case NID_sha512:
case NID_sha512_224:
case NID_sha512_256:
if (password_len >= 14 && salt_len >= 16 && iterations >= 1000) {
FIPS_service_indicator_update_state();
}
Expand Down
Loading

0 comments on commit 28ef550

Please sign in to comment.