RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v10]
Kevin Driver
kdriver at openjdk.org
Tue Aug 13 15:24:13 UTC 2024
On Mon, 5 Aug 2024 20:04:35 GMT, Sean Mullan <mullan 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/02778490...dd2ee48f
>
> src/java.base/share/classes/javax/crypto/KDF.java line 413:
>
>> 411: * algorithm
>> 412: * @throws InvalidAlgorithmParameterException
>> 413: * if the {@code KDFParameters} is an invalid value
>
> I don't think "invalid value" is right here, that sound more like it is not an object and has a value. Changing it to "if the {@code KDFParameters} are invalid" would be sufficient, but I think the text should be consistent, so in that case it should be "if the {@code KDFParameters} are inappropriate for this {@code KDF}." (that is the wording you use in the `KDFSpi` ctor).
>
> Same comment for all methods in `KDF` that take `KDFParameters`.
@seanjmullan: Addressed in https://github.com/openjdk/jdk/pull/20301/commits/59a3f02015f7fc3ad81ca29b90d83b1c9bd70fc5. Please resolve this conversation if satisfied.
> src/java.base/share/classes/javax/crypto/KDF.java line 458:
>
>> 456: * @param alg
>> 457: * the algorithm of the resultant {@code SecretKey} object
>> 458: * @param kdfParameterSpec
>
> I think this parameter should be renamed to `derivationParameterSpec` (or something similar) to avoid confusion with the `kdfParameterSpec` variable passed to `getInstance`.
@seanjmullan: Addressed in https://github.com/openjdk/jdk/pull/20301/commits/59a3f02015f7fc3ad81ca29b90d83b1c9bd70fc5. Please resolve this conversation if satisfied.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1715489121
PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1715488022
More information about the security-dev
mailing list