RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v10]
Valerie Peng
valeriep at openjdk.org
Thu Aug 8 01:54:45 UTC 2024
On Thu, 8 Aug 2024 01:47:07 GMT, Valerie Peng <valeriep at openjdk.org> wrote:
>> Kevin Driver has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 16 additional commits since the last revision:
>>
>> - update test to include Spi updates
>> - Update with latest from master
>>
>> Merge remote-tracking branch 'origin/master' into kdf-jep-wip
>> # Please enter a commit message to explain why this merge is necessary,
>> # especially if it merges an updated upstream into a topic branch.
>> #
>> # Lines starting with '#' will be ignored, and an empty message aborts
>> # the commit.
>> - add engineGetKDFParameters to the KDFSpi
>> - code review comment fix for javadoc specification
>> - change course on null return values from derive methods
>> - code review comments
>> - threading refactor + code review comments
>> - review comments
>> - review comments
>> - update code snippet type in KDF
>> - ... and 6 more: https://git.openjdk.org/jdk/compare/c8ce4a2d...dd2ee48f
>
> src/java.base/share/classes/javax/crypto/KDF.java line 253:
>
>> 251: public static KDF getInstance(String algorithm, String provider)
>> 252: throws NoSuchAlgorithmException, NoSuchProviderException {
>> 253: Objects.requireNonNull(provider, "provider may not be null");
>
> nit: may=>should?
Same goes for other {@code Object.requireNonNull()} calls
> src/java.base/share/classes/javax/crypto/KDF.java line 259:
>
>> 257: throw new NoSuchAlgorithmException(
>> 258: "Received an InvalidAlgorithmParameterException. Does this "
>> 259: + "algorithm require KDFParameters?", e);
>
> Change the question to something like "No implementation found using null KDFParameters"?
Same goes for line 291-292.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1708393133
PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1708399038
More information about the security-dev
mailing list