RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v61]
Kevin Driver
kdriver at openjdk.org
Tue May 14 20:03:12 UTC 2024
On Tue, 14 May 2024 19:49:43 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:
>
> throw an exception if algorithm parameter spec is passed
> `deriveKey` and `deriveData` throw `InvalidParameterSpecException`. Should it be `InvalidAlgorithmParameterException`?
>
> It seems like `InvalidParameterSpecException` is only used with `AlgorithmParameters` and `AlgorithmParametersSpi`. <img alt="Screenshot 2024-05-12 at 1 49 17 PM" width="586" src="https://private-user-images.githubusercontent.com/574013/329870060-2ce4f76d-deac-4207-9aae-9a588f514ce6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTU3MTY4ODMsIm5iZiI6MTcxNTcxNjU4MywicGF0aCI6Ii81NzQwMTMvMzI5ODcwMDYwLTJjZTRmNzZkLWRlYWMtNDIwNy05YWFlLTlhNTg4ZjUxNGNlNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNTE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDUxNFQxOTU2MjNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01YmFhMWEyNzI5MTNlMWEwODg0YTM2MmMyYjRmYmI4NDYzNzgxMWM3Y2U0ODQ2OTYwOWNlZGE2ZWFkMDc2MjIxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.X3PHM3MoUaYtT24tIectlU8wQvhaFc9AORubLsTOA94"
>
This can be debated further during the "Preview" period, I assume. For now, the name of the parameter is KDFParameterSpec, so the choice of Exception class makes sense.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18924#issuecomment-2111038540
More information about the security-dev
mailing list