RFR: 8331008: KDF Implementation
Sean Mullan
mullan at openjdk.org
Thu May 9 15:32:58 UTC 2024
On Tue, 23 Apr 2024 20:42:51 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).
src/java.base/share/classes/javax/crypto/KDF.java line 246:
> 244: } catch (NoSuchAlgorithmException nsae) {
> 245: throw new NoSuchAlgorithmException("Algorithm " + algorithm + " not available", nsae);
> 246: }
Why do you catch and rethrow the NSAE exception? Also, `GetInstance.getInstance` does not throw `InvalidParameterSpecException`. You will need to catch the NSAE and see if the cause is an IPSE and then rethrow as an IPSE - see the `CertStore` code for an example.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18924#discussion_r1595609212
More information about the security-dev
mailing list