RFR: 8267125: AES Galois CounterMode (GCM) interleaved implementation using AVX512 + VAES instructions [v4]

Smita Kamath svkamath at openjdk.java.net
Fri Jul 30 18:56:43 UTC 2021


On Mon, 19 Jul 2021 19:18:54 GMT, Valerie Peng <valeriep at openjdk.org> wrote:

>> Smita Kamath has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Updated AES-GCM intrinsic to match latest Java Code
>
> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java line 717:
> 
>> 715:                 in = new byte[Math.min(PARALLEL_LEN, srcLen)];
>> 716:                 out = new byte[Math.min(PARALLEL_LEN, srcLen)];
>> 717:             }
> 
> Move this down to else-block below just like the 'ct' variable.

I've kept this code as is and not moved as recommended. If we move this line to the else part, the case where srcLen is less than PARALLEL_LEN but greater than BlockSize, in[] is null. As a result, three tests in test/jdk/../Cipher/AEAD were failing on src.get(in, 0, rlen) line. Do let me know if that's okay. Thanks.

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

PR: https://git.openjdk.java.net/jdk/pull/4019



More information about the security-dev mailing list