[jdk9] RFR: 8080273: JCA Signature provider service loading bottlenecks

Ivan Gerasimov ivan.gerasimov at oracle.com
Mon May 23 11:41:29 UTC 2016


Hello!

It has been observed that under some circumstances a scalability 
bottleneck may be observed, when accessing the internal 
BlindingParameters structure in the sun.security.rsa.RSACore class.

It is proposed to slightly reorganize the code around, to reduce the 
possible contention.

Would you please help review the proposal?

BUGURL: https://bugs.openjdk.java.net/browse/JDK-8080273
WEBREV: http://cr.openjdk.java.net/~igerasim/8080273/00/webrev/

Three things are done here:
1) The instance of BlindingParameters is confined to the current thread, 
so no synchronization is necessary when creating the next 
BlindingRandomPair;
2) Extra instances of BlindingParameters, which are created due to 
concurency, aren't thrown away but reused;
3) Only perform { u = u.modPow(BIG_TWO, n);  v = v.modPow(BIG_TWO, n); } 
when needed, thus save the last unused calculation.

Comments, suggestions are very welcome!

With kind regards,
Ivan



More information about the security-dev mailing list