Add SHA-384/SHA-512 support to Pkcs5HashPassword (PBKDF2) - #267
Merged
Doug Flick (Flickdm) merged 2 commits intoJul 24, 2026
Merged
Conversation
Doug Flick (Flickdm)
force-pushed
the
feat/pkcs5-pbkdf2-sha384-sha512
branch
from
July 24, 2026 16:43
6aba5c3 to
e15ae38
Compare
Doug Flick (Flickdm)
marked this pull request as ready for review
July 24, 2026 17:15
Doug Flick (Flickdm)
enabled auto-merge (rebase)
July 24, 2026 17:16
Aaron (apop5)
approved these changes
Jul 24, 2026
Doug Flick (Flickdm)
force-pushed
the
feat/pkcs5-pbkdf2-sha384-sha512
branch
from
July 24, 2026 19:35
e15ae38 to
369e0b8
Compare
Joey Vagedes (Javagedes)
approved these changes
Jul 24, 2026
Doug Flick (Flickdm)
force-pushed
the
feat/pkcs5-pbkdf2-sha384-sha512
branch
from
July 24, 2026 20:40
369e0b8 to
95eaa1a
Compare
Joey Vagedes (Javagedes)
approved these changes
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Pkcs5HashPassword(PBKDF2) only mappedSHA1_DIGEST_SIZEandSHA256_DIGEST_SIZE, so platforms could not select SHA-384/SHA-512 for password hashing. This blocks CNSA 2.0–aligned configurations. This change extends the digest-size switch in both BaseCryptLib backends to cover SHA-384 and SHA-512; iteration count is already a caller-supplied parameter.CryptPkcs5Pbkdf2.c): mapSHA384_DIGEST_SIZE → EVP_sha384(),SHA512_DIGEST_SIZE → EVP_sha512().CryptPkcs5Pbkdf2.c): mapSHA384_DIGEST_SIZE → MBEDTLS_MD_SHA384,SHA512_DIGEST_SIZE → MBEDTLS_MD_SHA512(config already enablesMBEDTLS_SHA384_C/MBEDTLS_SHA512_C).*Null.cvariants to list the newly supported digest sizes.How This Was Tested
Host based testing, and QemuQ35
microsoft/mu_basecore#1863
Integration Instructions
Callers wishing to use stronger hashes pass
SHA384_DIGEST_SIZEorSHA512_DIGEST_SIZEasDigestSizewith an appropriateIterationCount. Backwards compatibility (stored-hash migration) and any OS-facing capability reporting (e.g., ECIT) are platform responsibilities and out of scope here.