On Thu, 13 Nov 2025 16:48:28 GMT, Martin Doerr <[email protected]> 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/java.base/share/classes/com/sun/crypto/provider/AES_Crypt.java line 941:
> 939: if (decrypting) {
> 940: if (sessionKd == null) {
> 941: sessionKd = genInvRoundKeys(sessionKe, rounds);
Good catch, as this is more efficient given that the inverse key schedule is
dependent upon the (encryption) key schedule in the code's current state.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28299#discussion_r2526173217