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

Alan Bateman alanb at openjdk.org
Thu May 16 06:35:12 UTC 2024


On Wed, 15 May 2024 19:59:59 GMT, Kevin Driver <kdriver at openjdk.org> wrote:

>> Introduce an API for Key Derivation Functions (KDFs), which are cryptographic algorithms for deriving additional keys from a secret key and other data. See [JEP 478](https://openjdk.org/jeps/478).
>
> Kevin Driver has updated the pull request incrementally with one additional commit since the last revision:
> 
>   javadoc formatting

src/java.base/share/classes/javax/crypto/spec/HKDFParameterSpec.java line 92:

> 90:      * {@code thenExpand} for {@code Extract} and {@code ExtractThenExpand}
> 91:      * use-cases respectively.
> 92:      */

I think it would be useful to say that Builder is not thread safe.

src/java.base/share/classes/javax/crypto/spec/HKDFParameterSpec.java line 115:

> 113:          * @return an immutable {@code Extract}
> 114:          */
> 115:         public Extract extractOnly() {

I think you can expand the method description to say that it builds the Extract method from the current state of the builder.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18924#discussion_r1602692495
PR Review Comment: https://git.openjdk.org/jdk/pull/18924#discussion_r1602690521



More information about the security-dev mailing list