RFR: 8288050: Add support of SHA-512/224 and SHA-512/256 to the PBKDF2 and PBES2 impls in SunJCE provider [v3]
Weijun Wang
weijun at openjdk.org
Sat Dec 3 15:40:15 UTC 2022
On Sat, 3 Dec 2022 00:53:28 GMT, Valerie Peng <valeriep at openjdk.org> wrote:
>> This RFE enhances existing PBE algorithms with the "SHA512/224" and "SHA512/256" support.
>> Current transformation parsing in javax.crypto.Cipher class is re-written to handle the additional "/" in the "SHA512/224" and "SHA512/256" algorithm names. Existing tests are updated with the additional new algorithms.
>
> Valerie Peng has updated the pull request incrementally with one additional commit since the last revision:
>
> handle the "SHA512/2" lookup of the cipher transformation in a case-insensitive way.
LGTM. Only 2 tiny style-related comments.
src/java.base/share/classes/javax/crypto/Cipher.java line 331:
> 329: int sha512Idx = transformation.toUpperCase(Locale.ENGLISH).indexOf
> 330: (SHA512TRUNCATED);
> 331: int startIdx = (sha512Idx == -1? 0 :
1. Line 329: break the line before ".".
2. Line 331: add a space before "?".
-------------
Marked as reviewed by weijun (Reviewer).
PR: https://git.openjdk.org/jdk/pull/11339
More information about the security-dev
mailing list