RFR: 8371450: AES performance improvements for key schedule generation
Shawn M Emery
duke at openjdk.org
Sat Nov 8 00:39:02 UTC 2025
On Fri, 7 Nov 2025 17:25:51 GMT, Jamil Nimeh <jnimeh at openjdk.org> wrote:
>> This fix improves performance in the AES key schedule generation by eliminating an unnecessary object and unnecessary mask in the inverse key schedule.
>>
>> The micro:org.openjdk.bench.javax.crypto.AESReinit benchmark results are improved by 6.96% for arm64 and 7.79% for x86_64.
>>
>> Thank you @jnimeh for catching the unnecessary byte mask!
>
> src/java.base/share/classes/com/sun/crypto/provider/AES_Crypt.java line 1011:
>
>> 1009: */
>> 1010: private static int subWord(int word) {
>> 1011: byte b0 = (byte) (word >>> 24);
>
> Nits (unrelated to this block of code, but I can't put comments on the lines directly since they're not part of the modified code):
>
> - Lines 37-43: I think you could do an `@link` annotation with <a href></a> surrounding the links.
> - Lines 1004-1005: Looks like a bit of comment rot, I think you just need an `@param` for `word`.
Re: `@link` - I'm not for sure I understand the context and couldn't find an example of this in the existing code base.
Re: `@param` - Good catch. I've made this update and a couple of others that needed cleaning up.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28188#discussion_r2505914134
More information about the security-dev
mailing list