RFR: 8353578: Refactor existing usage of internal HKDF impl to use the KDF API [v2]

Valerie Peng valeriep at openjdk.org
Thu Apr 10 22:15:27 UTC 2025


On Mon, 7 Apr 2025 16:44:58 GMT, Sean Mullan <mullan at openjdk.org> wrote:

>> Valerie Peng has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   added default deriveData method to SSLKeyDerivation interface and
>>   refactored code to remove unused AlgorithmParameterSpec argument.
>
> src/java.base/share/classes/sun/security/ssl/SSLKeyDerivation.java line 35:
> 
>> 33:     SecretKey deriveKey(String purpose) throws IOException;
>> 34: 
>> 35:     default byte[] deriveData(String purpose) throws IOException {
> 
> This is an internal interface, so I don't think you need to make this a `default` method.

I didn't add `deriveData(String)` impl to all the existing impls of `SSLKeyDerivation`. Only impls used for deriving IVs are updated to add impl for `deriveData(String)`, so the `default` method is necessary.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24393#discussion_r2038421803


More information about the security-dev mailing list