On Tue, 18 Nov 2025 21:48:12 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. > > Martin Doerr has updated the pull request incrementally with one additional > commit since the last revision: > > Remove K from AES_Crypt It looks like the S390 architecture uses it for encryption and decryption in AES/CTR mode, but S390 only needs the symmetric key to derive the encryption and decryption schedules. This can be found for both in the first round. For x86, yes, encryption is only performed for both AES/CTR and AES/GCM. So, yes, I think having the 'is_decrypt' argument explicit would be ideal. nit: some comments still refer to the 'K' array in src/hotspot/cpu/x86/stubGenerator_x86_64_aes.cpp, src/hotspot/share/opto/library_call.cpp, src/hotspot/cpu/riscv/stubGenerator_riscv.cpp (line 2446), and src/hotspot/cpu/ppc/stubGenerator_ppc.cpp. ------------- PR Comment: https://git.openjdk.org/jdk/pull/28299#issuecomment-3567503379
