JDK-8081778 : Use Intel x64 CPU instructions for RSA acceleration
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
The optimization is achieved through intrinsics for BigInteger squareToLen and mulAdd methods.
We see ~50% improvement for SPECjvm2008 crypto.rsa with this patch.
Duplicating a comment from JDK-8133781
java.math.BigInteger.montReduce(int, int, int, int) 498 7.366
java.math.BigInteger.oddModPow(BigInteger, BigInteger) 498 7.366
java.math.BigInteger.modPow(BigInteger, BigInteger) 498 7.366
sun.security.rsa.RSACore.crtCrypt(byte, RSAPrivateCrtKey) 491 7.262
sun.security.rsa.RSACore.rsa(byte, RSAPrivateKey) 491 7.262
Such a call stack is common for TLS servers busy handling TLS connections associated with RSA certificates. Recent trends have been for increased RSA key lengths to be used when issuing RSA certificates. 2048 bit certs are more common now. This places extra load on CPUs. The JDK-8081778 intrinsics enhancement optimizes instructions at the hotspot compiler level in some of the BigInteger calculations which are heavily used in TLS.
Interesting blog on the subject can be found here : https://certsimple.com/blog/measuring-ssl-rsa-keys
Note, for the release note, document if any flags are needed to enable this