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

Kevin Driver kdriver at openjdk.org
Mon Sep 9 22:30:24 UTC 2024


On Sun, 8 Sep 2024 16:22:31 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Kevin Driver has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   updated comments around locking mechanism
>
> src/java.base/share/classes/java/security/KDFParameters.java line 30:
> 
>> 28: 
>> 29: /**
>> 30:  * A specification of {@code KDF} parameters.
> 
> A passing comment on KDFPraameters. It doesn't spell out what "KDF" stands for, and doesn't seem to link to KDF in the class description.

@AlanBateman Good note. I will add this.

> src/java.base/share/classes/javax/crypto/KDF.java line 47:
> 
>> 45:  * This class provides the functionality of a Key Derivation Function (KDF),
>> 46:  * which is a cryptographic algorithm for deriving additional keys from input
>> 47:  * keying material and (optionally) other data.
> 
> Do you want to say "key material" rather than "keying material" here?

@AlanBateman, the wording of "keying material" (as opposed to "key material") is from the RFC. @wangweij asked that we use "keying material" everywhere for consistency. Though, sometimes it does read awkwardly, I agree.

> src/java.base/share/classes/javax/crypto/KDF.java line 53:
> 
>> 51:  * <p>
>> 52:  * The class has two derive methods, {@code deriveKey} and {@code deriveData}.
>> 53:  * The {@code deriveKey} method accepts an algorithm {@code String} and
> 
> It might be clearer to say an algorithm name, or  algorithm name as a String.

@AlanBateman, agreed - will make this change.

> src/java.base/share/classes/javax/crypto/KDFSpi.java line 37:
> 
>> 35: /**
>> 36:  * This class defines the <i>Service Provider Interface</i> (<b>SPI</b>) for the
>> 37:  * {@code KDF} class.
> 
> KDFSpi is the same, I guess I expected to see "Key Derivation Function" and a link to KDF in the first paragraph.

@AlanBateman Good note. I will also add this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1751010018
PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1751011782
PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1751012296
PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1751010275


More information about the security-dev mailing list