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

Kevin Driver kdriver at openjdk.org
Tue May 14 19:58:10 UTC 2024


On Thu, 9 May 2024 20:27:30 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> Kevin Driver has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   some code review comments
>
> src/java.base/share/classes/com/sun/crypto/provider/HkdfKeyDerivation.java line 189:
> 
>> 187:             // perform expand
>> 188:             try {
>> 189:                 return Arrays.copyOf(hkdfExpand(this.pseudoRandomKey, this.info, this.length),
> 
> If length is already correct, there is no need to call `copyOf`.

This ensures that it is truncated to the proper length.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18924#discussion_r1600573770



More information about the security-dev mailing list