Skip to content

fix: use prfFunction in PBES2 pattern - #1239

Open
cvas22 wants to merge 1 commit into
CycloneDX:masterfrom
cvas22:fix/905-pbes2-prf
Open

cvas22 wants to merge 1 commit into
CycloneDX:masterfrom
cvas22:fix/905-pbes2-prf

Conversation

@cvas22

@cvas22 cvas22 commented Nov 20, 2026

Copy link
Copy Markdown

As discussed in #905, the PBES2 variant pattern takes {prfFunction} instead of {kdf}. RFC 8018 section 6.2 always uses PBKDF2 as the KDF for PBES2, so the part that actually varies is the PRF that PBKDF2 runs with, like HMAC-SHA256.

fixes #905

Registry data only, same as #1152 did for PBES1.

Notes

I went with {prfFunction} because that's what the issue asks for and the SP800-108 KDFs already use it for the same thing. The PBKDF2 entry itself says {hashAlgorithm} for its PRF though, so if you'd rather keep the two consistent that way I can switch it.

RFC 8018 section 6.2 fixes the PBES2 key derivation function to PBKDF2, so the variable part is the PBKDF2 pseudorandom function, not the KDF.

Fixes CycloneDX#905

Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
@cvas22
cvas22 requested a review from a team as a code owner November 20, 2026 15:08
@jkowalleck jkowalleck added the cap: cryptography-registry Capability: Cryptography Registry label Nov 20, 2026
@jkowalleck
jkowalleck requested a review from bhess November 20, 2026 15:53

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cap: cryptography-registry Capability: Cryptography Registry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Defect]: Variant pattern for PBES2 must have {prfFunction} instead of {kdf}

2 participants