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

Shawn M Emery duke at openjdk.org
Tue Oct 21 00:05:34 UTC 2025


On Mon, 20 Oct 2025 23:47:51 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 589:
> 
>> 587: 
>> 588:     // Lookup table for inverse substitution transform of last round as
>> 589:     // described in the international journal article referenced.
> 
> Is there a link that I can look it up also?

Yes, it's the 3rd document cited for this class: https://www.internationaljournalcorner.com/index.php/ijird_ojs/article/view/134688

> src/java.base/share/classes/com/sun/crypto/provider/AES_Crypt.java line 1034:
> 
>> 1032:         int ti0, ti1, ti2, ti3;
>> 1033:         int a0, a1, a2, a3;
>> 1034:         int w = K.length - 4;
> 
> nit: 4 could be WB?

Yes, I think that logic is acceptable. Fixed.

> src/java.base/share/classes/com/sun/crypto/provider/AES_Crypt.java line 1180:
> 
>> 1178:                 ^ T3[(ti0 >> 16) & 0xFF] & 0xFF0000
>> 1179:                 ^ T0[(ti1 >> 8) & 0xFF] & 0xFF00
>> 1180:                 ^ T1[ti2 & 0xFF] & 0xFF ^ K[w + 3];
> 
> Is this last round processing also based on spec or some journal?

Yes, it's an optimization based on the 3rd document cited for this class.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27807#discussion_r2446411532
PR Review Comment: https://git.openjdk.org/jdk/pull/27807#discussion_r2446411617
PR Review Comment: https://git.openjdk.org/jdk/pull/27807#discussion_r2446411563


More information about the core-libs-dev mailing list