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

Shawn M Emery duke at openjdk.org
Wed Oct 15 21:31:23 UTC 2025


On Wed, 15 Oct 2025 17:54:37 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:
>> 
>>   Add remaining files to be staged
>
> test/micro/org/openjdk/bench/javax/crypto/AESDecrypt.java line 53:
> 
>> 51:     public void setup() throws Exception {
>> 52:         SecretKeySpec keySpec = new SecretKeySpec(new byte[]{-80, -103, -1, 68, -29, -94, 61, -52, 93, -59, -128, 105, 110, 88, 44, 105}, "AES");
>> 53:         IvParameterSpec iv = new IvParameterSpec(new byte[]{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00});
> 
> Is the all-0s IV intentional?

Yes, it's in keeping with the other benchmarks (e.g., test/micro/org/openjdk/bench/javax/crypto/AES.java).

> test/micro/org/openjdk/bench/javax/crypto/AESDecrypt.java line 82:
> 
>> 80:     public byte[] testUseAesIntrinsics() throws Exception {
>> 81:         return cipher.doFinal(ct);
>> 82:     }
> 
> These 3 methods look same to me except for the method names?

The forked arguments will test different levels of optimizations:
testBaseline: no optimizations
testUseAes: AES optimizations
testUseAesIntrinsics: AES machine instructions

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

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


More information about the security-dev mailing list