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

Anthony Scarpino ascarpino at openjdk.java.net
Thu Jul 22 17:22:24 UTC 2021


On Tue, 20 Jul 2021 22:36:28 GMT, Valerie Peng <valeriep at openjdk.org> wrote:

>> Initializing op in abstract GCMEngine would mean another 'if(encryption)', when that would not be needed in the  GCMEncrypt() or GCMDecrypt().  I don't see why that is clearer. 
>> 
>> GaloisCounterMode.implGCMCrypt(...) is the intrinsic, so I have to use what is used by hotspot.
>
> Seems strange to have GCMOperation op defined in GCMEngine but not initialized, nor used. The methods in GCMEngine which use op has an argument named op anyway. Either you just use the "op" field (remove the "op" argument) or the "op" argument (move the op field to GCMEncrypt/GCMDecrypt class). Having both looks confusing.

Ok.. Moving it into GCMEncrypt makes sense.  Now that I look at the code GCMDecrypt only uses it when passed to a method.  GCMEncrypt uses it

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

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



More information about the security-dev mailing list