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

Valerie Peng valeriep at openjdk.java.net
Mon Aug 9 18:11:45 UTC 2021


On Fri, 6 Aug 2021 19:35:23 GMT, Anthony Scarpino <ascarpino at openjdk.org> wrote:

>> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java line 1779:
>> 
>>> 1777:             int len = 0;
>>> 1778:             if (inLen >= PARALLEL_LEN) {
>>> 1779:                 implGCMCrypt(in, inOfs, inLen, in, inOfs, out, outOfs, gctr,
>> 
>> Should save the return value into 'len'? For consistency sake, choose between GaloisCounterMode.implGCMCrypt(...) and implGCMCrypt and not both?
>
> I do not understand this comment

Doesn't implGCMCrypt(...) return an int telling how much bytes it has processed? Then we adjust the index and remain input length with this value. But here we didn't save the return value which looks wrong. Did I miss something?

Never mind my second comment, I mis-read the code.

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

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


More information about the hotspot-compiler-dev mailing list