RFR: 8326609: New AES implementation with updates specified in FIPS 197 [v7]

Shawn M Emery duke at openjdk.org
Thu Oct 16 20:04:37 UTC 2025


On Thu, 16 Oct 2025 19:55:12 GMT, Valerie Peng <valeriep at openjdk.org> wrote:

>> Shawn M Emery has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Updates for code review comments from @valeriepeng
>
> src/java.base/share/classes/com/sun/crypto/provider/AES_Crypt.java line 1157:
> 
>> 1155:             ti3 = T0[a3 >>> 24] ^ T1[(a0 >> 16) & 0xFF]
>> 1156:                     ^ T2[(a1 >> 8) & 0xFF] ^ T3[a2 & 0xFF] ^ K[w + 7];
>> 1157:             w += 8;
> 
> No need for w, since you already checked the `rounds` value, you can directly reference K inside this block, i.e. K[40] - K[47]. Same goes for the next block for AES-256, i.e. directly reference K[48]-K[55].

I would still need w for lines 1180 - 1195 though.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27807#discussion_r2437324027


More information about the security-dev mailing list