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

Weijun Wang weijun at openjdk.org
Mon Sep 16 13:02:33 UTC 2024


On Fri, 13 Sep 2024 22:36:15 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).
>> 
>> Work was begun in [another PR](https://github.com/openjdk/jdk/pull/18924).
>
> Kevin Driver has updated the pull request incrementally with one additional commit since the last revision:
> 
>   remove unused debug field

src/java.base/share/classes/javax/crypto/KDF.java line 1:

> 1: /*

I have some overall comments on the implementation of this class:

1. If I understand correctly, whether DPS is completed depends only on whether `pairOfSpiAndProv` is null or not. There seems no need to check the elements inside it using `delegateAndSpiAreInitialized` or whether `serviceIterator` is null.
2. The type name `Delegate` is confusing. How about just call it `SpiAndProv`? The field names `pairOfSpiAndProv` and `firstPairOfSpiAndProv` are also confusing. How about just call it `locked` and `candidate`?

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

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


More information about the security-dev mailing list