RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v36]
Weijun Wang
weijun at openjdk.org
Sat Sep 14 02:07:27 UTC 2024
On Fri, 13 Sep 2024 19:39:04 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:
>
> refine wording on DPS getInstance with params exception
src/java.base/share/classes/javax/crypto/KDFSpi.java line 46:
> 44: * super(params)} passing the parameters supplied. The constructor must also
> 45: * throw an {@code InvalidAlgorithmParameterException} if the supplied
> 46: * parameters are inappropriate.
I think it's worth saying explicitly that
> A `KDF` object is instantiated with one of the `getInstance` methods that contains a `KDFParameters` parameter, the user-provided `KDFParameters` object will be passed to the constructor of the `KDFSpi` implementation. Otherwise, if it is instantiated with one of the `getInstance` methods without a `KDFParameters` parameter, a `null` value will passed to the constructor.
My words might be a little verbose, but I'd rather to precise and clear.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1759641510
More information about the security-dev
mailing list