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

Kevin Driver kdriver at openjdk.org
Tue Sep 3 20:46:33 UTC 2024


On Tue, 3 Sep 2024 20:13:10 GMT, Valerie Peng <valeriep at openjdk.org> wrote:

>> See: https://github.com/openjdk/jdk/pull/20301/commits/25c17b26231b2b63bab9193fe29c7c258f96a31f
>
> It looks like `Arrays.copyOf()` is still called unconditionally?

After relocating the length enforcement to hkdfExpand, as suggested, I did consider this, but I'm not sure what gain this check really provides in practice. Are you concerned about saving the memory allocation or the time it takes to do the actual `copyOf`?

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

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


More information about the security-dev mailing list