RFR(S)JDK-8214074: Ghash optimization using AVX instructions

Bernd Eckenfels ecki at zusammenkunft.net
Mon Nov 19 22:26:38 UTC 2018


Hello,

What is the purpose of setting some of them to 0 twice? (It’s a new array which should be all-0 anyway.)

+      for (int i = 1; i < 9 ; i++) {
+            subkeyHtbl[2*i] = 0;
+            subkeyHtbl[2*i+1] = 0;
+        }

Also, is the subkeyH no longer be needed (or can be redesigned to use subkeyHtbl[0] and 1?

Gruss
Bernd
--
http://bernd.eckenfels.net

________________________________
Von: core-libs-dev <core-libs-dev-bounces at openjdk.java.net> im Auftrag von Kamath, Smita <smita.kamath at intel.com>
Gesendet: Montag, November 19, 2018 10:52 PM
An: 'Vladimir Kozlov'
Cc: Anthony Scarpino; core-libs-dev at openjdk.java.net; hotspot compiler
Betreff: RFR(S)JDK-8214074: Ghash optimization using AVX instructions

Hi Vladimir,

I'd like to contribute an optimization for GHASH Algorithm using AVX Instructions. I have tested this optimization on SKX x86_64 platform and it shows ~20-30% performance improvement for larger message sizes (for example 8k).

I, smita.kamath at intel.com<mailto:smita.kamath at intel.com> , Shay Gueuron, (shay.gueron at intel.com<mailto:shay.gueron at intel.com>) and Regev Shemy (regev.shemy at intel.com<mailto:regev.shemy at intel.com>) are contributors to this code.

Link to Bug: https://bugs.openjdk.java.net/browse/JDK-8214074

Link to webrev: http://cr.openjdk.java.net/~svkamath/ghash/webrev/

For testing the implementation, I have executed TestAESMain.java. I have executed Jtreg tests and tested this code on 64 bit Windows and Linux platforms.

Please review and let me know if you have any comments.

Thanks and Regards,
Smita

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/security-dev/attachments/20181119/55ad071c/attachment.htm>


More information about the security-dev mailing list