RFR: 8267125: AES Galois CounterMode (GCM) interleaved implementation using AVX512 + VAES instructions [v7]
Valerie Peng
valeriep at openjdk.java.net
Mon Aug 9 17:17:44 UTC 2021
On Fri, 6 Aug 2021 19:53:28 GMT, Anthony Scarpino <ascarpino at openjdk.org> wrote:
>> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java line 87:
>>
>>> 85: private static final int MAX_BUF_SIZE = Integer.MAX_VALUE;
>>> 86: // data size when buffer is divided up to aid in intrinsics
>>> 87: private static final int TRIGGERLEN = 65536; // 64k
>>
>> With this interleaved impl, is this TRIGGERLEN still needed? The implGCMCrypt(byte[] in, int inOfs, int inLen,
>> byte[] ct, int ctOfs, byte[] out, int outOfs, GCTR gctr, GHASH ghash) method is intrinsified, would there be a difference in increasing the number of gctr/ghash calls inside an already intrinsified method?
>
> Yes, they are two different intrinsics. The new implGCMCrypt intrinsic is supported by newer processors so there is no guarantee that implGCMCrypt will run the intrinsic.
Hmm, ok. Thanks for the explanation.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4019
More information about the security-dev
mailing list