[8u] RFR 8073108: Use x86 and SPARC CPU instructions for GHASH acceleration

Doerr, Martin martin.doerr at sap.com
Thu Jan 2 19:47:21 UTC 2020


For comparison: jdk11 is faster:

jdk11/images/jdk/bin/java -Dmode=GCM -DmsgSize=10000 TestAESMain
100000 iterations

algorithm=AES, mode=GCM, paddingStr=PKCS5Padding, msgSize=10000, keySize=128, noReinit=false, checkOutput=false, encInputOffset=0, encOutputOffset=0, decOutputOffset=0, lastChunkSize=32
Algorithm: AES(128bit)
Encryption cipher provider: SunJCE version 11
Encryption cipher algorithm: AES/GCM/PKCS5Padding
Starting encryption warm-up
Finished encryption warm-up
TestAESEncode runtime was 2101.053295 ms

algorithm=AES, mode=GCM, paddingStr=PKCS5Padding, msgSize=10000, keySize=128, noReinit=false, checkOutput=false, encInputOffset=0, encOutputOffset=0, decOutputOffset=0, lastChunkSize=32
Algorithm: AES(128bit)
Decryption cipher provider: SunJCE version 11
Decryption cipher algorithm: AES/GCM/PKCS5Padding
Starting decryption warm-up
Finished decryption warm-up
TestAESDecode runtime was 1554.809644 ms


> -----Original Message-----
> From: Doerr, Martin
> Sent: Donnerstag, 2. Januar 2020 20:40
> To: Chen Li <meloli87 at gmail.com>; jdk8u-dev at openjdk.java.net
> Subject: RE: [8u] RFR 8073108: Use x86 and SPARC CPU instructions for
> GHASH acceleration
> 
> Hi Chen,
> 
> please find my console output with/without GHASH intrinsics below. The
> micro benchmark was executed on an Intel(R) Xeon(R) CPU E5-2660 v3 @
> 2.60GHz machine.
> 
> Best regards,
> Martin
> 
> 
> jdk8/images/j2re-image/bin/java -Dmode=GCM -DmsgSize=10000
> TestAESMain
> 100000 iterations
> 
> algorithm=AES, mode=GCM, paddingStr=PKCS5Padding, msgSize=10000,
> keySize=128, noReinit=false, checkOutput=false, encInputOffset=0,
> encOutputOffset=0, decOutputOffset=0, lastChunkSize=32
> Algorithm: AES(128bit)
> Encryption cipher provider: SunJCE version 1.8
> Encryption cipher algorithm: AES/GCM/PKCS5Padding
> Starting encryption warm-up
> Finished encryption warm-up
> TestAESEncode runtime was 4092.488144 ms
> 
> algorithm=AES, mode=GCM, paddingStr=PKCS5Padding, msgSize=10000,
> keySize=128, noReinit=false, checkOutput=false, encInputOffset=0,
> encOutputOffset=0, decOutputOffset=0, lastChunkSize=32
> Algorithm: AES(128bit)
> Decryption cipher provider: SunJCE version 1.8
> Decryption cipher algorithm: AES/GCM/PKCS5Padding
> Starting decryption warm-up
> Finished decryption warm-up
> TestAESDecode runtime was 4273.675072 ms
> 
> 
> jdk8/images/j2re-image/bin/java -XX:-UseGHASHIntrinsics -Dmode=GCM -
> DmsgSize=10000 TestAESMain
> 100000 iterations
> 
> algorithm=AES, mode=GCM, paddingStr=PKCS5Padding, msgSize=10000,
> keySize=128, noReinit=false, checkOutput=false, encInputOffset=0,
> encOutputOffset=0, decOutputOffset=0, lastChunkSize=32
> Algorithm: AES(128bit)
> Encryption cipher provider: SunJCE version 1.8
> Encryption cipher algorithm: AES/GCM/PKCS5Padding
> Starting encryption warm-up
> Finished encryption warm-up
> TestAESEncode runtime was 18781.033722 ms
> 
> algorithm=AES, mode=GCM, paddingStr=PKCS5Padding, msgSize=10000,
> keySize=128, noReinit=false, checkOutput=false, encInputOffset=0,
> encOutputOffset=0, decOutputOffset=0, lastChunkSize=32
> Algorithm: AES(128bit)
> Decryption cipher provider: SunJCE version 1.8
> Decryption cipher algorithm: AES/GCM/PKCS5Padding
> Starting decryption warm-up
> Finished decryption warm-up
> TestAESDecode runtime was 18267.19484 ms


More information about the jdk8u-dev mailing list