RFR: 8371820: Further AES performance improvements for key schedule generation
Shawn M Emery
duke at openjdk.org
Fri Nov 14 07:35:09 UTC 2025
On Thu, 13 Nov 2025 16:48:28 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.
src/hotspot/share/opto/library_call.cpp line 7483:
> 7481: // However, ppc64 vncipher processes MixColumns and requires the same round keys with encryption.
> 7482: // The ppc64 and riscv64 stubs of encryption and decryption use the same round keys (sessionK[0]).
> 7483: Node* objSessionK = load_field_from_object(aescrypt_object, "sessionK", "[[I");
Good catch, as I didn't see that intrinsics wasn't using the second array element (inverse key schedule) for these platforms all this time!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28299#discussion_r2526153490
More information about the security-dev
mailing list