RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v10]
Valerie Peng
valeriep at openjdk.org
Tue Aug 13 18:24:53 UTC 2024
On Tue, 13 Aug 2024 15:20:13 GMT, Kevin Driver <kdriver at openjdk.org> wrote:
>> 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.
Well, I am not too sure if we should state it this way as we have no way to tell if the KDF parameters are valid or not since KDF class is not coded with algorithm-specific knowledge to validate it. How about we just simply state that no providers supporting the requested KDFSpi implementations accepting it?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1715736873
More information about the security-dev
mailing list