RFR: 8371820: Further AES performance improvements for key schedule generation
Shawn M Emery
duke at openjdk.org
Fri Nov 14 07:46:31 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.
Good catch in eliminating the unnecessary construction of both key schedules on the PPC64, S390, and RISCV64 architectures.
src/java.base/share/classes/com/sun/crypto/provider/AES_Crypt.java line 59:
> 57: // Following attribute is specific to Intrinsics where the unprocessed
> 58: // key is used for PPC64, S390, and RISCV64 architectures, whereas K is
> 59: // used for everything else.
I would change this to:
// Following attributes (sessionKe and K) are specific to Intrinsics, where sessionKe
// is the unprocessed key that is used for PPC64, S390, and RISCV64 architectures,
// whereas K is used for everything else.
-------------
PR Review: https://git.openjdk.org/jdk/pull/28299#pullrequestreview-3463343453
PR Review Comment: https://git.openjdk.org/jdk/pull/28299#discussion_r2526196244
More information about the security-dev
mailing list