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

Kevin Driver kdriver at openjdk.org
Fri Sep 13 17:29:27 UTC 2024


On Thu, 5 Sep 2024 15:12:55 GMT, Viktor Klang <vklang at openjdk.org> wrote:

>> Kevin Driver has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   change impl class to use byte arrays rather than SecretKey objects where possible
>
> src/java.base/share/classes/com/sun/crypto/provider/HkdfKeyDerivation.java line 167:
> 
>> 165:                 // Since we're defining these values internally, it is unlikely.
>> 166:                 throw new ProviderException(
>> 167:                     "could not instantiate a Mac with the provided algorithm",
> 
> There's a bit of inconsistency in using capitalization on abbreviations, examples are: "HKDF" vs "Mac"/"Hmac" vs "ikm". I'd suggest aligning with prior art and use that consistently.

@viktorklang-ora: I've made another pass on this, and the results are in https://github.com/openjdk/jdk/pull/20301/commits/f279c7ff11c570fdb7307827bfcd86680a862ae6. 

In general, where acronyms are in lowercase, I have added verbiage to indicate that this refers to the argument or variable name. Otherwise, I am using all-caps for acronyms.

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

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


More information about the security-dev mailing list