Skip to content

Commit

Permalink
cherry-pick: HKDF, HKDF_expand, and PBKDF Truncated SHA2-512 (#1946) (#…
Browse files Browse the repository at this point in the history
…1947)

### Description of changes:
* ACVP testing for SHA2-512/224 and SHA2-512/256 for PBKDF and KDA:
HKDF.
* Update service indicator for PBKDF, HKDF, and HKDF_expand (KBKDF
feedback mode) to support SHA2-512/224 and SHA2-512/256 as approved
algorithms.

(cherry picked from commit d93711c)

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and the ISC license.
  • Loading branch information
skmcgrail authored Oct 24, 2024
1 parent 993087f commit b6490a0
Show file tree
Hide file tree
Showing 8 changed files with 329 additions and 7 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 b6490a0

Please sign in to comment.