RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v15]

Kevin Driver kdriver at openjdk.org
Wed Aug 28 18:18:35 UTC 2024


On Tue, 27 Aug 2024 11:00:31 GMT, Sean Mullan <mullan at openjdk.org> wrote:

>> Kevin Driver has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   code review comments and test renaming
>
> src/java.base/share/classes/javax/crypto/KDF.java line 230:
> 
>> 228: 
>> 229:     /**
>> 230:      * Returns a {@code KDF} instance initialized with the specified algorithm from
> 
> "initialized with the specified algorithm" is not really accurate. I would change this text to "that implements the specified algorithm". Applies to all `getInstance` methods.

This wording was suggested by another reviewer, since the implementation is not truly "returned" at this point (ie - a provider may not have been selected, if the provider is not passed as an argument). Saying that the instance is "initialized" with the algorithm is more accurate, since it returns an instance where the algorithm name is really all we would know at that point in time, unless the provider is specified.

> src/java.base/share/classes/javax/crypto/spec/HKDFParameterSpec.java line 216:
> 
>> 214:          * <p>
>> 215:          * An implementation should concatenate the salt into a single value
>> 216:          * once all components are available.
> 
> What do you mean by "An implementation"? Are you referring to the HKDF implementation or the implementation of this method?

I'll clarify this to refer to an HKDF implementation.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1735106602
PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1735107697


More information about the security-dev mailing list