RFR: 8343232: PKCS#12 KeyStore support for RFC 9879: Use of Password-Based Message Authentication Code 1 (PBMAC1) [v7]
Weijun Wang
weijun at openjdk.org
Tue Sep 23 18:17:29 UTC 2025
On Mon, 22 Sep 2025 18:42:57 GMT, Mark Powers <mpowers at openjdk.org> wrote:
>> [JDK-8343232](https://bugs.openjdk.org/browse/JDK-8343232)
>
> Mark Powers has updated the pull request incrementally with one additional commit since the last revision:
>
> default salt length and one other comment from Weijun
src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java line 2196:
> 2194: String algName =
> 2195: macData.getDigestAlgName().toUpperCase(Locale.ENGLISH);
> 2196: if (algName.equals("PBMAC1")) {
We should manage to move algorithm-specific logic inside `MacData` as much as possible, ideally everything. For example, instead of letting `macData.getDigestAlgName()` returning either "HmacSHA256" or "PBMAC1", it should return the final `macAlgorithm` we need. If the calculation and verification must be different, they can also be moved into `MacData`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24429#discussion_r2373110289
More information about the security-dev
mailing list