RFR: 8371820: Further AES performance improvements for key schedule generation [v3]
Valerie Peng
valeriep at openjdk.org
Tue Nov 18 18:43:07 UTC 2025
On Fri, 14 Nov 2025 17:21:50 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:
>> This fix simplifies the hotspot intrinsics for some platforms and optimizes the key computation for encryption. We can save the `genInvRoundKeys` computation when we only do encryption.
>>
>> The micro:org.openjdk.bench.javax.crypto.AESReinit benchmark results are improved by 17% for ppc64 and 26% for x86_64.
>
> Martin Doerr has updated the pull request incrementally with one additional commit since the last revision:
>
> More minor cleanup.
src/java.base/share/classes/com/sun/crypto/provider/AES_Crypt.java line 62:
> 60: private int[] sessionKe = null; // key for encryption
> 61: private int[] sessionKd = null; // preprocessed key for decryption
> 62: private int[] K = null; // preprocessed key in case of decryption
I find the comment confusing as `K` is sometimes assigned with `sessionKe`, so it can't be used only for decryption?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28299#discussion_r2539296610
More information about the security-dev
mailing list