RFR: 8308118: Avoid multiarray allocations in AESCrypt.makeSessionKey [v2]

Aleksey Shipilev shade at openjdk.org
Tue May 16 09:43:50 UTC 2023


On Tue, 16 May 2023 06:28:17 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> src/java.base/share/classes/com/sun/crypto/provider/AESCrypt.java line 1372:
>> 
>>> 1370: 
>>> 1371:         // It is significantly faster to allocate individual arrays,
>>> 1372:         // instead of doing the multi-array allocation. See JDK-8308105.
>> 
>> Alternatively, could the multi-array allocation get improved?
>
> Yes, it could and it eventually would, but it would take significantly more work: there are multiple issues of differing complexity, impact, and risk. This workaround, on the other hand, is straight-forward and backportable.

Please look again, I think we can improve this code even further, and that is where JVM optos would not help us much :)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13996#discussion_r1194898514



More information about the security-dev mailing list